- 2013.01.02
- Anatoli Kazharski
- www.mql5.com
- Why This iFractal didn't work
- Coding help
- getting the close for a specific bar
You only have to modify that script, by adding access to indicator handles that you want (through iCustom() function). Then, have to copy indicator(s) buffer to an array (through CopyBuffer() function) and to add the suitable column(s) to the file with its / their data.
Regards.
You only have to modify that script, by adding access to indicator handles that you want (through iCustom() function). Then, have to copy indicator(s) buffer to an array (through CopyBuffer() function) and to add the suitable column(s) to the file with its / their data.
Regards.
but the problem is : I have all quotes loaded in custom array named as Rate How I can pass the custom quotes to Icustom and make calc of average I try do It
double close[]; ArrayResize(_ma1,ArraySize(rates)); for (int i = 0;i<= ArraySize(rates)-1;i++) { _ma1[i] = rates[i].close; } SetIndexBuffer(0,_ma1,INDICATOR_DATA); int MA1 = iCustom(NULL,0,"Examples\Custom Moving Average", 3, // Period 0, // Offset MODE_SMA, // Calculation method PRICE_CLOSE); // Calculating on Close prices CopyBuffer(MA1,0,0,ArraySize(rates),_ma1); ArraySetAsSeries(_ma1,true); for (int i=0;i< ArraySize(_ma1)-1;i++) { Print("data " + TimeToString( rates[i].time) + " valor " + rates[i].close +" ma " + DoubleToString(_ma1[i])); } }
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use