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

[amibroker] Applystop question



PureBytes Links

Trading Reference Links

I'm using the below code to exit a trade, either when a predefined level is hit or Nbars 
after entry
In a backtest, the predefined exit works as it should, but if the applystop is triggered, 
the price is always the *low* of the bar. Yet in the Trade settings I have trade exit set 
to "Close 0" I know Applystop evaluates the bar price in certain order, but I can't find 
the references in the archives to see how I can fix this.

...............
...............
Sell = C < S1 ;
SellPrice = S1 - 0.0001;
//========================================

ApplyStop(stopTypeNBar,stopModeBars,EBars);

//========================================

PositionSize = MarginDeposit = 1;
PointValue = 10000;
Equity(1); 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/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/