helene
28th September 2003, 10:59 AM
Hi all,
When running my system through an exploration in Metastock I get this error message:
Error found in SHORT trade [XAO] on 29-Dec-2000 caused by Invalid Initial Stop Data.
Details: [Initial Stop Price(3210.696533)] <= [Entry Price(3222.500000)]
Following is the code for the short part of the system.
ShortEntryTrigger:=Ref(O,+1)<Ref(C,-1);
ShortEntryPrice := If(H>Ref(C,-1),H,If(L<Ref(C,-1),L,Ref(C,-1)));
ShortExitTrigger := CLOSE OR Ref(C,-1);
ShortExitPrice := CLOSE;
ShortInitialStop := Ref(H,-1)+ATR(10);
ExtFml("TradeSim.Initialize");
ExtFml("TradeSim.SetStartRecordDate",1,1,1995);
ExtFml("TradeSim.EnableProtectiveStop",0);
ExtFml("TradeSim.RecordTrades","Index SYSTEM",
SHORT,
ShortEntryTrigger,
ShortEntryPrice,
ShortInitialStop,
ShortExitTrigger,
ShortExitPrice,
CONTINUE);
Can anyone suggest what causes this?
:roll:
When running my system through an exploration in Metastock I get this error message:
Error found in SHORT trade [XAO] on 29-Dec-2000 caused by Invalid Initial Stop Data.
Details: [Initial Stop Price(3210.696533)] <= [Entry Price(3222.500000)]
Following is the code for the short part of the system.
ShortEntryTrigger:=Ref(O,+1)<Ref(C,-1);
ShortEntryPrice := If(H>Ref(C,-1),H,If(L<Ref(C,-1),L,Ref(C,-1)));
ShortExitTrigger := CLOSE OR Ref(C,-1);
ShortExitPrice := CLOSE;
ShortInitialStop := Ref(H,-1)+ATR(10);
ExtFml("TradeSim.Initialize");
ExtFml("TradeSim.SetStartRecordDate",1,1,1995);
ExtFml("TradeSim.EnableProtectiveStop",0);
ExtFml("TradeSim.RecordTrades","Index SYSTEM",
SHORT,
ShortEntryTrigger,
ShortEntryPrice,
ShortInitialStop,
ShortExitTrigger,
ShortExitPrice,
CONTINUE);
Can anyone suggest what causes this?
:roll: