예스스탁
예스스탁 답변
2023-02-20 11:16:37
안녕하세요
예스스탁입니다.
첫번째 캔들신호가 있을시에만 주문을 다르게 할 수 있는지요 ?
위 부분은 별도로 파악이 되지 않습니다.
봉미완성시에 나오는 신호들이므로 중간에 파악할 수 없습니다.
0시 첫봉에 한해 전봉 저가+10틱, 고가-10틱 신호 추가해 드립니다.
input : starttime(200000),endtime(80000),n(30);
var : Tcond(false),hh(0),h1(0),ll(0),l1(0);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= endtime) or
(sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then
{
Tcond = false;
}
if (sdate != sdate[1] and stime >= starttime) or
(sdate == sdate[1] and stime >= starttime and stime[1] < starttime) then
{
Tcond = true;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
input : 익절틱수(100),손절틱수(100);
if Tcond == true Then
{
if NextBarSdate != sDate Then
{
if NextBarOpen != C Then
{
Buy("b",AtStop,NextBarOpen+PriceScale*12);
}
}
if NextBarOpen == C Then
{
Buy("b1",AtStop,NextBarOpen+PriceScale*12);
}
if NextBarSdate != sDate Then
{
if NextBarOpen != C Then
{
Sell("s",AtStop,NextBarOpen-PriceScale*12);
}
}
if NextBarOpen == C Then
{
Sell("s1",AtStop,NextBarOpen-PriceScale*12);
}
if NextBarSdate != sDate Then
{
if NextBarOpen <= L+PriceScale*10 Then
Buy("b2",AtStop,L+PriceScale*10);
Else
Buy("b2.",AtLimit,L+PriceScale*10);
if NextBarOpen >= H-PriceScale*10 Then
Sell("s2",AtStop,H-PriceScale*10);
Else
Sell("s2.",AtLimit,H-PriceScale*10);
}
ExitLong("bx",AtMarket);
ExitShort("sx",AtMarket);
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
즐거운 하루되세요
> 푸른 님이 쓴 글입니다.
> 제목 : 문의드립니다
> input : starttime(200000),endtime(80000),n(30);
var : Tcond(false),hh(0),h1(0),ll(0),l1(0);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= endtime) or
(sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then
{
Tcond = false;
}
if (sdate != sdate[1] and stime >= starttime) or
(sdate == sdate[1] and stime >= starttime and stime[1] < starttime) then
{
Tcond = true;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
input : 익절틱수(0),손절틱수(0);
if Tcond == true Then
{
if NextBarSdate != sDate Then
{
if NextBarOpen != C Then
{
Buy("b",AtStop,NextBarOpen+PriceScale*12);
}
}
ExitLong("bx",AtMarket);
if NextBarOpen == C Then
{
Buy("b1",AtStop,NextBarOpen+PriceScale*12);
}
ExitLong("bx1",AtMarket); }
if NextBarSdate != sDate Then
{
if NextBarOpen != C Then
{
Sell("s",AtStop,NextBarOpen-PriceScale*12);
}
}
ExitShort("sx",AtMarket);
if NextBarOpen == C Then
{
Sell("s1",AtStop,NextBarOpen-PriceScale*12);
}
ExitShort("sx1",AtMarket);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
위 수식어를 해외선물에서 24시부터 익일 시가에 청산하는
240분봉 캔들을 사용하고 있습니다.
첫번째 캔들신호가 있을시에만 주문을 다르게 할 수 있는지요 ?
buy의 주문은 이전 캔들(20시~ 24시)의 최저점에서 +10틱에 매수
sell의 주문은 이전 캔들의(20시~ 24시)의 최고점에서 -10틱에 매도
청산은 다음봉(익일4시) 시가에 하는건 수식어 내용과 동일합니다.
--------------------------------------------------
위의 내용을 조금 변형된 일반수식어로 2개만 추가 하고자 합니다.
1.
해외선물 매매에서 20 ~ 24시 사이 최저점의 +10틱에서 매수후 청산은 익일4시의 수식어
익절 100 손절 100
2.
해외선물 매매에서 20 ~ 24시 사이 최고점의 -10틱에서 매도후 청산은 익일4시의 수식어
익절 100 손절 100