CME 해외선물 매매시
아래식에서 23시에서 03시 까지에서만 진입하도록
시간 설정하려면 어떻게 해야 하나요?
input : N(5)
input : 익절틱수(50),손절틱수(100);
var : ET(0);
if ET > 0 and sDate != sDate[1] Then
SetStopEndofday(ET);
if Bdate != Bdate[1] Then
{
SetStopEndofday(0);
if stime >= 80000 Then
ET = 060000;
else
ET = 050000;
}
if Bdate == Bdate[n-1] and c-l >= 0
Then
Buy();
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
답변 1
예스스탁
예스스탁 답변
2023-07-10 11:34:57
안녕하세요
예스스탁입니다.
input : 익절틱수(50),손절틱수(100);
input : StartTime(230000),EndTime(30000);
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 c-l >= 0 and Tcond == true Then
Buy();
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
즐거운 하루되세요
> 예스요 님이 쓴 글입니다.
> 제목 : 문의 드립니다.~~~~
> CME 해외선물 매매시
아래식에서 23시에서 03시 까지에서만 진입하도록
시간 설정하려면 어떻게 해야 하나요?
input : N(5)
input : 익절틱수(50),손절틱수(100);
var : ET(0);
if ET > 0 and sDate != sDate[1] Then
SetStopEndofday(ET);
if Bdate != Bdate[1] Then
{
SetStopEndofday(0);
if stime >= 80000 Then
ET = 060000;
else
ET = 050000;
}
if Bdate == Bdate[n-1] and c-l >= 0
Then
Buy();
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);