|
用自動交易的大大們,如何在策略裡判斷今天有沒有開市?
我做了一個,但是結果實在是很怪,畢竟沒有開市,就沒有新的bar- VLastday=TimeFrameGetPrice( "V", inDaily, -1 );_TRACE("VLastday="+NumToStr(VLastday, 1.0));
- OLastday=TimeFrameGetPrice( "O", inDaily, -1 );_TRACE("OLastday="+NumToStr(OLastday, 1.2, false));
- HLastday=TimeFrameGetPrice( "H", inDaily, -1 );
- VToday=TimeFrameGetPrice( "V", inDaily, 0 );_TRACE("VToday="+NumToStr(VToday, 1.0));
- OToday=TimeFrameGetPrice( "O", inDaily, 0 );_TRACE("OToday="+NumToStr(OToday, 1.2, false));
- HToday=TimeFrameGetPrice( "H", inDaily, 0 );
- marketopen = NOT (VToday == VLastday AND OToday == OLastday AND HToday ==HLastday);
- _TRACE("marketopen="+NumToStr(marketopen, 1.0, False));
複製代碼
|
|