Hi All,

Could anyone tell me why ALWAYS anything returned by ATR() is 0.0 within the 
for loop in the Custom Backtester? I will be extremely grateful for your hints 
here.

regards 

/* CODE */
SetCustomBacktestProc("");
if( Status("action") == actionPortfolio ){
   bo = GetBacktesterObject();
   bo.InitialEquity = 100000;
   bo.PreProcess();             
   Vlt = ATR(5);
   for( i = 10; i < BarCount; i++ )     {
      for( sig = bo.GetFirstSignal( i ); sig; sig = bo.GetNextSignal( i ) ) 
      {
         sig.PointValue = 10;   
         currentRisk = bo.Equity * risk;
         sig.MarginDeposit = 1; 
         a = Vlt[i];    // a==0 ALWAYS HERE - WHY??     
         sig.PosSize =  a+1;
      }
   bo.ProcessTradeSignals( i );
   }
   bo.PostProcess();
}

Reply via email to