[Help] My force index formula didn't match MQL Force Index Indicator line
I tried to experimented many indicators formula but when I created force index without using iForce function the indicator line is not same as the original MQL Force Index indicator.
You see in above screenshot that my force index line is reverse.
From the documentation:
Timeseries are arrays with reverse indexing, i.e. the first element of a timeseries is in the extreme right position, and the last element is in the extreme left position. Timeseries being used for storing history price data and contain the time information, we can say that the newest data are placed in the extreme right position of the timeseries, while the oldest data are in the extreme left position.
Thus, your prev_close should be calculated on i+1.
From the documentation:
Timeseries are arrays with reverse indexing, i.e. the first element of a timeseries is in the extreme right position, and the last element is in the extreme left position. Timeseries being used for storing history price data and contain the time information, we can say that the newest data are placed in the extreme right position of the timeseries, while the oldest data are in the extreme left position.
Thus, your prev_close should be calculated on i+1.
Thanks.. its work now.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
[Help] My force index formula didn't match MQL Force Index Indicator line
I tried to experimented many indicators formula but when I created force index without using iForce function the indicator line is not same as the original MQL Force Index indicator.
You see in above screenshot that my force index line is reverse.