Please explain your question with examples.
What do you want to do: new indicator or EA based on indicator?
//--- get handle of the Bollinger Bands and DEMA indicators BolBandsHandle=iBands(NULL,PERIOD_M30,bands_period,bands_shift,deviation,PRICE_CLOSE); demaHandle=iDEMA(NULL,PERIOD_D1,dema_period,0,PRICE_CLOSE);
/* Let's make sure our arrays values for the Rates and Indicators is stored serially similar to the timeseries array */ // the rates arrays ArraySetAsSeries(mrate,true); ArraySetAsSeries(demaVal,true); // the indicator arrays ArraySetAsSeries(BBUp,true); ArraySetAsSeries(BBLow,true); ArraySetAsSeries(BBMidle,true);
https://www.mql5.com/en/docs/array/arraysetasseries
ArraySetAsSeries
The function sets the AS_SERIES flag to a selected object of a dynamic array, and elements will be indexed like in timeseries.
Documentation on MQL5: Array Functions / ArraySetAsSeries
- www.mql5.com
Array Functions / ArraySetAsSeries - Documentation on MQL5
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
I am not sure if I am doing this right. In MT4, we collect indictor values and put them into buffer arrays, from what I have picked up in the indicator code for MT5, I see the same thing, for the most part, BUT, I just got done checking out this EA that utilizes iBands. In this code, the author creates array buffers and handles in the EA to collect the data of the iBands.
Do I need to use this method of collecting the values? Could I get away with something like just assigning the specific indicator number value to a variable?
It also seems that I must collect the price into buffer arrays is this also correct? In the case of the above EA, he is using mrate.
Ok these may be stupid questions, but I am going through transition shock, I promise to take my meds.