예스스탁
예스스탁 답변
2025-02-13 11:10:01
안녕하세요
예스스탁입니다.
설정창의 시간자동정정은 해당 신호에 대한 주문이
정상 접수되어 주문번호가 있을 경우에만 동작합니다.
주문거부되었을 경우 동작하지 않습니다.
1
Inputs: VtyPercent(0.10),ATRperiod(10),손절틱수(100);
input : StartTime(210000),EndTime(60000);
var : Tcond(false);
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);
}
}
If MarketPosition() <> 1 Then
Buy ("LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> 1 Then
ExitLong ("SE1", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> 1 Then
ExitShort ("LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> 1 Then
sell ("SE2", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
SetStopLoss(손절틱수*PriceScale,PointStop);
2
Inputs: VtyPercent(0.10),ATRperiod(10),손절틱수(100);
input : StartTime(210000),EndTime(60000);
var : Tcond(false);
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);
}
}
If MarketPosition() <> -1 Then
Buy ("LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
ExitLong ("SE1", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
ExitShort ("LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
sell ("SE2", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
SetStopLoss(손절틱수*PriceScale,PointStop);
즐거운 하루되세요
> 푸른 님이 쓴 글입니다.
> 제목 : 문의 드립니다
> 1.
Inputs: VtyPercent(0.10),ATRperiod(10);
input : StartTime(210000),EndTime(60000);
var : Tcond(false);
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);
}
}
If MarketPosition() <> 1 Then
Buy ("LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> 1 Then
ExitLong ("SE1", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> 1 Then
ExitShort ("LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> 1 Then
sell ("SE2", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
---------------------------------------------------
2.
Inputs: VtyPercent(0.10),ATRperiod(10);
input : StartTime(210000),EndTime(60000);
var : Tcond(false);
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);
}
}
If MarketPosition() <> -1 Then
Buy ("LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
ExitLong ("SE1", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
ExitShort ("LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
sell ("SE2", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
시장가로 주문 설정을 하였는데 시세급변으로 주문거부가 나서 체결이 안될 경우
설정창에서 자동정정주문을 설정하면 기존 주문은 취소가 되고 해당되는 초 후에
당시의 상대호가 설정한 호가에 주문이 다시 나가는 지 궁금합니다.
그리고 위 수식어 2개의 수정을 바랍니다.
손절 -100틱 추가 및 손절 체결전 호가주문창에 보이도록
할수있는지 문의 드립니다.