PDA

View Full Version : percentage exit trigger


rta
8th June 2003, 10:17 AM
after purchasing a share I have been generally selling when the price drops to 93% of the highest price since i purchased. If it has done well i usually extend that to 90%. Any suggestions as to how that can be written as an exit trigger in the tradesim exploration?

rta
9th June 2003, 08:27 AM
I appear to have solved this as follows-this is an initial 10% stop with a 25% trailing stop (trailing after whatever high)


ExtFml("tradesim.initialize");
ExtFml("tradesim.enableprotectivestop",2);
ExtFml("tradesim.setstartrecorddate",1,1,2002);
ExtFml("tradesim.setstoprecorddate",6,6,2003);
ExtFml( "TradeSim.RecordTrades",
"RTA 10% 25%", { Trade Data Filename}
LONG, { Trade Position Type }
EntryTrigger, { Entry Trigger }
EntryPrice, { Entry Price }
entryprice*.9, { Optional Initial Stop }
ExtFml("tradesim.trailingstop",
trigger,
long,
HighestSince(1,entrytrigger,C)*.25,
CLOSE,
LOW), { Exit Trigger }
ExitPrice, { Exit Price }
START); { Recorder Control }