I’m trying to create an algorithm based on the divergences.
I tried to call divergence indicators (RSI or MACD) found on the site but it doesn’t work, I think the error comes from my code.
For example I tried to call the indicator “DivergenceRSIWithLookback”, and to indicate as conditions to buy if the indicator is > to 0 and the close is > to the highest of the previous candle, or to short if the indicator is < to 0 and the close is < to the lowest of the previous candle, But this does not give any trade. I removed the conditions close >high [1] and close
I removed the variables from the indicator to integrate them directly into the code but it still didn’t work. It still doesn’t work.
Here are the indicator and the strategy in itf.
Can someone help me solve this problem? 🙂
Do not double post. Ask your question only once and only in one forum. All double posts will be deleted anyway so posting the same question multiple times will just be wasting your own time and will not get you an answer any quicker. Double posting just creates confusion in the forums.