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

[amibroker] Re: Backtester is opening positions at bar *low*, not at *close*


  • Date: Wed, 30 Dec 2009 06:32:53 -0000
  • From: "Mike" <sfclimbers@xxxxxxxxx>
  • Subject: [amibroker] Re: Backtester is opening positions at bar *low*, not at *close*

PureBytes Links

Trading Reference Links

There is a setting in AA Settings that prevents taking a position if your volume exceeds a certain threshold of the bar's volume. If you were right on the cusp of that threshold with a lessor commission, perhaps with the greater commission (fewere units, same total price)  you squeeked under the limit and took the trade.

Best way to compare is to set AA Settings reporting to detailed, then run under both scenarios and compare the output. You will see why each signal was accepted/rejected.

Mike

--- In amibroker@xxxxxxxxxxxxxxx, Potato Soup <potatosoupz@xxx> wrote:
>
> Well I have my account balance at $350k and I'm trading no more than $30k max in positions, how on earth could it skip a trade with that? I am using 2:1 margin but with that ratio of capital to exposure it should be impossible to have an effect. What else could be the reason?
> 
> Also I have no changes or uses of BuyPrice/SellPrice and I have trade delays set to 0 for all four types of orders.
> 
> Given all that, what other reasons could cause this behavior? 
> 
> Thanks for your help, as always.
> 
> 
> 
> 
> ________________________________
> From: Mike <sfclimbers@xxx>
> To: amibroker@xxxxxxxxxxxxxxx
> Sent: Tue, December 29, 2009 11:52:48 PM
> Subject: [amibroker] Re: Backtester is opening positions at bar *low*, not at *close*
> 
> 1. Changing *any* setting related to pricing can affect your trades. All it takes is one penny too little in your account to prevent the taking of a trade, which in turn would mean having more funds available for the next opportunities (i.e. able to take other trades) that would not have been there if the original trade were able to be taken at a penny less.
> 
> 2. If you've confirmed that the AA Settings window has the trade price marked as Close, and that you have not put in an override in your AFL code (look for BuyPrice, SellPrice and Signal alteration in custom backtester code), then check too that you have not set any trade delays. A trade delay will cause the next bar(s) price to be used which will likely be different than that of the bar on which the signal was triggered.
> 
> Mike
> 
> --- In amibroker@xxxxxxxxxxxxxxx, Potato Soup <potatosoupz@> wrote:
> >
> > Now this is really weird. I just ran the backtester again and also noticed that the trade opening and closing is happening on the LOW of bars that have signals, not on the CLOSE, as I've defined it in the settings for the backtester. I have it set to execute trades on Close for all four parameters (buy,sell,short,cover).
> > 
> > Why would this be happening? I haven't overriden it in my AFL either. It's completely throwing off the results of the test. Obviously there's no way to know what the low of a bar would be until the bar is complete, and in the past.
> >
> 
> 
> 
> 
> ------------------------------------
> 
> **** 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
>




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

**** 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:
    amibroker-digest@xxxxxxxxxxxxxxx 
    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/