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

Re: [amibroker] AFL



PureBytes Links

Trading Reference Links

Hi Gary,
 
If you just want to see the arrows on a chart, try inserting the following in your chart code after the Buy-Sell conditions are defined.  It will print arrows (green or red) on your price chart without need to run an explore.  If you have multiple conditions that can trigger a buy (or sell), you could assign a name for each and substitute that name for Buy and give the arrow a different color (e.g., if one buy is triggered by a MA cross over { x= cross(c,ma(c,5) } and another buy is triggered by a close higher than that of 3 prior periods {  Y = c > ref(c,-3) }, each could generate their own arrows or you could accumulate them for a single arrow).   

PlotShapes( IIf( Buy, shapeDownArrow , shapeNone ), colorGreen );

PlotShapes( IIf( Sell, shapeDownArrow , shapeNone ), colorRed );

Hope this helps.
 
Peace and Justice   ---   Patrick
----- Original Message -----
Sent: Tuesday, June 14, 2005 5:59 AM
Subject: [amibroker] AFL

I need someone to help me with this simple AFL formula.

As buy and sell signals are triggerred by the Buy and Sell formulas,
when I clicked the 'Explore' button in the 'Automatic Analysis'
window, I will get so many lines for each symbol.
If I only want to have the summary list, which is only 1 symbol per-
line in the results pane, how do I do this?
(I just want to see all the trades/arrow in the chart, not in the
results pane).

Thanks,

Gary


Here is the AFL:
----------------
Filter = C >= 15 AND MA(V, 20) >= 250000;

Buy=Cross( MACD(), Signal() );
Sell=Cross( Signal(), MACD() );

AddColumn(C, "Close");




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





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