You can not specify "Median" as the applied price of a signal. Because the signal is the average of MA.
int i,limit; if(prev_calculated==0) limit=rates_total-5; else limit=rates_total-prev_calculated+1; for(i=limit; i>=0; i--) MA_Buffer[i]=iMA(NULL,PERIOD_CURRENT,5,0,MODE_LWMA,PRICE_CLOSE,i); for(i=limit; i>=0; i--) SIG_Buffer[i]=iMAOnArray(MA_Buffer,0,5,0,MODE_LWMA,i);
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
The indicator setting is like this:
1. Moving Average Period:5 Method: Linear Weighted Apply to: Close
2. Moving Average Period:5 Method: Linear Weighted Apply to: Median
then change Apply to: Previous Indicator's Data
How to create a indicator that can give us signal when this two MA crossover?
Thank.