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

[amibroker] Trade not taken



PureBytes Links

Trading Reference Links

I'm trying to figure out why the portfolio backtest is not taking a
particular trade.

I have two similar limit entry scripts. One takes the trade and one
doesn't.
In the one that doesn't take the trade, I am setting BuyPrice to zero
for signals that don't end up as trades. I'm testing a method of
simulating placing orders for only the top eight signals, as opposed
to AB's default of top eight trades. I use the following code for this.

// If trade is not going to be filled, set buy price to zero
BuyPrice = IIf(Buy AND BuyPrice > L, 0, BuyPrice);

I check for the zero price value in the CBT to determine if a signal
is void or not. Obviously there's some side effects to this technique
though.

I have the following settings.
SetBacktestMode (backtestRegularRawMulti);
SetOption( "InitialEquity", 10000);
SetOption( "AccountMargin", 10);
SetOption( "MaxOpenPositions", 100);	
SetOption ("PriceBoundChecking", 0);


I have output some signal information from the CBT for two codes. The
format below is:
ENTRY/EXIT, Bar number, Sym, Price, Type/Reason, PositionSize, DateTime

ENTRY 2: NCM: P(4.24) T(1) PS(-50) (6/01/2000)
ENTRY 3: NCM: P(0) T(1) PS(-50) (7/01/2000)
EXIT 6: NCM: P(4.24396) R(1) PS({EMPTY}) (12/01/2000)

ENTRY 15: TCL: P(2.16) T(1) PS(-50) (25/01/2000)
ENTRY 16: TCL: P(0) T(1) PS(-50) (27/01/2000)
EXIT 18: TCL: P(2.24) R(1) PS({EMPTY}) (31/01/2000)

Although NCM is a signal, seemingly like TCL, the trade is not taken
and I can't work out why. 
I can't see it being a position choice thing as there's plenty of
equity and position slots available.

Can anyone more intimate with the backtesting process shed some light
on where I should be looking. I.e. What are the reasons that phase 2
won't take a trade given that a buy signal is there?

Any guidance much appreciated.
Julian.



Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

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

For other support material please check also:
http://www.amibroker.com/support.html
 
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/