Barrie
4th November 2003, 03:24 AM
I'd be very grateful for some help with TradeSim from someone who is more familiar with this package than me.
I am trying to develop a system trading the ASX top 20 which uses a trigger of close above 5 day moving average and entry of previous day's high plus 0.5 ATR(1).
Stop is lowest low of last 4 days.
Exit Trigger should give price is below or equal to lowest price in last 4 days.
The system is reversed for short trades.
I have reproduced below the code I am using.
This system is supposed to run trades of $10,000 with a float of $150,000.
For simplicity I haven't included here the code for the Short side version, which is the inverse of the Long code.
When I run this I get errors like:-
Error found in LONG trade [AMC] on 19-Aug-1998 caused by Invalid Entry Price Data.
Details: [Entry Price(5.456474)] < [Entry Price Low(5.464451)]
EntryTrigger :=REF(C,-1)>Mov(C,5,S) AND H>REF(H,-1)+0.5*ATR(1);
EntryPrice := Ref(H,-1)+0.5*ATR(1);
ExitPrice :=LLV(L,4);
ExitTrigger :=L<=LLV(L,4);
InitialStop :=0;
ExtFml("TradeSim.Initialize");
ExtFml("TradeSim.EnableProtectiveStop",0);
ExtFml( "TradeSim.SetStartRecordDate",01,06,1995);
ExtFml( "TradeSim.SetStopRecordDate",30,09,2003);
ExtFml("TradeSim.RecordTrades",
"Top 20",
LONG,
EntryTrigger,
EntryPrice,
InitialStop,
ExitTrigger,
ExitPrice,
START);
Any help will be greatly appreciated.
Barrie Davis
I am trying to develop a system trading the ASX top 20 which uses a trigger of close above 5 day moving average and entry of previous day's high plus 0.5 ATR(1).
Stop is lowest low of last 4 days.
Exit Trigger should give price is below or equal to lowest price in last 4 days.
The system is reversed for short trades.
I have reproduced below the code I am using.
This system is supposed to run trades of $10,000 with a float of $150,000.
For simplicity I haven't included here the code for the Short side version, which is the inverse of the Long code.
When I run this I get errors like:-
Error found in LONG trade [AMC] on 19-Aug-1998 caused by Invalid Entry Price Data.
Details: [Entry Price(5.456474)] < [Entry Price Low(5.464451)]
EntryTrigger :=REF(C,-1)>Mov(C,5,S) AND H>REF(H,-1)+0.5*ATR(1);
EntryPrice := Ref(H,-1)+0.5*ATR(1);
ExitPrice :=LLV(L,4);
ExitTrigger :=L<=LLV(L,4);
InitialStop :=0;
ExtFml("TradeSim.Initialize");
ExtFml("TradeSim.EnableProtectiveStop",0);
ExtFml( "TradeSim.SetStartRecordDate",01,06,1995);
ExtFml( "TradeSim.SetStopRecordDate",30,09,2003);
ExtFml("TradeSim.RecordTrades",
"Top 20",
LONG,
EntryTrigger,
EntryPrice,
InitialStop,
ExitTrigger,
ExitPrice,
START);
Any help will be greatly appreciated.
Barrie Davis