You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi @William Roeder ,
I bump into this issue where my custom Indicator work fine when attached on the chart but not in strategy tester (i.e. the indicator just stop at the prev_calculated bar which is the starting time of the testing period). I follow your guide above to computing the 'limit' of the loop but seems not avail. Can you please have a look, thank
Hi @William Roeder ,
after I SetIndexBuffer the array MADiff_array then the indicator working. I use ArraySetAsIndex for this before and the array seemed to be flipped backward. I am not sure how it happen as I have followed clearly the MQL4 documentation as MADiff array is initially intended to be non-visible buffer (run at the back). Can you help explain why ArraySetAsIndex not worked in this case.
Thanks,
Andre
No, you didn't follow it exactly. You return rates_total, therefor the next tick you compute limit = Bars - 1 - rates_total (-1) and you do nothing. Look at #9 closer.
@William Roeder: you sharp eyes are amazing. Silly mistake like this is really hard to detect. I have fixed those points as you advised and now the indicator has worked fine.
I enclosed here the revamped version which I introduce additional arrays buffer (take back those not required to be exported to other program) to collect the cross direction and time of the cross.
Thank you again.
Andre
i seem to have the exact same problem with a code i downloaded (it just doesn't create new "candles") i really dont know mql5 coding (its so odely specific) can someone please tell me what's wrong, thx
code:
i seem to have the exact same problem with a code i downloaded (it just doesn't create new "candles") i really dont know mql5 coding (its so odely specific) can someone please tell me what's wrong, thx
code:
Why have you posted in the MQL4 section when the code is MQL5????
Please repost in the correct section and delete this post.