arrow display on the strategy tester

 
I created an indicator that behaves very well in real but when I run it on the strategy tester it doesn't show me the arrows of the entry signal
 

1. Check journal tab for possible error messages printed in tester mode.

2. Make sure you are applying the right setup in Indicator Properties.

 
You should share all the code I believe.
 

If "i" represents the most recent bar(in case i=0) and you are using it to name your arrow object, it is pretty much expected that arrows will be replaced by arrows while they should not.

Anyway we need whole source code to find the problem and solution.

 
Yashar Seyyedin #:

Anyway we need whole source code to find the problem and solution.

He won't share it as the indicator behaves very well, and we can't have nice things 

 

If the loop is using prev_calculated as the starting point, this could be your problem with the strategy tester. This parameter does not bode well with the strategy tester unless it is handled very carefully like in this code:

https://www.mql5.com/en/code/14669

as a workaround try starting the loop at "rates_total-500"  or something like that

MACD with Histogram
MACD with Histogram
  • www.mql5.com
Moving Average Convergence/Divergence with Histogram. Based on MACD.mq5.
 
Conor Mcnamara #:

He won't share it as the indicator behaves very well, and we can't have nice things 

Haha :-)
 
Yashar Seyyedin #: If "i" represents the most recent bar(in case i=0) and you are using it to name your arrow object,

Exactly.

Do not use series index in object names, as they are not unique. As soon as a new bar starts, you will be trying to create a new name (e.g., “name0”), same, existing, previous, name (e.g., “name0” now on bar one.)

Use time (as int) or a non-series index:

#define  SERIES(I)   (Bars - 1 - I) // As-series to non-series or back.