Thanks for your response and your time. Will it not check all bars? second as this is Multitime frame calculations for data of 1 min candles, will barcount-20 be useful? Hence my request to use bars say 15 feb to 15 mar or dynamically changing last trade day from one month before last trade day.
On Sat, Mar 13, 2010 at 4:19 PM, wavemechanic <[email protected]> wrote: > > > *Something along these lines should work:* > ** > *plot(iif(barindex() >= barcount - 20, x, null), "", colorblue, > stylethick);* > > ----- Original Message ----- > *From:* L V Gandhi <[email protected]> > *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. > > >
