PDA

View Full Version : Default Vs Market order


Peter_H
11th July 2004, 02:46 AM
Could you please help me with this question about Tradesim.

If I use the following setup:

- 2% fraction of capital risked per trade
- 8% of capital minimum trade size
- Use the OPEN price (to buy at) and order type DEFAULT

Say the trade size is reduced due to the 2% risk per trade and the trade size is less then 8% of capital, then the trade will be rejected.

My question is...

If I change the order type to MARKET order and a random LOWER price (not the OPEN) is picked where the trade size is now greater then 8% (min. trade size), will this trade be allowed?

Sorry if it's in the manual, I couldn't find it.

Regards P

Peter_H
12th July 2004, 05:38 AM
Hmmm, doesn't it make sense?

Let me know and I'll give more explanation.

P

David Samborsky
14th July 2004, 03:25 AM
Good question.

Whatever entry price is ultimately used if the position value falls below the minimum requirement then the trade will be rejected.

Also risk = TargetEntryPrice - InitialStop.

PosSize = TradeRisk/risk;
PosValue= PosSize x ActualEntryPrice;

where TradeRisk is 2% of available capital etc.

Now if the ActualEntryPrice is lower than the TargetEntryPrice then the PositionValue will be lower and of course the trade will be rejected if it falls below the threshold.

Note that risk is never recalculated when the ActualEntryPrice changes because when you go to market you dont know what price you get filled at so its not possible or practical to recalculate the position size on the fly in order to maintain a target risk value.

Peter_H
14th July 2004, 05:31 AM
Hi David,

Thankyou very much for your reply and I understand (I think).

This may make it clearer as to why I asked this question:

If Tradesim did use a random Market Order to change the "TargetEntryPrice" and therefore risk, then in actual trading I thought I might be able to adjust the "TargetEntryPrice" to see what price gave an acceptable risk and simply place a limit order with my broker at that price. This would only be if the OPEN was outside an acceptable risk.

For example, if ABC opened at $5 and my trailing stop is $4. I find that the risk is too high with a $5 OPEN price so immediately using Tradesim's formula I don't trade it. What then could happen is the price drop to say $4.50 during the day and come within an acceptable risk and I miss the trade. :) If ABC had opened at $4.50 then I'd have bought it straight away.

I'm not saying it is wrong for one second as I wasn't sure how Market Order worked and wanted to find out if I could trade this way or not while continuing to follow Tradesims methods.

I'd be interested in any other thoughts about this.

Regards P

Peter_H
14th July 2004, 06:30 AM
Just had a brain storm. :)

Would this make sense - instead of placing OPEN as the BuyPrice, is it possible to have a random entry between the high and the low to simulate what I am talking about above?

Regards P

Peter_H
16th July 2004, 07:57 AM
Hi again,

Stupid idea above ie: using a random price. Maybe this is too!

When using a % minimum trade size plus a % risk, using the BuyPrice as the OPEN (for example) and the % risk drops the trade size below the minimum % trade size then NO TRADE.

To be able to backtest if the stocks price does drop (during the day) to within an acceptable risk AND above a minimum trade size:



Capital:= 100000;
MinTradeSize:= Capital * (8 / 100); {8% min size}
TradeRisk:= Capital * (2 / 100); {2% risk}
PosSize:= TradeRisk / (OPEN - InitialStop);
PosValue:= PosSize * OPEN;

NewBuyPrice:= InitialStop / ((MinTradeSize / TradeRisk) -1) + InitialStop;

BuyPrice:= If(PosValue < MinTradeSize, If(NewBuyPrice > Low, NewBuyPrice, Open), Open);



Note: This hasn't been thoroughly tested yet and doing this, I don't think you could pyramid profits in Tradesim. ;-)

P

Peter_H
16th July 2004, 09:53 PM
Note that risk is never recalculated when the ActualEntryPrice changes because when you go to market you dont know what price you get filled at so its not possible or practical to recalculate the position size on the fly in order to maintain a target risk value.

Hi David,

In regards to the above, I don't really understand it.

Do you mean in regards to the way Tradesim calculates things because in actual trading if you use the OPEN and have to calculate the risk on it, then why not calculate at whatever price on the day that you place your limit buy price at, adjusting the position size to suit? Am I missing something?

P

David Samborsky
18th July 2004, 01:25 AM
No because if you get filled at market how do you change the position size at the time of the fill to accomodate a new buy price? it's the chicken and egg situation :wink:

Peter_H
18th July 2004, 04:19 AM
No because if you get filled at market how do you change the position size at the time of the fill to accomodate a new buy price? it's the chicken and egg situation :wink:

How about a limit order?

P

David Samborsky
19th July 2004, 03:40 AM
Maybe an option to readjust the position size according to the new entry price may resolve this issue.

This can already be done using default ordeing and you coding the entry price algorithm. TradeSim will always calculate the position size based on the target entry price so that whatever target entry price you feed to it will be used to calculate the position size.

Also I will look at add a buy stop entry order algorithm.

Peter_H
19th July 2004, 05:45 AM
Maybe an option to readjust the position size according to the new entry price may resolve this issue.

This can already be done using default ordeing and you coding the entry price algorithm. TradeSim will always calculate the position size based on the target entry price so that whatever target entry price you feed to it will be used to calculate the position size.

Also I will look at add a buy stop entry order algorithm.

Hi David,

This would be very much appreciated.

The code I posted above, there seems maybe some number rounding problem (I'm not 100% sure yet) where some trades are still rejected even though they would be just above the min trade size, have to look further.

By having an option "to readjust the position size according to the new entry price" then pyramiding would be possible too.

This is all about using a min trade size and to me it makes sense to use a min. percent of capital and also pyramiding.

I understand TradeSim will always calculate the position size based on the target entry price and it would be great to backtest (and pyramid) if the price does fall, be able to backtest a re-adjusted position size (while it's still above the min. trade size) and buy with a brokers limit order.

My confusion above was to do with the Order Type in the Tradesim Preferences.

Thanks again,
Regards P

David Samborsky
19th July 2004, 10:09 AM
When using limit entry orders it is possible for the trade to be rejected if the random algorithm selects a price above the target entry price (long trades) or below the entry price (short trades).