adding 

setbarsrequired(10000,10000) 

to the code will help.

Also your loop can be replaced with:

bi = barindex();
Line = iif(bi < 10 or bi > 100,0,1);



  ----- Original Message ----- 
  From: richard_m_ferri 
  To: [email protected] 
  Sent: Monday, October 13, 2008 12:45 AM
  Subject: [amibroker] how can i resolve this?


  I have same big problem using trading system charts. All the problem
  is caused by a strange program behavior summarized by the follow example. 

  for( i = 0; i < BarCount; i++ )
  { 
  if ( i < 10 OR i > 100) Line[ i ] = 0;
  else Line[ i ] = 1;
  }

  Plot( Line, "test", colorBlack, styleLine);

  If I zoom at the start of the chart it's all ok.
  When I move through the zoomed chart from left to right the value of
  the line is 1 even after 100 bars.
  How can I avoid this? what is wrong?

  Amibroker 5.10 installed on Windows XP Pro SP3



   

Reply via email to