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 guys,
I recently develop an indicator that detects support and resistance levels of the 100 previous peaks and troughs. I am trying to implement the data and calculations of this indicator to an EA I am trying to develop but I am having some problems. Since the indicator detects structure levels, it does not output data every candle (just when it identifies a new relevant structure levels).
So the problem I am having, as you might expect, is that when I try to set a buffer to retrieve the data from the indicator, using SetIndxBuffer(), I get my outputs (data/calculations) stored in the most recent candles of the market. By this I mean that the data points from my array SRLevels[], which stores the values where the structure levels were found, are stored within every new candle of the market instead of being stored in the candle of the chart where the new structure level was found (indexed in order). Below I leave attached a picture of my MT5 so that you can understand better (in green you can see the value that I am getting for the first index/candle of the chart). Since I am a newbie, I can understand all the code but I am not completely sure where to implement changes in it, so could you guys help me out?
I have been looking around for other post or articles but I haven't been able to find an answer so if anyone knows how to solve this issue, please do not hesitate to give your thoughts.
Thank you