Nopain的跨周期算法在夜盤品種如何調整
作者:開拓者 TB 來源:cxh99.com 發布時間:2015年02月04日
- 咨詢內容:
Nopain的跨周期算法在夜盤品種如何調整,哪位大神出來講講
- TB技術人員:
做個好人,改了一下,不懂對不!
If (TimeFrame == 40320) // 月線
{
CurTime = Month;
PreTime = Month[1];
}
Else If (TimeFrame == 10080) // 周線
{
CurTime = IntPart(DateDiff(19700105,Date)/7);
PreTime = IntPart(DateDiff(19700105,Date[1])/7);
}
Else // 其他時間周期
{
CurTime = IntPart((DateDiff(19700105,date)*1440 + Hour*60 + Minute)/TimeFrame);
PreTime = IntPart((DateDiff(19700105,date[1])*1440 + Hour[1]*60 + Minute[1])/TimeFrame);
}
If(TimeFrame == 1440) //日線
{
if(TrueDate(0)!=TrueDate(1))
{
condition=True;
}
}
Else
{
condition = CurTime != PreTime;
}