longshorts
2nd October 2004, 11:34 PM
Hi,
I am finding that if when doing an exploration a trade returns an initial stop error, i.e
===============================================
Error found in LONG trade [MCC] on 3-Apr-2003 caused by Invalid Initial Stop Data.
Details: [Initial Stop Price(1.127752)] >= [Entry Price(1.127752)]
that no other trades for that security turn up in the database.
If I set InitialStop:= 0 and run it again I will get say 11 trades for that security. Why is tradesim rejecting all the trades when only one is failing the initial stop test?
Explorer code is:
LongEntryTrigger:= Cross(C,Ref(HHV(H,20),-1))
AND Mov(C,7,S)>Mov(C,20,S)
AND OPEN<=(Ref(C,-1)+ATR(30));
LongEntryPrice:= OPEN;
LongInitialStop:=LLV(L,5);
LongExitTrigger:= ExtFml("TradeSim.TrailingStop",trigger,long,3.6*atr(30),h,c);
LongExitPrice:= OPEN;
ExtFml("TradeSim.Initialize");
ExtFml("TradeSim.SetStartRecordDate", 7,5,2002);
ExtFml("TradeSim.SetStopRecordDate", 30,8,2004);
ExtFml( "TradeSim.EnableDelayOfEntryByOneBar");
ExtFml( "TradeSim.EnableDelayOfAllExitsByOneBar");
ExtFml( "TradeSim.EnableProtectiveStop",0);
ExtFml( "TradeSim.SetStopGapPriceToOpen");
ExtFml( "TradeSim.UseClosingPriceAsStopThreshold");
ExtFml( "TradeSim.RecordTrades",
"cross20DH",
long,
LongEntryTrigger,
LongEntryPrice,
LongInitialStop,
LongExitTrigger,
LongExitPrice,
START);
Thanks
Longshorts
I am finding that if when doing an exploration a trade returns an initial stop error, i.e
===============================================
Error found in LONG trade [MCC] on 3-Apr-2003 caused by Invalid Initial Stop Data.
Details: [Initial Stop Price(1.127752)] >= [Entry Price(1.127752)]
that no other trades for that security turn up in the database.
If I set InitialStop:= 0 and run it again I will get say 11 trades for that security. Why is tradesim rejecting all the trades when only one is failing the initial stop test?
Explorer code is:
LongEntryTrigger:= Cross(C,Ref(HHV(H,20),-1))
AND Mov(C,7,S)>Mov(C,20,S)
AND OPEN<=(Ref(C,-1)+ATR(30));
LongEntryPrice:= OPEN;
LongInitialStop:=LLV(L,5);
LongExitTrigger:= ExtFml("TradeSim.TrailingStop",trigger,long,3.6*atr(30),h,c);
LongExitPrice:= OPEN;
ExtFml("TradeSim.Initialize");
ExtFml("TradeSim.SetStartRecordDate", 7,5,2002);
ExtFml("TradeSim.SetStopRecordDate", 30,8,2004);
ExtFml( "TradeSim.EnableDelayOfEntryByOneBar");
ExtFml( "TradeSim.EnableDelayOfAllExitsByOneBar");
ExtFml( "TradeSim.EnableProtectiveStop",0);
ExtFml( "TradeSim.SetStopGapPriceToOpen");
ExtFml( "TradeSim.UseClosingPriceAsStopThreshold");
ExtFml( "TradeSim.RecordTrades",
"cross20DH",
long,
LongEntryTrigger,
LongEntryPrice,
LongInitialStop,
LongExitTrigger,
LongExitPrice,
START);
Thanks
Longshorts