PDA

View Full Version : i cannot chose fixed dollar risk before simulation testing


gawdib
26th December 2003, 06:26 PM
the manual says:
Trade Expectation Stats (Risk based PS models only) The following trade statistics are only available for risk based position size models such as the Fixed Dollar Risk model and the Fixed Percent Risk model. Copyright © 2000-2003 by Compuvision Australia Pty Ltd. All Rights Reserved
http://www.compuvision.com.au
Page 109
I thought that my codeing was allowing this:
example:
entrytrigger:= LinRegSlope(Mov(C,20,S),2)>0,C) ) OR (C<.8*ValueWhen(1, Cross(C,( Ref(C,-4)-Ref(ATR(10),-4)) ) AND LinRegSlope(Mov(C,8,S),2)>0 AND LinRegSlope(Mov(C,20,S),2)>0,C))) AND C>1.9*LLV(C,250)
) );
EntryPrice := OPEN;
ExitTrigger :=
((C<( Ref(C,-15)-Ref(ATR(10),-15)) AND LinRegSlope(Mov(C,8,S),2)<0 AND LinRegSlope(Mov(C,20,S),2)<0) AND ((C>1.01*ValueWhen(1, Cross(C,( Ref(C,-4)-Ref(ATR(10),-4)) ) );
ExitPrice := OPEN;
initialstop:=C-3*ATR(1);
ExtFml( "TradeSim.Initialize");{this is important to reset the analysis to this particular system}
ExtFml("tradesim.enableprotectivestop",3);
ExtFml("tradesim.enabledelayofentrybyonebar");
ExtFml("tradesim.enabledelayofallexitsbyonebar");
{ONE CAN PUT HEAR EXACT DATES TO START RECORD OF BUY AND SELL}

ExtFml("tradesim.trailingstop",trigger ,long,3*ATR(10),H,L);
ExtFml("tradesim.setexittriggerdelay",2);
ExtFml("tradesim.settimestop",10);
{these could be helpful to test out only in a bear or bull period= extfml("tradesim.setstartrecorddate",day,month,year);}
{ExtFml("tradesim.setprofitstop",100);}
ExtFml("tradesim.setstopgappricetoopen");
ExtFml("tradesim.enabletradepyramiding",percentprofit,1,20);
ExtFml( "TradeSim.RecordTrades",
"dec26", { Trade Data Filename }
LONG, { Trade Position Type }
EntryTrigger, { Entry Trigger }
EntryPrice, { Entry Price }
0, { Optional Initial Stop }
ExitTrigger, { Exit Trigger }
ExitPrice, { Exit Price }
START); { Recorder Control }. then of course i do my exploration and load into tradesim.
But when it comes to choosing a risk type of simulation in tradesim, the choices of fixed dollar risk and fixed percent risk are greyed out. What am i doing wrong? thank you and best regards, geoffrey

gawdib
27th December 2003, 05:19 PM
i figured it out. you must indicate the initial stop in 2 places. one time above the record trades and another time below the record trades. i had set up a module, that was like your initial example, with a 0 below the record trades function.