i changed this code in bollinger bands
to this code so that it takes input from T3MA
a 1 line modification, but it did not work, please guide what i missed
Inserted Code
//--- main cycle
for(i=pos; i<rates_total && !IsStopped(); i++)
{
//--- middle line
ExtMovingBuffer[i]=SimpleMA(i,InpBandsPeriod,close);
//--- calculate and write down StdDev
ExtStdDevBuffer[i]=StdDev_Func(i,close,ExtMovingBuffer,InpBandsPeriod);
//--- upper line
ExtUpperBuffer[i]=ExtMovingBuffer[i]+InpBandsDeviations*ExtStdDevBuffer[i];
//--- lower line
ExtLowerBuffer[i]=ExtMovingBuffer[i]-InpBandsDeviations*ExtStdDevBuffer[i];
//---
}
//---- OnCalculate done. Return new prev_calculated.
return(rates_total);
}
//+------------------------------------------------------------------+ to this code so that it takes input from T3MA
Inserted Code
//--- main cycle
for(i=pos; i<rates_total && !IsStopped(); i++)
{
//--- middle line
ExtMovingBuffer[i]=iCustom(Symbol(),0,"T3MA",13,0.7,0,i);
//--- calculate and write down StdDev
ExtStdDevBuffer[i]=StdDev_Func(i,close,ExtMovingBuffer,InpBandsPeriod);
//--- upper line
ExtUpperBuffer[i]=ExtMovingBuffer[i]+InpBandsDeviations*ExtStdDevBuffer[i];
//--- lower line
ExtLowerBuffer[i]=ExtMovingBuffer[i]-InpBandsDeviations*ExtStdDevBuffer[i];
//---
}
//---- OnCalculate done. Return new prev_calculated.
return(rates_total);
}
//+------------------------------------------------------------------+ a 1 line modification, but it did not work, please guide what i missed
do not follow me 99.9999999% of times, rest you can lol