input : starttime(60000),endtime(0000),n(10);
var : Tcond(false),hh(0),h1(0),ll(0),l1(0);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1]and Tcond == true 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;
hh = h;
ll = l;
h1 = hh[1];
l1 = ll[1];
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
input : 익절틱수(0),손절틱수(0);
if NextBarSdate != sDate Then
{
if NextBarOpen != C Then
{
Buy("b",AtStop,NextBarOpen+PriceScale*10);
}
}
ExitLong("bx",AtMarket);
if NextBarOpen != C Then
{
Buy("b1",AtStop,NextBarOpen+PriceScale*10);
}
ExitLong("bx1",AtMarket);
if NextBarSdate != sDate Then
{
if NextBarOpen != C Then
{
Sell("s",AtStop,NextBarOpen-PriceScale*10);
}
}
ExitShort("sx",AtMarket);
if NextBarOpen != C Then
{
Sell("s1",AtStop,NextBarOpen-PriceScale*10);
}
ExitShort("sx1",AtMarket);
if NextBarSdate == sDate Then
{
if NextBarOpen == C Then
{
Buy("b2",AtStop,NextBarOpen+PriceScale*10);
}
}
ExitLong("bx2",AtMarket);
if NextBarOpen == C Then
{
Buy("b3",AtStop,NextBarOpen+PriceScale*10);
}
ExitLong("bx3",AtMarket);
if NextBarSdate == sDate Then
{
if NextBarOpen == C Then
{
Sell("s2",AtStop,NextBarOpen-PriceScale*10);
}
}
ExitShort("sx2",AtMarket);
if NextBarOpen == C Then
{
Sell("s3",AtStop,NextBarOpen-PriceScale*10);
}
ExitShort("sx3",AtMarket);
----------
위 수식어을 일봉매매에 사용하고 있습니다.
잔고가 있을시 장종료 10분전 (아침 5시 50분) 강제 청산 기능을 넣을 수있는지요 ?
아님 별도의 수식어가 있어도 상관없습니다.
답변 1
예스스탁
예스스탁 답변
2024-03-21 13:30:03
안녕하세요
예스스탁입니다.
문의하신 내용은 가능하지 않습니다.
당일청산은 분봉이하에서만 가능합니다.
즐거운 하루되세요
> 푸른 님이 쓴 글입니다.
> 제목 : 문의 드립니다
> input : starttime(60000),endtime(0000),n(10);
var : Tcond(false),hh(0),h1(0),ll(0),l1(0);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1]and Tcond == true 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;
hh = h;
ll = l;
h1 = hh[1];
l1 = ll[1];
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
input : 익절틱수(0),손절틱수(0);
if NextBarSdate != sDate Then
{
if NextBarOpen != C Then
{
Buy("b",AtStop,NextBarOpen+PriceScale*10);
}
}
ExitLong("bx",AtMarket);
if NextBarOpen != C Then
{
Buy("b1",AtStop,NextBarOpen+PriceScale*10);
}
ExitLong("bx1",AtMarket);
if NextBarSdate != sDate Then
{
if NextBarOpen != C Then
{
Sell("s",AtStop,NextBarOpen-PriceScale*10);
}
}
ExitShort("sx",AtMarket);
if NextBarOpen != C Then
{
Sell("s1",AtStop,NextBarOpen-PriceScale*10);
}
ExitShort("sx1",AtMarket);
if NextBarSdate == sDate Then
{
if NextBarOpen == C Then
{
Buy("b2",AtStop,NextBarOpen+PriceScale*10);
}
}
ExitLong("bx2",AtMarket);
if NextBarOpen == C Then
{
Buy("b3",AtStop,NextBarOpen+PriceScale*10);
}
ExitLong("bx3",AtMarket);
if NextBarSdate == sDate Then
{
if NextBarOpen == C Then
{
Sell("s2",AtStop,NextBarOpen-PriceScale*10);
}
}
ExitShort("sx2",AtMarket);
if NextBarOpen == C Then
{
Sell("s3",AtStop,NextBarOpen-PriceScale*10);
}
ExitShort("sx3",AtMarket);
----------
위 수식어을 일봉매매에 사용하고 있습니다.
잔고가 있을시 장종료 10분전 (아침 5시 50분) 강제 청산 기능을 넣을 수있는지요 ?
아님 별도의 수식어가 있어도 상관없습니다.