Topics concerning MT4 and MQL4 have their own section.
In future please post in the correct section.
I have moved your topic to the MQL4 and Metatrader 4 section.
Your code | Documentation | |
---|---|---|
SlopeBuffer[i] = (iMA( Symbol(), PERIOD_CURRENT, MAPeriod, i, MA_Method, MA_Price, 0 ) | iMA( Symbol(), PERIOD_CURRENT, MAPeriod, i-MAPeriod, MA_Method, MA_Price, 0 ))/ | double iMA( string symbol, // symbol int timeframe, // timeframe int ma_period, // MA averaging period int ma_shift, // MA shift int ma_method, // averaging method int applied_price, // applied price int shift // shift ); |
William Roeder:
You have confused shift (which bar you are looking at) with a Displaced Moving Average.
You have confused shift (which bar you are looking at) with a Displaced Moving Average.
Yes, I forgot that iMA only has one buffer and thinking that last shift is for buffer already changed it. But still the Y axis still in price 0.0003 etc, is there a way to change it into bound range like 100 to -100? Tried using indicator_minimum and indicator_maximum and still no result.
Hi everyone,
this is my first time creating custom indicator. Here's my code:
Here I create a simple MA slope. I want it to be like CCI indicator where the Y axis is bound to max 100 and min -100. This code generate a MA slope with price as Y axis, how can I change it into a number instead of price?