PDA

View Full Version : Risk based position size model


elljay
1st June 2011, 03:28 AM
Hi David,
I am having trouble with the following exploration; TradeSim is not allowing me to use a risk based position size model!
And also there is a box that appears beneath the Simulation Type box,
Called “Simulation Options” this has never appeared before?
The Warning sign says (Cannot use Risk based Position Sized models without initial Stop or Max Loss Data – Non risk based PS model selected.)
Also this works ok but only if I scan 1 to 10 stocks but as soon as I try to do the whole market then it troughs’ its toys?

The exploration is generating 26600 trades,
could I be hitting some limit within TaadeSim?
Help!

All was working fine until I removed this line
"Mov(C,21,W)>Mov(C,100,W) AND". And replaced it with
“Mov(C,21,W)>Mov(C,50,W) AND”.

Any ideas?

EntryTest:=
C>Ref(HHV(C,10),-5) AND
Mov(C,21,W)>Ref(Mov(C,21,W),-1) AND
Mov(C,50,W)>Ref(Mov(C,50,W),-1) AND
Mov(C,21,W)>Mov(C,50,W) AND
Mov(VOLUME,21,S)>250000 AND
C>O AND
C>=0.10 AND
C<=1.00;

EntryTrigger:=
Ref(EntryTest,-1) AND H>=Ref(C,-1);

EntryPrice :=
Max(OPEN,Ref(C,-1));
ExtFml("TradeSim.Initialize");
ExtFml("TradeSim.EnableProtectiveStop",1);
ExtFml("TradeSim.SetTimeStop",21);
ExtFml("TradeSim.
SetPyramidProfitThresholdDetection",EntryPrice);
ExtFml("TradeSim.EnableTradePyramiding",Trigger,0,10);
ExtFml("TradeSim.SetVariableProfitStop",3.5*ATR(21),0);
ExtFml("TradeSim.SetVariableVolatility",EntryPrice+3.5*ATR(21));
ExtFml("TradeSim.SetExitPriceToInitialStop");
ExtFml("TradeSim.SetExitPriceToProfitStop");
ExtFml("TradeSim.UseClosingPriceAsStopThreshold");

InitialStop:=
EntryPrice-3.5*ATR(21);

TrailStop :=
ExtFml("TradeSim.TrailingStop",
Trigger,
Long,
3.5*ATR(21),
CLOSE,
CLOSE);
ExitTrigger :=Ref(TrailStop,-1);
ExitLong :=OPEN;

ExtFml("TradeSim.SetStartRecordDate",01,01,2001);
ExtFml("TradeSim.SetStopRecordDate",31,12,2011);

ExtFml("TradeSim.RecordTrades",
"01 ASX6.7",
Long,
EntryTrigger,
EntryPrice,
InitialStop,
ExitTrigger,
ExitLong,
Start);

Cheers ,
Les

elljay
1st June 2011, 03:38 AM
Sorry wrong forum!