and seriously, thank you, guys - Rsioma - Kalenzo's and our Forum's baby
thanks a lot
Below: Mladen's comments on code change:
Quote:
|
Originally Posted by mladen
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);
|