Perhaps you should read the manual.
Your code |
Documentation |
---|---|
S1a[i] = iMA( NULL, MA_TF, MA1_Period, MA_ma_shift, MA_ma_method, High[0], shift ); |
double iMA( string symbol, // symbol ENUM_TIMEFRAMES timeframe, // timeframe int ma_period, // MA averaging period int ma_shift, // MA shift ENUM_MA_METHOD ma_method, // averaging method ENUM_APPLIED_PRICE applied_price, // applied price int shift // shift ); |
plus...
if you want to use this indicator on chart window ( your code so..) you should divide 2 to S1 and S2
S1[i] = (S1a[i] + S1b[i])/2; S2[i] = (S2a[i] + S2b[i])/2;
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
Trying to plot a line that is a sum of 2 SMA output.. Tried using the code below.. can anyone advise how to rectify?
thanks!