PDA

View Full Version : Stop entry orders and pyramiding


Adrian Miller
6th March 2005, 07:44 AM
David,

I don't seem to have much luck with testing pyramiding strategies.

I am testing a stop order entry system that tests well without pyramiding (there are no errors in the error log)

When I start adding pyramiding functions, all seems to go pair shaped.

The entry criteria is

LongEntryTrigger:=

Cross(Mov(C,3,S),Mov(C,9,S)) AND
C>Mov(C,100,S) AND
Ref(H,1)>=H+2;

LongEntryPrice:= Ref(H+2,-1);
LongEntryPrice:=If(LongEntryPrice<O,O,LongEntryPrice);
If(LongEntryPrice>H,H,LongEntryPrice);

If I add a pyramid trigger based on an additional trigger, the trade log generates three errors. This is becasue the trade is entered on the trigger day, and not the day after the trigger day. This forces errors as the trade entry price is higher than the high of the day, as the entry condition is Ref(H,1)>=H+2

If I add a pyramid trigger based on an additional trigger or 5% profit, with the profit threshold detection being based on the entry price, I get a million errors in the error log, with trade entries being generated every day (none of them being valide trade entries).

My question is this - can trade pyramiding be used when using stop order entries, or can it only be used when entry prices are the close or open?

And if this is the case, what viable alternatives are there to test pyrmading strategies on stop order entry systems (if any)

I've read and reread the pyramiding notes.

I'd appreciate some advice on this, as I always seem to get to this level and then stumble.

Thanks

Adrian

David Samborsky
7th March 2005, 01:23 AM
We released an updated TradeSim.dll Version 5.2.3 with the following modifications to pyramid trades.

* The EnableDelayOfEntryByOneBar no longer applies to pyramid trades ie trades where level>0.
* The Re-entry type was not correctly flagged for the corresponding pyramid trade.This has now been corrected.

The update is freely available from the download page http://www.compuvision.com.au/DownloadTradeSim.htm

Alternatively with the existing version of the dll you have you could enable the price filter i.e., EnablePriceFilter.

Adrian Miller
7th March 2005, 03:29 AM
David,

I'm not sure this helps me. If your pyramid condition is based on a trigger, and you rely upon end of day trading, how realistic is it to not enable delay of entry by one day?

And my original question - Does Tradesim enable pyramiding with stop order entry systems?

Is it worth me continuing to persevere, or is pyramiding in this system based on stop order entry and delayed entry not going to work?

Adrian

David Samborsky
7th March 2005, 08:51 AM
With TradeSim Version 4.2.2 you can mimic stop entry orders.

Could you send me your trade database code and I will have a look at it.

Karlostomy
2nd April 2005, 04:55 AM
Hi Adrian,

I was reading through your posting and was intrigued by your line:

Ref(H,1)>=H+2;

Possibly I am showing my ignorance here, but What are you trying to achieve with H+2? Do you mean H+0.02?

or H*1.02?

As it's written I would read your code as: tomorrows high must be greater or equal to todays high plus two dollars???

If you have the time, could you clarify this for me.

best regards,
Karl Pfitzner

Karlostomy
2nd April 2005, 05:23 AM
Hi Adrian,

I was reading through your posting and was intrigued by your line:

Ref(H,1)>=H+2;

Possibly I am showing my ignorance here, but What are you trying to achieve with H+2? Do you mean H+0.02?

or H*1.02?

As it's written I would read your code as: tomorrows high must be greater or equal to todays high plus two dollars???

If you have the time, could you clarify this for me.

best regards,
Karl Pfitzner

David Samborsky
2nd April 2005, 10:05 AM
I think I have said this before but it is stroingly recommended that you do not use forward referencing in your formulas because in practice this is not possible.

ie Ref(H,1) refers to next days high which you don't have when trading.

You should rewrite

Ref(H,1)>=H+2;

as:-

H > = ref(H+2,-1);

Adrian Miller
5th April 2005, 06:02 AM
Karl,

You are correct.

The code is for trading the Australian stock indices which are quoted in dollars.

David,

I have amended the codes to H > = ref(H+2,-1); and referenced all the trigger code as a ref function.

Adrian

Adrian Miller
5th April 2005, 06:03 AM
Karl,

You are correct.

The code is for trading the Australian stock indices which are quoted in dollars.

David,

I have amended the codes to H > = ref(H+2,-1); and referenced all the trigger code as a ref function.

Adrian