int handle; double MACD[1]; int OnInit() { handle=iMACD(NULL,0,12,26,9,PRICE_CLOSE); void OnTick() { if(CopyBuffer(handle,0,5,1,MACD)>0) printf("Value of iMACD index[5] = %f",MACD[0]);
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 searched for a simple way to calc the macd (iMACD) for the last bar (or for a given bar number) but couldn't find a clear solution for that. The documentation got me confused.
Can someone show me one simple example please?
thanks