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

[amibroker] System entry on current bar



PureBytes Links

Trading Reference Links

I couldn't find where it was but am sure this was already addressed:
how to code/backtest an entry signal in such a way that the entry is done on the current bar, and NOT the next bar?
Also, how to code an exit at close on this same "current" bar??

Actually, I want to test an idea developed in S&C last month which is to enter atopen if this open is below the close the day (bar) before. Something like 
PlotShapes( IIf (O < Ref(C,-1) , shapeuparrow , shapeNone ),colorGreen ); 
Buy=  O < Ref(C,-1);
Sell=Buy;//here I would like to exit this same bar but at close... 

When I code it this way it works (the up arrow shows well on the right bar) but in the backtest the entry is made on the next bar.

Thank you for any help!

Carl



------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

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