Hello Everyone,
My trading system assumes monthly switch of symbols as per:
http://www.amibroker.com/kb/2016/01/30/separate-ranks-for-categories-that-can-be-used-in-backtesting/
Issue is that form:
m = Month();
PositionScore = IIf( m != Ref( m, -1 ), score, scoreNoRotate );
defines different dates for particular symbols, eg. for “XXX” 30th is the last day of the month, becose there was no trading on 31th. For “YYY” the last day is 31th becouse its different market.
This results in unwanted sell/buy signals.
Is there some solution to define the last day of the month with no dates discrepancy (other than manual date of quote change in Quote Editor)?