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

[amibroker] ApplyStop question



PureBytes Links

Trading Reference Links


I want to have a profit exit and a n-bar exit.

I want the profit exit to occur at the close on the day when the 
close is greater than the EntryPrice*1.05 (5%).

I want the n-bar stop to exit on the next open after 3 days from 
entry (so, on the fourth day's open).

Here is what I'm using:

ApplyStop(stopTypeProfit,stopModePercent,5,0,False,2);

ApplyStop(stopTypeNBar,stopModePercent,3,2,False,2);

Should this get me what I want?  It seems to be working, except that 
the n-bar exit prices are not always exactly the open price.  I can't 
see why they would be off.

A related question:  since I am exiting on Open and Close, why does 
the backtester give me prices that are carried out to 4 decimal 
places?  Such as 20.5432 at the close, instead of the actual close 
price of 20.54?  I have no idea where those extra decimal places are 
coming from.

ts






------------------------ 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/