Hello,
I'm using an indicator, which marks candle patterns on the chart, and want my EA to buy when a specific pattern in combination with another indicator (e.g. moving average) appears.
What I tried
I tried to use an "For each object"-loop to search for comments on the chart with the right prefix in their name (e.g "Patterns Invert Hammer") and check, if the anchor point of the comment is below a certain moving average. This should result in a buy signal.
The problem is that - after the buy is triggered for the first time - it always immediately re-buys after a sell. I assume the mistake is, that the comment, which cause the first buy signal, is always checked again and results in immediate re-buys.
What I want
Basically, I need a way to check, if the last candle (not the current one) was marked by my indicator as part of a pattern and if that pattern is the one I want. Has someone an idea, how I could do that?
My last version is here: https://fxdreema.com/shared/wAFi5igic