Michael
26th June 2003, 12:49 AM
Can you please tell me what is wrong with the following? My intention is to actuate a stop if it hits the Initial Stop at any time, otherwise at the LongExitPrice. I find that the InitialStop value is ignored in the database and all trades exit at the LongExitPrice.
LongEntryTrigger:=(............)
LongEntryPrice:=OPEN;
LongExitTrigger:=L<=Ref(LLV(L,4),-1);
LongExitPrice:=If(O<Ref(LLV(L,4),-1),O,Ref(LLV(L,4),-1));
InitialStop:=Ref(L,-1);
ExtFml("TradeSim.Initialize");
ExtFml("TradeSim.SetStartRecordDate",1,1,1995);
ExtFml("TradeSim.EnableDelayOfEntryByOneBar");
ExtFml("TradeSim.EnableProtectiveStop",0);
ExtFml("TradeSim.RecordTrades","xxx",Long,
LongEntryTrigger,
LongEntryPrice,
LongExitTrigger,
LongExitPrice,
InitialStop,
START);
Thanks,
LongEntryTrigger:=(............)
LongEntryPrice:=OPEN;
LongExitTrigger:=L<=Ref(LLV(L,4),-1);
LongExitPrice:=If(O<Ref(LLV(L,4),-1),O,Ref(LLV(L,4),-1));
InitialStop:=Ref(L,-1);
ExtFml("TradeSim.Initialize");
ExtFml("TradeSim.SetStartRecordDate",1,1,1995);
ExtFml("TradeSim.EnableDelayOfEntryByOneBar");
ExtFml("TradeSim.EnableProtectiveStop",0);
ExtFml("TradeSim.RecordTrades","xxx",Long,
LongEntryTrigger,
LongEntryPrice,
LongExitTrigger,
LongExitPrice,
InitialStop,
START);
Thanks,