I have an indicator that plots an arrow below/above a candlestick whenever the candle has closed AND crossed over the moving average.
My problem:
The arrow should be ploted above/below the candle and usually it does so. But sometimes the arrow is ploted ON the candle, and that's my problem. What causes this and how can i fix this?
I realized that this happens usually when a candle lacks or has a very small wick/shadow.
Indicator and screenshot are attached.
And I also want to ask is the whole code correctly written? Any need of deinitialize anything etc?
Thank you!
My problem:
The arrow should be ploted above/below the candle and usually it does so. But sometimes the arrow is ploted ON the candle, and that's my problem. What causes this and how can i fix this?
I realized that this happens usually when a candle lacks or has a very small wick/shadow.
Indicator and screenshot are attached.
And I also want to ask is the whole code correctly written? Any need of deinitialize anything etc?
Thank you!
Attached File(s)
MA Cross Arrow Alert.mq4
3 KB
|
826 downloads