Extra Buffer Example by CodersGuru
Coders Guru once did an indicator which required more than 8 buffers. I have attached it. Maybe it might help.
Metatrader bug no.nnn?
Just found out a workaround on Metatrader stuppidity no.???
if anyone uses arrays in code set as series, be sure to unset it as series before resizing if you want to save values stored in the array, in short
if you have anywhere in code something like this
ArraySetAsSeries(Buffer,true);
[/PHP]
later on the code
ArrayResize(Buffer,Bars);
produces wrong array as result, you must use
[PHP]
ArraySetAsSeries(Buffer,false);
ArrayResize(Buffer,Bars);
ArraySetAsSeries(Buffer,true);
Coders Guru once did an indicator which required more than 8 buffers. I have attached it. Maybe it might help.
Thank you, Waltini! I was looking for example, but when you need it, you can't find it!
Here you go
How is this indicator interpreted/used?
What are the blue dots,blue lines and magenta lines for?
Thank you
thanks Mladen!
You guys good - can crack any of their dem code with restrictions ....
unbelievable - 2 hack mt4 jus' like that ...
How is this indicator interpreted/used?
post1 - link to RSI of MA thread; all explenations are there
and seriously, thank you, guys - Rsioma - Kalenzo's and our Forum's baby
thanks a lot
Below: Mladen's comments on code change:
buffer+
PHP Code:
double marsioma[];
double marsiomaXSig[];
//
//
// add this one
datetime lastBarTime;
//double marsiomaXdnSig[];
PHP Code:
ArraySetAsSeries(MABuffer1,true);
// SetIndexBuffer(7,MABuffer1);
PHP Code:
int start()
{
int i, ii;
int counted_bars=IndicatorCounted();
double rel,negative,positive;
//-------
if (lastBarTime != Time[0]) {
lastBarTime = Time[0];
ArrayResize(MABuffer1,Bars);
}
//-------
if(Bars<=RSIOMA) return(0);
______________________________________________________
and add these line in init
------------------------------------------
PHP Code:
ArraySetAsSeries(MABuffer1,true);
//
// these lines
// need to empty the buffer when changing
// time frames or accounts
//
ArrayResize(MABuffer1,Bars);
ArrayInitialize(MABuffer1,EMPTY_VALUE);
// SetIndexBuffer(7,MABuffer1);
//| please, keep your code tidy. mladen |
//+--------------------------------------------------------------------------------+
// The base for this indicator was orginal RSI attached with Metatrader.
// ^^ removed ^^ : )|-< Hornet
ok, we'll try

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Rsioma (RSI of MA) needs one more buffer 4 signals
may be if some wizard have nothing better to do...
i know somehow it possible avoid 8 buff restriction through Maonarray, but i couldn't - didn't finish wizard's school
plus one buffer used only 4 RSI calc... (code, link and indi below)
PS very nice little indi - rsioma
more: Thread RSI of MA pos126 https://www.mql5.com/en/forum/177347/page9