PDA

View Full Version : trailing stop confusion


gawdib
2nd May 2004, 04:31 AM
I thought that the basic idea of a trailing stop is that the trailing stop is "set off" by some part of the daily price travel, and that one's trade is automatically exited at the stop price, not later at some open or close.

However, when i use the trailing stop function, the outcome is very different when I put in the exit price: a close versus an open. How can that be?
also in the exit trigger is a value (Ref(Fml("buy 4"),-1)). this is the trailing stop value. I thought that one could put in any data array into the exit price.but If i put this value,Ref(Fml("buy 4"),-1) - .000001 (or Ref(Fml("buy 4"),-1) ) or, i have tried (Ref(Fml("buy 4"),-1) - .000001 or Ref(Fml("buy3"),-1) - .000001 ) ( and i have tried min(ref(Fml("zAdaptick - IntelliStop Buy 4"),-1),open)), then no usable records are made to analyze. Why is that so since the value Ref(Fml("buy 4"),-1)) - .000001 would often be reached in the trading day's price excursion?
My formula:
entrytrigger:=Ref(Mov(VOLUME,50,S)>7500 AND C>6 ,-1) AND Ref(Fml(" Trend")=1 ,-1) ; EntryPrice:=OPEN;

ExitTrigger:=ExtFml( "TradeSim.trailingstop",trigger,long,.000001,If(Fml("spc"),Ref(Fml("buy 4"),-1),Ref(Fml("buy 3"),-1)),LOW);

ExitPrice := putting close here leads to a very different result than Open;

initialstop:=C<.92*entryprice;
ExtFml( "TradeSim.InitializeExtFml("tradesim.enableprotectivestop",2);

ExtFml("tradesim.settimestop",60);
ExtFml("tradesim.setstartrecorddate",1,1,2000);ExtFml("tradesim.setstoprecorddate",1,1,2003);
ExtFml("tradesim.setstopgappricetoopen");

ExtFml( "TradeSim.RecordTrades",
"may", { Trade Data Filename }
LONG, { Trade Position Type }
EntryTrigger, { Entry Trigger }
EntryPrice, { Entry Price }
InitialStop, { Initial Stop }
ExitTrigger, { Exit Trigger }
ExitPrice, { Exit Price }
START); { Recorder Control }

thanks very much for your assistance, regards, geoffrey

David Samborsky
3rd May 2004, 01:28 AM
It depends on when you can exit the trade when your trailing stop is violated.

If you have access to contingency orders then you can exit as soon as your trailing stop is violated otherwise if you are monitoring your trades at the end of the day then even if your trailing stop was violated during the day then you won't beable to do something about it until the next day.

gawdib
7th May 2004, 04:47 PM
I understand about putting in orders to brokers and contingincy orders.

What I did not understand, when i put in my question, was how does tradesim do its evaluation of trailing stops? If i do have access to contingency orders ( in otherwords, I CAN put in an order to sell so that if the travel of the price crosses over the price I have stipulated, then the stock is sold at that moment. There is no wait to the end of the day (close) or to the next day (at the open). so how do I program your tradesim so that Tradesim will do an analysis of my system when I can have this immediate type of "sale" take place? Thank you ver much. regards, Geoffrey