As mentioned in this article, I am using custom values for exit signals like 11 to 15 for Sell and 21 to 25 for Cover. But the backtest trade list does not display the exit reason as shown in the refereced article. I am using 5 minute timeframe and backtesting for intraday. Not sure what I am missing
@gandavadi, what are you doing in your formula after the part you posted? By chance are you using ExRem or something else that re-process the signals?
Without seeing the entire code it is difficult to reproduce the issue and provide you some guidance.
That is correct, I am using ExRem (check the below) after assigning values to Sell and Cover. Will that be the issue? Any suggestion for the workaround?
@gandavadi, the easiest solution is to remove the ExRems calls since they are NOT needed by the backtester.
If you still want keep them for charts you could do something similar to the following example (typed directly here so, if needed, please forgive/fix any mistake):
SavedCover = Cover; // Saves the Cover exit codes to a temporary array
// Remove redundant signals
Short = ExRem( Short, Cover );
Cover = ExRem( Cover, Short );
Cover = IIf( Cover, SavedCover, 0); // Restore the custom exit codes
Thank you. Makes sense. I have removed ExRem for Sell and Cover since it is not required as I use the "for" loop to check for redundant signals. But I retained ExRem for Buy and Short as I dont use "for" loops for entry.
Now it works fine...thanks a ton for point out the issue in my code. Below is the screen shot of the trade list.