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

Re: [amibroker] Re: help needed for this formula



PureBytes Links

Trading Reference Links

Thank you all for your help......

On Sun, Aug 31, 2008 at 9:41 PM, Mike <sfclimbers@xxxxxxxxx> wrote:

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




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___