I have found a divergence indicator which i would like to code into an EA, which buys when a green arrow appears and sells when a red arrow appears. The arrows both have buffer numbers, but when i run a simple EA that prints the buffer values at each candle, the value is always 2147483647.0 whether an arrow is placed on the current candle or not. Could someone please help me, i just need the EA to be able to enter a trade when the arrow appears.
I have attached the indicator and also a screenshot.
Then they are arrow objects.
when i look on objects list there is no arrows shown
I have found a divergence indicator which i would like to code into an EA, which buys when a green arrow appears and sells when a red arrow appears. The arrows both have buffer numbers, but when i run a simple EA that prints the buffer values at each candle, the value is always 2147483647.0 whether an arrow is placed on the current candle or not. Could someone please help me, i just need the EA to be able to enter a trade when the arrow appears.
I have attached the indicator and also a screenshot.
exp:
if (bullishDivergence[0]>0 && bullishDivergence[0]!=2147483647) Alert("SELL");
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have found a divergence indicator which i would like to code into an EA, which buys when a green arrow appears and sells when a red arrow appears. The arrows both have buffer numbers, but when i run a simple EA that prints the buffer values at each candle, the value is always 2147483647.0 whether an arrow is placed on the current candle or not. Could someone please help me, i just need the EA to be able to enter a trade when the arrow appears.
I have attached the indicator and also a screenshot.