here i check again same issue if i refresh chart or back test indicator signal result is change kindly solve this error
I've reviewed the code and your images attached in your message.
Please see on this illustration images the issue:

The code have been modified by adding index buffer "bufDir[]" to hold the previous bar direction.
Signal is clculated in every tick of the current bar, and therefore posible repaint signal.
In your EA, you can use the first event signal changed and ignore the lock/unlock signal
to use as entry criteria.
Or on new bar event, take the previous bar signal as your entry criteria.
Please see my comments on the code.
Again, your continues testing and reporting the issue is highly appreciated.
Added Alert code on the attached file.
The alert was placed on new bar event based on the status of the previous bar, to avoid alert on possible multiple triggers of Up/Down signal on the current bar.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
HLPeak_Trend:
High/Low Peak Trend
Author: Elmo Ferrera