Hi, I'm trying to code (mql4) a change of direction on the ATR as part of the conditions to enter a trade. Could someone please point me in the right direction ? TIA
In future please post in the correct section
I will move this topic to the MQL4 and Metatrader 4 section.
Matthew Williams: 'm trying to code (mql4) a change of direction on the ATR
ATR is an average distance price moved per candle, (true range) There is no direction. What is the direction of the size of your screen?
Keith Watford:
Apologies
In future please post in the correct section
I will move this topic to the MQL4 and Metatrader 4 section.
William Roeder:
Let me try and be more specific. The change of direction of the line in the indicator window, from pointing down to up or visa versa.
ATR is an average distance price moved per candle, (true range) There is no direction. What is the direction of the size of your screen?
Matthew Williams: Let me try and be more specific.
And your problem is?
Matthew Williams:
Let me try and be more specific. The change of direction of the line in the indicator window, from pointing down to up or visa versa.
Let me try and be more specific. The change of direction of the line in the indicator window, from pointing down to up or visa versa.
You mean if it's increasing or decreasing?
Just compare previous offset values... so:
iATR(NULL, 0, 12, 1) > iATR(NULL, 0, 12, 2) is increasing
iATR(NULL, 0, 12, 1) < iATR(NULL, 0, 12, 2) is decreasing
iRick:
Thank you. That's exactly what I was looking for.
You mean if it's increasing or decreasing?
Just compare previous offset values... so:
iATR(NULL, 0, 12, 1) > iATR(NULL, 0, 12, 2) is increasing
iATR(NULL, 0, 12, 1) < iATR(NULL, 0, 12, 2) is decreasing
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