PureBytes Links
Trading Reference Links
|
You can experiment by adding the following two lines to the end of
the script:
Filter = Buy OR Sell;
AddTextColumn(WriteIf(Buy, "Buy", "Sell"), "Action");
Using an exploration with that will show only the stocks that have a
buy or a sell signal for the bar of the exploration.
If you want to see all stocks (i.e. even those that have no signal
for the bar), then change the lines to:
Filter = 1;
AddTextColumn(WriteIf(Buy, "Buy", WriteIf(Sell, "Sell", "No
Signal")), "Action");
Documentation for all the methods used above can be found here:
http://www.amibroker.com/guide/afl/afl_index.php?m=1
Mike
--- In amibroker@xxxxxxxxxxxxxxx, "Vinay Gakkhar." <vgakkhar@xxx>
wrote:
>
> Dear Mike,
>
> Can you please also write the AddColumn so that if one runs the
> exploration in automatic analysis, one gets either uparrow or
downarrow or
> noarrow?
>
> Thanks,
>
> vgakkhar
>
> On Sun, 31 Aug 2008 09:36:20 +0530, Mike <sfclimbers@xxx> wrote:
>
> > Hi,
> >
> > No need for using BarIndex or LastValue. As Bill suggested
earlier,
> > just set the Buy/Sell and use PlotShapes to draw all the arrows at
> > the Buy/Sell signal. Cross is the correct function to use for your
> > signals.
> >
> > periods = Param("Periods", 21, 2, 200, 1 );
> > ROCpds = ROC( C, periods );
> > ROCadj = periods * EMA( ROC( C, 1 ), periods );
> >
> > Buy = Cross( ROCadj, ROCpds );
> > Sell = Cross( ROCpds, ROCadj );
> >
> > Plot( ROCadj, "ROCadj "+periods, colorRed, styleThick );
> > Plot( ROCpds, "ROC "+periods, colorBrightGreen );
> >
> > PlotShapes( IIF( Buy, shapeUpArrow, shapeNone ),
colorBrightGreen );
> > PlotShapes( IIF( Sell, shapeDownArrow, shapeNone ), colorRed );
> >
> > Mike
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "aboaziz_sa" <aboaziz_sa@>
wrote:
> >>
> >> this will do!
> >>
> >>
> >>
> >> crossup= Cross( ROCadj , ROC( C, periods )) ;
> >> crossdown= Cross( ROC( C, periods ), ROCadj ) ;
> >> x = LastValue(ValueWhen(crossup, BarIndex(), 1));
> >> PlotShapes(IIf(BarIndex() == x, shapeUpArrow, Null),
> > colorBrightGreen);
> >> y = LastValue(ValueWhen(crossdown, BarIndex(), 1));
> >> PlotShapes(IIf(BarIndex() == y, shapeDownArrow, Null), colorRed);
> >>
> >
> >
>
------------------------------------
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/
|