jacche
5th May 2004, 01:46 PM
Hi David,
Help, I don;t know if its a bug in my code or just the way the system works. I noticed whenever an exit trigger and initial stop is breeched simultaneously (on the same day) TS records it as a "Stopped Out" trade with the initial stop price as exit price [rather than using my exit trigger and exit price which i was expecting]. Is there a way to indicate my preference (the exit trigger over initial stop) to TS so that my result more accurately reflects what i need ?
I recall reading somewhere previously that TS treats this in a certain way but am unable to find that note in the forum. I am using version 3.0.0 Build 654. Your advise much apprec.
Many thanks in advance
Jack
p/s my exit code and initial stop:
ShortExitTrigger := H > Ref(HHV(H,6),-1);
ShortExitPrice :=
If(Ref(HHV(H,6),-1)+0.01<O,O,Ref(HHV(H,6),-1)+0.01);
ShortExitPrice := If(ShortExitPrice>H,H,ShortExitPrice);
ShortInitialStop := Ref(HHV(H,3),-1);
ExtFml("TradeSim.Initialize");
ExtFml("TradeSim.SetStartRecordDate",1,1,1998);
ExtFml("TradeSim.SetStopRecordDate",31,3,2004);
ExtFml("TradeSim.EnableDelayOfEntryByOneBar");
ExtFml("TradeSim.EnableProtectiveStop",0);
ExtFml("TradeSim.SetExitPriceToInitialStop");
ExtFml("TradeSim.SetStopGapPriceToOpen");
ExtFml("TradeSim.RecordTrades",
......
Help, I don;t know if its a bug in my code or just the way the system works. I noticed whenever an exit trigger and initial stop is breeched simultaneously (on the same day) TS records it as a "Stopped Out" trade with the initial stop price as exit price [rather than using my exit trigger and exit price which i was expecting]. Is there a way to indicate my preference (the exit trigger over initial stop) to TS so that my result more accurately reflects what i need ?
I recall reading somewhere previously that TS treats this in a certain way but am unable to find that note in the forum. I am using version 3.0.0 Build 654. Your advise much apprec.
Many thanks in advance
Jack
p/s my exit code and initial stop:
ShortExitTrigger := H > Ref(HHV(H,6),-1);
ShortExitPrice :=
If(Ref(HHV(H,6),-1)+0.01<O,O,Ref(HHV(H,6),-1)+0.01);
ShortExitPrice := If(ShortExitPrice>H,H,ShortExitPrice);
ShortInitialStop := Ref(HHV(H,3),-1);
ExtFml("TradeSim.Initialize");
ExtFml("TradeSim.SetStartRecordDate",1,1,1998);
ExtFml("TradeSim.SetStopRecordDate",31,3,2004);
ExtFml("TradeSim.EnableDelayOfEntryByOneBar");
ExtFml("TradeSim.EnableProtectiveStop",0);
ExtFml("TradeSim.SetExitPriceToInitialStop");
ExtFml("TradeSim.SetStopGapPriceToOpen");
ExtFml("TradeSim.RecordTrades",
......