Dear GP, Here is the whole formula that I was previously using:
LastClose = TimeFrameGetPrice( "C", in5Minute, 0) ; // initialize LastClose Last5Min = TimeFrameGetPrice( "C", in5Minute, -1) ; // initialize Last5Min Diff5Min = LastClose-Last5Min ; // initialize Diff5Min Plot (LastClose, "LastClose", colorBlack, styleThick, Null, Null, 0 ); formula1 = (LastClose)+(Diff5Min) ; // initialize Next5Min Plot ( formula1 , " formula" , colorRed, styleLine , Null, Null , 0 ) ; Here is the whole formula that I am now using after incorporating your advise.. LastClose = TimeFrameGetPrice( "C", in5Minute, 0) ; // initialize LastClose Last5Min = TimeFrameGetPrice( "C", in5Minute, -1) ; // initialize Last5Min Diff5Min = LastClose-Last5Min ; // initialize Diff5Min Plot (LastClose, "LastClose", colorBlack, styleThick, Null, Null, 0 ); formula1 = (LastClose)+(Diff5Min) ; // initialize Next5Min formula1 = IIf(Cum(0)==BarCount, formula1, Null); Plot ( formula1, " formula1" , colorRed , styleThick ); When I use the old formula, I get thick black & red color graphs. When i use the new formula, I get the desired thick black graph but I do not get the single red color dot near the most recent bar of the black graph. By right clicking on the new graph, then selecting Wrap Tilte in Parameters, I got the reason for not getting the dot. It is because value of formula1 = [EMPTY]. But value of formula1 is a positive figure in old graph. Can you please enlighten me where is the mistake, and how to correct it? Thanks, gakkhar ------- Forwarded message ------- From: gp_sydney <[EMAIL PROTECTED]> To: [email protected] Cc: Subject: [amibroker] Re: PLOTTING OUTPUT Date: Mon, 18 Jun 2007 06:57:15 +0530 While I haven't tested it, I don't think there's anything wrong with that statement. It should just plot the value of your formula at only the most recent bar - which means you wouldn't see anything except a single dot, or nothing at all if it was null at that bar. There could be numerous reasons why it's not giving your "desired result", but I would guess it's possibly because your desired result is not really as you've described it. GP --- In [email protected], "Vinay Gakkhar." <[EMAIL PROTECTED]> wrote: > > Dear GP, > > Thanks for your help. But, it is not working. > > I now wrote the following: > > Formula1 = IIf(Cum(1)==BarCount, Formula1, Null); > Plot ( Formula1 , " Formula1" , colorRed , styleThick ); > > It does not give me the desire result. > > Did I write something wrong? > > Best regards, > > gakkhar > > ------- Forwarded message ------- > From: gp_sydney <[EMAIL PROTECTED]> > To: [email protected] > Cc: > Subject: [amibroker] Re: PLOTTING OUTPUT > Date: Sun, 17 Jun 2007 08:14:52 +0530 > > Gakkhar, > > Try adding the following statement before the plot statement: > > Formula1 = IIf(Cum(1)==BarCount, Formula1, Null); > > Then you shouldn't need to include the final "Null, Null, 1" > parameters in the Plot statement. > > Regards, > GP > > > --- In [email protected], "Vinay Gakkhar." <vgakkhar@> wrote: > > > > I am plotting output of my formula in the following way: > > > > Plot ( Formula1 , " Formula1" , colorRed , styleThick , Null, Null , > 1 ) ; > > > > But this gives me a full graph for the entire period for which I > have data. > > > > I want to get only the last one bar of the output to be plotted. > > > > How to do it? > > > > Best regards, > > > > gakkhar > > Please note that this group is for discussion between users only. To get support from AmiBroker please send an e-mail directly to SUPPORT {at} amibroker.com For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: http://www.amibroker.com/devlog/ For other support material please check also: http://www.amibroker.com/support.html Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/amibroker/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/amibroker/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
