View Single Post
  #8 (permalink)  
Old 08-23-2007, 01:29 AM
fxbs fxbs is offline
Senior Member
 
Join Date: Jan 2007
Location: not so remote
Posts: 1,957
fxbs is on a distinguished road
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);

Last edited by fxbs; 08-23-2007 at 04:23 AM.
Reply With Quote