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

Re: [amibroker] Simple formula help please



PureBytes Links

Trading Reference Links

from the online afl reference - applystop. Just check which sell==? to apply
You can find this online in Equity of added comment in applystop

Corey Saxe
csaxe@xxxxxxx
2003-03-01 23:33:13 
For visual conformation of ApplyStop function, add the following lines
below your ApplyStop formula in Indicator Builder:

Equity(1); // THIS EVALUATES STOPS

Plot(Sell==4,"ApplyStop Sell",colorRed,1|styleOwnScale);


On Wed, 16 Feb 2005 11:25:54 +1100, Keith Osborne
<kosborn3@xxxxxxxxxxxxxx> wrote:
> 
> 
> I am trying to buy if the close is less than 90% of the close 2 days ago and
> sell 20 days later (my formula below). As the chart above shows the 1st buy
> arrow but no sell arrows. When I run backtest it shows the sell 20 bars
> later as it should. Can anyone help me as to why the sell arrow does not
> display? I assume that as there is not sell arrow then there are no
> subsequent buy.
> 
> I am sure it is a stupid mistake on my part but I cannot see it!
> 
> Thanks....Keith
> 
> 
> // Buy on the Dips system //
> 
> Filter = 1;
> 
> SetOption("initialequity", 200000);
> SetOption("maxopenpositions", 15);
> SetTradeDelays(1,1,1,1);
> SetChartOptions(1,Chartshowarrows);
> PositionSize = 20000;
> 
> CLdown = Optimize("% Down", 0.90,0.75,1.0,0.025);
> 
> Buy = Close < CLdown * Ref(Close,-2);
> Sell = 0;
> 
> Buy = ExRem(Buy,Sell);
> Sell = ExRem(Sell,Buy);
> 
> ApplyStop(stopTypeNBar, stopModeBars, 20);
> 
> Plot(Close, "Close", colorRed,styleBar);
> PlotShapes(shapeUpArrow * Buy + shapeDownArrow * Sell, IIf(Buy,
> colorBrightGreen, colorYellow));
> 
> 
> 
> Check AmiBroker web page at:
> http://www.amibroker.com/
> 
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> 
> 
> Yahoo! Groups Sponsor
> ADVERTISEMENT
> 
> ________________________________
> 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 the Yahoo! Terms of Service. 


-- 
Cheers
Graham
http://e-wire.net.au/~eb_kavan/


------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/