Just sharing a learning here (courtesy of Craig).
I launched a new system variation and noticed on high trade days, trades taken were not showing up in the daily backtests.
The reason for this was due to the ranking. If there are multiple ranks that come up at the same number eg 110, the CBT will take the trades in alphabetical order – hence the difference in actual results VS backtest results.
This was fixed by this bit of code
On my MOC template, its on line 207 & 249.
SetSortColumns(-4)
Craig changed it to
SetSortColumns(-4,1)
-4 sorts the ranking list
1 sorts the col (?)
Apparently it puts it alphabetical order? (I may be conveying this incorrectly).
Anyway, moving forward I will be monitoring the situation and/or adjusting the code with Craigs amendments above (and running through the retesting process to make sure there is no major change in system performance).
The other suggestion by Craig was to consider a different ranking system, or adding another layer to my current ranking.
eg
100 – Indicator
VS
100 – Indicator/C
PS – who knew a 1 in a piece of code could be so powerful and change so much in a system! Grateful for Craigs help and patience with explaining complicated coding topics. :blink: