jackee1234:
You are not cleaning up (setting to empty value) the CrossedUP and CrossedDown buffers before assigning values to them in the indicator. That can cause you a classical case of repainting and that, in return, can cause the issues you have from the eaWhen I use the custom indicator, it shows the graph as follows
When I use the Expert Advisor with the custom indicator, it shows the following
It also repeated opened a lot of custom indicator when I am doing backtesting.
How should I change the EA such that
It only opened a custom indicator;
It plot the same graph as the custom indicator?
Below is the code for custom indicator (HitBollingerBand1.mq4)
Below is the code of EA makes use of the custom indicator (only the essential parts - the code is runnable) (HitBollingerBandEA.mq4)
Thanks, how do I make sure that it only opens an instance of indicator rather than opened huge amount instances of indicators after each call of start() in EA?
jackee1234: how do I make sure that it only opens an instance of indicator rather than opened huge amount instances of indicators after each call of start() in EA?
|
|
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
When I use the custom indicator, it shows the graph as follows
When I use the Expert Advisor with the custom indicator, it shows the following
It also repeated opened a lot of custom indicator when I am doing backtesting.
How should I change the EA such that
It only opened a custom indicator;
It plot the same graph as the custom indicator?
Below is the code for custom indicator (HitBollingerBand1.mq4)
Below is the code of EA makes use of the custom indicator (only the essential parts - the code is runnable) (HitBollingerBandEA.mq4)