Something along these lines should work:

plot(iif(barindex() >= barcount - 20, x, null), "", colorblue, stylethick);
  ----- Original Message ----- 
  From: L V Gandhi 
  To: [email protected] 
  Sent: March 13, 2010 6:51 PM
  Subject: [amibroker] MTMACD and time band




  I got the following code from Thomasz article on MTF.
  Count = 0;
  result = 0;
  for( i = 10; i <= 300; i++ )
  {
     TimeFrameSet( i * in1Minute );
     m = MACD(12, 26 );
     TimeFrameRestore();
     m = IIf( TimeFrameExpand( m, i * in1Minute ) > 0, 1, -1 );
     result = result + m;
     Count++;
  }
  AddToComposite( result / Count, "~MACD"+Name(), "X" );
  Buy=1;
  x = Foreign("~MACD"+Name(),"C");
  Plot( x, "MTMACD", colorBlue , styleThick ) ;
  PlotGrid(0.5 );
  PlotGrid(-0.5);

  I want to use it for plotting only for a month from the last trading day 
instead of all data. Though I know functions BeginValue and EndValue are there. 
I am not sure of how to use it? Can some point me modifying this in that 
direction, please.



  

Reply via email to