PDA

View Full Version : multiple exits and referring to the entry price


gawdib
2nd March 2004, 05:51 PM
I need to have various ways of exiting. all include referring to the entry price , while also adding other conditions.

I have tried to check out what the results look like , by using your format for doing so, by having it show up in experts.

However, when I put in exit something even as simple as

entrytrigger:= C>10; EntryPrice:=CLOSE;

ExitTrigger:= C>1.3*EntryPrice; ExitPrice:=CLOSE;

initialstop:=0;dummy:=ExtFml("TradeSim.Initialize" );dummy:=ExtFml("TradeSim.SuppressFileProcessing");dummy:=ExtFml( "TradeSim.SetReturnInfoType",ExitTriggers;dummy:=ExtFml("tradesim.setstopgappricetoopen"); ExtFml( "TradeSim.RecordTrades", " yyccdc",LONG, EntryTrigger, EntryPrice, 0, ExitTrigger, ExitPrice, START);

,, nothing shows up for sells, except on the very last trading day displayed in the metastock chart. ( another issue: I cannot understand why the last day is a sell)

I am actually tyring to do something like selling after the stock price has advanced at least 30 % above the entry price then has retraced more than 5% down from the highest high value of the close in the past 7 trading days.

In addition, i want to put in anthoer exit condition that would exit if the stock price has remained between -5% and +5% of the value of the entry price. etc etc,
Your assistance would sure be apreciated. thank you and best regards, geoffrey

David Samborsky
4th March 2004, 01:35 PM
If you are trying to reference your entry price using the MS formula language you are in for big shock at how difficult it is to do reliably!!

To do this you should use the SetProfitStop function built into the RecordTrades function.

gawdib
12th March 2004, 04:49 PM
I need to know if referring to the entry price has any validity when one writes it using tradesim. in addition to only the one spot: entryprice=close; thank you, geoffrey