PureBytes Links
Trading Reference Links
|
I don't know what security or periodicity you are looking at but the
code will of course only work for those bars where the two crosses
take place on the same bar ...
Try what is below ... You did say you wanted to see the arrows 2
bars BEFORE the occurence, right ? ... If that is correct then keep
in mind that of course when using real time data the next arrow will
show up on the bar which is two bars before the condition but not
until the condition occurs.
Buy = EMA(C, 10) > EMA(C, 20) AND
EMA(C, 20) > EMA(C, 50);
Sell = EMA(C, 20) > EMA(C, 10) AND
EMA(C, 50) > EMA(C, 20);
Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);
//Plot(C, "C", colorWhite);
Plot(EMA(C, 10), "EMA10", colorBlue);
Plot(EMA(C, 20), "EMA20", colorYellow);
Plot(EMA(C, 50), "EMA50", colorWhite);
PlotShapes(shapeUpArrow * Ref(Buy, 2), colorBrightGreen , C);
PlotShapes(shapeDownArrow * Ref(Sell, 2), colorRed , C);
--- In amibroker@xxxxxxxxxxxxxxx, "thorstef2003" <thorstef2003@xxx>
wrote:
>
> Graham, the code doesn't work. Please copy and paste this in your
AA
> window
>
> Buy=Cross (EMA(Close, 10 ),EMA(Close, 20)) AND
> Cross (EMA(Close, 20 ),EMA(Close, 50));
> PlotShapes(shapeDownArrow*Ref(Buy,-2),colorRed,0,L,-10);
>
> No arrow or error message either.
> Thanks.
> Stef
>
> --- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@> wrote:
> >
> > If you have your system included in a plot then you can just use
> > plotshpaes for the trade signal arrows and reference the signals
> with
> > ref
> > To shift the arrows 2 bars to the right use this
> > plotshapes(shapeuparrow*ref(buy,-2),colorgreen,0,l,-10);
> >
> > you can also use param with the number of bars so you can shift
them
> > back and forward
> >
> > --
> > Cheers
> > Graham
> > AB-Write >< Professional AFL Writing Service
> > Yes, I write AFL code to your requirements
> > http://e-wire.net.au/~eb_kavan/ab_write.htm
> >
> >
> > On 4/2/06, thorstef2003 <thorstef2003@> wrote:
> > > Graham, how do I offset the arrows? Please include the line of
> code to
> > > do this.
> > > Thanks,
> > > Stef
> > > --- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@> wrote:
> > > >
> > > > inlcude the scan code into the chart and offset the arrows
> > > >
> > > > --
> > > > Cheers
> > > > Graham
> > > > AB-Write >< Professional AFL Writing Service
> > > > Yes, I write AFL code to your requirements
> > > > http://e-wire.net.au/~eb_kavan/ab_write.htm
> > > >
> > > >
> > > >
> > > > On 4/1/06, thorstef2003 <thorstef2003@> wrote:
> > > > > Hi,
> > > > > Is it possible to use "plot" in AA to displace the arrows
> > > generated by
> > > > > a scan? Or is there some other way.
> > > > > I want to displace the arrow, to 2 bars earlier.
> > > > > Thanks.
> > > > > Stef
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > 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 other support material please check also:
> > > > > http://www.amibroker.com/support.html
> > > > >
> > > > >
> > > > > Yahoo! Groups Links
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > 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 other support material please check also:
> > > http://www.amibroker.com/support.html
> > >
> > >
> > > Yahoo! Groups Links
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
>
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 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/
<*> 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/
|