for(x=0;x<9;x++) { double MACD_gradient = (iMACD(Symbol(),period[x],FastMACD,SlowMACD,SignalMACD,PRICE_CLOSE,MODE_MAIN,Bar_last+1)- iMACD(Symbol(),period[x],FastMACD,SlowMACD,SignalMACD,PRICE_CLOSE,MODE_MAIN,Bar_now))/(Bar_last+1-Bar_now); ... }
What are you doing when .......
The loop will end with one value for MACD_gradient and that is for the last calculated period[9] (Weekly?? )
Also we don't have a definition for (Bar_last+1-Bar_now)
sunshineh:
If you use any timeframe in the calculations other than H1 (for example the chart timeframe) then it will possibly change . . . you don't show your code so I can't be certain though.
I also want to show the intercept point of two MAs in H1:
Also this interception point changes when I change my Timeframe. I thought this should be the same every timeframe!
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
Hi,
I am programming an indicator table which shows my the gradient of the macd.
Here I have a few problems:
As the result of the MACD_gradient I show different widgets.
With other Indicator it works but not with the MACD. But I don't know why. How can I normalize the MACD?
I also want to show the intercept point of two MAs in H1:
Also this interception point changes when I change my Timeframe. I thought this should be the same every timeframe!