Firsttrade=Optimize("Firsttrade",234500,234500,235500,1000);
Lasttrade=Optimize("LasttradeTime",243500,242500,244500,1000);
Buy = Ref( High , -1 ) > MA(C,10) AND TimeNum()>Firsttrade AND TimeNum()<Lasttrade
Dear Sirs,
I trade US equities/futures from Asia. Due to time zone diff, I always have buy signals initiated between 1145pm to 1235am (next day). With the above, I can only see buy signals before midnight "000000" and signals happened after midnight thru 1235am will not be shown in the backtest report. I did check the Amibroker manual and websites for resolutions but failed. Please help to shed some light on this. Thanks a lot!!!!!
Don't use AND but use OR. You can not go beyond 23:59:59.999. After midnight you start at zero but not at 24..... And starting zeroes can be removed so it becomes 2500, 3500, 4500 instead of 002500,...,... etc.
Firsttrade=Optimize("Firsttrade",234500,234500,235500,1000);
Lasttrade=Optimize("LasttradeTime",3500,2500,4500,1000);
tn = TimeNum();
Buy = Ref( High , -1 ) > MA(C,10) AND (tn>Firsttrade OR tn<Lasttrade);