[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: PLOTTING OUTPUT



PureBytes Links

Trading Reference Links

I can't do that as it's dependant on the actual formulas.

Take a look in the files area here at the file called "Looping in
AmiBroker AFL.pdf". That should help you learn how to do it yourself.

GP


--- In amibroker@xxxxxxxxxxxxxxx, "Vinay Gakkhar." <vgakkhar@xxx> wrote:
>
> Dear GP,
> 
> This is all that I wrote:
> 
> bar = Cum(1);
> NextBar = IIf(bar==BarCount, Next1Bar, Null);
> NextBar = IIf(bar==BarCount-1, Next2Bar, NextBar);
> NextBar = IIf(bar==BarCount-2, Next3Bar, NextBar);
> NextBar = IIf(bar==BarCount-3, Next4Bar, NextBar);
> NextBar = IIf(bar==BarCount-4, Next5Bar, NextBar);
> NextBar = IIf(bar==BarCount-5, Next6Bar, NextBar);
> NextBar = IIf(bar==BarCount-6, Next7Bar, NextBar);
> NextBar = IIf(bar==BarCount-7, Next8Bar, NextBar);
> NextBar = IIf(bar==BarCount-8, Next9Bar, NextBar);
> NextBar = IIf(bar==BarCount-9, Next10Bar, NextBar);
> NextBar = IIf(bar==BarCount-10, Next11Bar, NextBar);
> NextBar = IIf(bar==BarCount-11, Next12Bar, NextBar);
> Plot (NextBar, "NextBar", colorRed, styleThick ) ;
> 
> Yes, Next1Bar is for the most recent bar and the others are working
backwards:
> 
> And, yes, all the formula are the same or closely related.
> 
> I have noted your suggestion for using a loop but even after
studying Help, unfortuntely could not understand how to do this.
> 
> If you may please help and write what exactly I should copy-paste.
> 
> Thanks.
> 
> gakkhar
> 
> ------- Forwarded message -------
> From: gp_sydney <gp.investment@xxx>
> To: amibroker@xxxxxxxxxxxxxxx
> Cc:
> Subject: [amibroker] Re: PLOTTING OUTPUT
> Date: Sun, 24 Jun 2007 08:12:49 +0530
> 
> Merge the results before plotting for a single line. Assuming Next1Bar
> is for the most recent bar and the others are working backwards:
> 
> bar = Cum(1);
> NextBar = IIf(bar==BarCount, Next1Bar, Null);
> NextBar = IIf(bar==BarCount-1, Next2Bar, NextBar);
> NextBar = IIf(bar==BarCount-2, Next3Bar, NextBar);
> etc.
> 
> Then plot NextBar.
> 
> It may be more efficient to do this using a loop though, particularly
> if all the formula are the same or closely related.
> 
> GP
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Vinay Gakkhar." <vgakkhar@> wrote:
> >
> > Dear GP,
> >
> > Sorry to bother you again.
> >
> > Having replaced "Formula1" with "Next1Bar", I have written the
> following formula:
> >
> > Next1Bar = IIf(Cum(1)>BarCount-1, Next1Bar, Null);
> > Plot ( Next1Bar, " Next1Bar" , colorRed , styleline );
> >
> > After this I have added 11 new formulas by replacing "Next1Bar" with
> "Nexr2Bar", "Next3Bar" etc upto "Next12Bar".
> >
> > I want their results to appear in one single red color line graph
> which should start from the first bar & go upto 12th bar.
> >
> > I have tried it by keeping the value of (1) in "IIf(Cum(1) always
> (1), also by changing it from (1) to (21) to (12), I have also tried
> it by keeping value of BarCount-1 always 1, also by changing it from 1
> to 12, but I always get 12 dot graphs.
> >
> > Can you please tell me what mistake am I committing and how to
> rectify it?
> >
> > Regards,
> >
> > gakkhar
> >
> >
> > ------- Forwarded message -------
> > From: gp_sydney <gp.investment@>
> > To: amibroker@xxxxxxxxxxxxxxx
> > Cc:
> > Subject: [amibroker] Re: PLOTTING OUTPUT
> > Date: Tue, 19 Jun 2007 06:35:54 +0530
> >
> > Gakkhar,
> >
> > For 'n' bars:
> >
> > Formula1 = IIf(Cum(1)>BarCount-n, Formula1, Null);
> >
> > GP
> >
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "Vinay Gakkhar." <vgakkhar@> wrote:
> > >
> > > Dear GP,
> > >
> > > If, instead of 1 bar, I want 2 or 3 bars, what change should I make
> > in the formula?
> > >
> > > gakkhar
> > >
> > > ------- Forwarded message -------
> > > From: gp_sydney <gp.investment@>
> > > To: amibroker@xxxxxxxxxxxxxxx
> > > Cc:
> > > Subject: [amibroker] Re: PLOTTING OUTPUT
> > > Date: Tue, 19 Jun 2007 04:03:44 +0530
> > >
> > > Gakkhar,
> > >
> > > My statement:
> > >
> > > > Formula1 = IIf(Cum(1)==BarCount, Formula1, Null);
> > >
> > > Your statement:
> > >
> > > > formula1 = IIf(Cum(0)==BarCount, formula1, Null);
> > >
> > > Spot the difference...
> > >
> > > GP
> > >
> >
>




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:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/