gawdib
22nd May 2004, 06:04 PM
I cannot get tradesim to work on testing more than one system, if I want the exit price to accurately reflect my trading!
after trying many combinations by myself,
I CAN get one specific system to have the exit price registered correctly in the tradesim database(first example below,),
however when I try the same format for a better system, (see example 2 below) the formulation of the exit price causes metastock explorer to reject 80% of the stocks!
Explorer says that a tradesim msx.dll is causing an internal error. It does not say what type. Nothing shows up in the tradesim error log or message log, if I go ahead and run the ddatabase anyway.
I know the second system other than the exit price is not causing the problem, because if I wrongly put in the exit price , a simple "open", then explorer just rejects the usual 2% of the stock list that i have given the exploration to process..
What is the problem?
I have tried putting the idential exit trigger and exit price from example 1 into example 2, and what happens is that explorer indicates that explorer is rejecting 25% of the stocks!
It all has no logic.
why is tradesim messing up?
I have no trouble using my formulations in metastock 9 system testing and in an expert, as long as I do not try to use the tradesim format.
thank you and regards, geoffrey
example 1 :that works in that it accurately reflects the price at which my trade exits....ie. at the price the day opens or , if the low of the day goes below the previous day's trailing stop, then at the price equal to the trailing stop. explorer rejects the usual 2%:
z1:= Fml(" 4");
z2:=Fml(" 3") ;
x:=Ref((HHV(H,25)/H),-1));
y:=(C-Ref(C,-20))/ATR(70);
entrytrigger:=
Ref(Mov(VOLUME,50,S)>7500 AND C>6
AND ( y<7 ),-1)
AND Ref(Fml(" Trend")=1 AND Mov(Sum( If(L<Ref(HHV(H,15),-1),1,0) ,1),5,S)>18 AND (CMO(C,30)>0 )
AND Ref(Ref((HHV(H,250)/H),-1)/x>0,-1)
,-1) ;
EntryPrice:=OPEN;
ExitTrigger:=
If(Fml("spxc"),LOW<=Ref(z1,-1),LOW<=Ref(z2,-1)) AND L >.5* Ref(L,-1);
ExitPrice :=
If( exittrigger , If(O<If(Fml("spxc"),Ref(z1,-1),Ref(z2,-1)) , O , If(Fml("spxc") , Ref(z1,-1) , Ref(z2,-1))) , C=0) ;
initialstop:=C<.92*entryprice;
ExtFml( "TradeSim.Initialize");
ExtFml("tradesim.settimestop",120);
ExtFml("tradesim.setstartrecorddate",1,1,2000);ExtFml("tradesim.setstoprecorddate",1,1,2003);
ExtFml( "TradeSim.RecordTrades",
"may21c",
LONG,
EntryTrigger,
EntryPrice,
InitialStop,
ExitTrigger,
ExitPrice,
START);
example 2 has been tried with the same sort of exit price formulation, but, unless, I put "open" ,ONLY, in the exit price, the tradesim formulation cause explorer to reject 80% of the stock!
z1:= Fml("Stop 4");
z2:=Fml("Stop 3") ;
yYY:=C-Ref(C,-60);xx:=Ref(ROC(TSF(Fml("spx"),4),1,%)>0,-1);
entrytrigger:=
Ref(Mov(VOLUME,50,S)>6000 AND C>6 AND ( YYy<,-1)
AND Ref(Fml(" Trend")=1 AND Mov(Sum( If(L<Ref(HHV(H,15),-1),1,0) ,1),1,S)>11 AND ROC(CMO(C,30),1,%)>0,-1)
;
EntryPrice:=OPEN;
ExitTrigger:=
Ref(If(Ref(ROC(Fml("vol"),1,$)<0 AND Mov(Fml("vol0"),2,VOL)<Mov(Fml("voltr),4,S),-1),
If(xx,If(LOW<=Ref(z1,-1),1,0),If(LOW<=Ref(z2,-1),1,0)),0)=1
,-1) ;
I have tried many different codings of the exit trigger, but that does not make any difference.
ExitPrice :=
If(exittrigger,If(O<If(xx,Ref(z1,-1),Ref(z2,-1)),O,If(xx,Ref(z1,-1),Ref(z2,-1))),C=0);
initialstop:=C<.92*entryprice;
ExtFml( "TradeSim.Initialize");
{ExtFml("tradesim.enablepricefilter");
putting this in messes things up in yet a different way}
ExtFml( "TradeSim.RecordTrades",
"may22cmoc3",
LONG,
EntryTrigger,
EntryPrice,
InitialStop,
ExitTrigger,
ExitPrice,
START);
after trying many combinations by myself,
I CAN get one specific system to have the exit price registered correctly in the tradesim database(first example below,),
however when I try the same format for a better system, (see example 2 below) the formulation of the exit price causes metastock explorer to reject 80% of the stocks!
Explorer says that a tradesim msx.dll is causing an internal error. It does not say what type. Nothing shows up in the tradesim error log or message log, if I go ahead and run the ddatabase anyway.
I know the second system other than the exit price is not causing the problem, because if I wrongly put in the exit price , a simple "open", then explorer just rejects the usual 2% of the stock list that i have given the exploration to process..
What is the problem?
I have tried putting the idential exit trigger and exit price from example 1 into example 2, and what happens is that explorer indicates that explorer is rejecting 25% of the stocks!
It all has no logic.
why is tradesim messing up?
I have no trouble using my formulations in metastock 9 system testing and in an expert, as long as I do not try to use the tradesim format.
thank you and regards, geoffrey
example 1 :that works in that it accurately reflects the price at which my trade exits....ie. at the price the day opens or , if the low of the day goes below the previous day's trailing stop, then at the price equal to the trailing stop. explorer rejects the usual 2%:
z1:= Fml(" 4");
z2:=Fml(" 3") ;
x:=Ref((HHV(H,25)/H),-1));
y:=(C-Ref(C,-20))/ATR(70);
entrytrigger:=
Ref(Mov(VOLUME,50,S)>7500 AND C>6
AND ( y<7 ),-1)
AND Ref(Fml(" Trend")=1 AND Mov(Sum( If(L<Ref(HHV(H,15),-1),1,0) ,1),5,S)>18 AND (CMO(C,30)>0 )
AND Ref(Ref((HHV(H,250)/H),-1)/x>0,-1)
,-1) ;
EntryPrice:=OPEN;
ExitTrigger:=
If(Fml("spxc"),LOW<=Ref(z1,-1),LOW<=Ref(z2,-1)) AND L >.5* Ref(L,-1);
ExitPrice :=
If( exittrigger , If(O<If(Fml("spxc"),Ref(z1,-1),Ref(z2,-1)) , O , If(Fml("spxc") , Ref(z1,-1) , Ref(z2,-1))) , C=0) ;
initialstop:=C<.92*entryprice;
ExtFml( "TradeSim.Initialize");
ExtFml("tradesim.settimestop",120);
ExtFml("tradesim.setstartrecorddate",1,1,2000);ExtFml("tradesim.setstoprecorddate",1,1,2003);
ExtFml( "TradeSim.RecordTrades",
"may21c",
LONG,
EntryTrigger,
EntryPrice,
InitialStop,
ExitTrigger,
ExitPrice,
START);
example 2 has been tried with the same sort of exit price formulation, but, unless, I put "open" ,ONLY, in the exit price, the tradesim formulation cause explorer to reject 80% of the stock!
z1:= Fml("Stop 4");
z2:=Fml("Stop 3") ;
yYY:=C-Ref(C,-60);xx:=Ref(ROC(TSF(Fml("spx"),4),1,%)>0,-1);
entrytrigger:=
Ref(Mov(VOLUME,50,S)>6000 AND C>6 AND ( YYy<,-1)
AND Ref(Fml(" Trend")=1 AND Mov(Sum( If(L<Ref(HHV(H,15),-1),1,0) ,1),1,S)>11 AND ROC(CMO(C,30),1,%)>0,-1)
;
EntryPrice:=OPEN;
ExitTrigger:=
Ref(If(Ref(ROC(Fml("vol"),1,$)<0 AND Mov(Fml("vol0"),2,VOL)<Mov(Fml("voltr),4,S),-1),
If(xx,If(LOW<=Ref(z1,-1),1,0),If(LOW<=Ref(z2,-1),1,0)),0)=1
,-1) ;
I have tried many different codings of the exit trigger, but that does not make any difference.
ExitPrice :=
If(exittrigger,If(O<If(xx,Ref(z1,-1),Ref(z2,-1)),O,If(xx,Ref(z1,-1),Ref(z2,-1))),C=0);
initialstop:=C<.92*entryprice;
ExtFml( "TradeSim.Initialize");
{ExtFml("tradesim.enablepricefilter");
putting this in messes things up in yet a different way}
ExtFml( "TradeSim.RecordTrades",
"may22cmoc3",
LONG,
EntryTrigger,
EntryPrice,
InitialStop,
ExitTrigger,
ExitPrice,
START);