gawdib
14th May 2004, 02:39 PM
I calculate a trailing stop the night before the next trading day. then a put in a stop limit order sell. thus, the next day, if the stock price opens below the trailing stop limit, the stop limit is triggered, and I sell at that moment at the open (forgetting slippage at the moment). If the open is higher than the trailing stop's stop limit order, then I am sold out if the low of the day touches that stop limit value. thus, I do not get out later. I do not get out of the trade at the close of the trading day, nor at the open the next day.
I have tried coding the exit price to register what I am doing, but I get nothing consistent or that makes sense.
examples (i keep everything else the same , except for the coding in the exit price):
the message log indicates no problems in any of the 3 ways i have tried to code it.
when i use the " min" funciton, then only 1824 trades are taken. no invalid trades are indicated. 70% of stocks are rejected by explorere.
if i use a simple open or close for the exitprice, then 2 % are rejected and 3223 trades are registered.
if i use in the exitprice:
if(open<ref(Fml("yesterdyays trailing stop value"),-1) , open , ref(Fml("yesterdyays trailing stop value"),-1))
, then 66% ofstocks are rejected by explorer, and the trade data base registers 2081 trades!!
if I try out the min and if way in the metastock system testing, not using tradesim, then the results are the equal, however.
and 24 %
of stock have no trades.
why all these differences?
As i have indicated before, the night before, I put in orders to sell the stock the next day, at one of 2 prices (by use of the metastock "min" or "if" function (which metastock expert allows to work): thus:
1. at the trailing stop value, if the stock price xcursion at any time touches the trailing stop value, or
2 at the open price, should the stock open below the trailing stop value
metastock language: exit price:= min(fml("trailing stop), open).
so why does tradesim fail to work rationallly?
How can I get tradesim to register the stop limit price that I actually exit the trade with??
thank you, regards geoffrey
I have tried coding the exit price to register what I am doing, but I get nothing consistent or that makes sense.
examples (i keep everything else the same , except for the coding in the exit price):
the message log indicates no problems in any of the 3 ways i have tried to code it.
when i use the " min" funciton, then only 1824 trades are taken. no invalid trades are indicated. 70% of stocks are rejected by explorere.
if i use a simple open or close for the exitprice, then 2 % are rejected and 3223 trades are registered.
if i use in the exitprice:
if(open<ref(Fml("yesterdyays trailing stop value"),-1) , open , ref(Fml("yesterdyays trailing stop value"),-1))
, then 66% ofstocks are rejected by explorer, and the trade data base registers 2081 trades!!
if I try out the min and if way in the metastock system testing, not using tradesim, then the results are the equal, however.
and 24 %
of stock have no trades.
why all these differences?
As i have indicated before, the night before, I put in orders to sell the stock the next day, at one of 2 prices (by use of the metastock "min" or "if" function (which metastock expert allows to work): thus:
1. at the trailing stop value, if the stock price xcursion at any time touches the trailing stop value, or
2 at the open price, should the stock open below the trailing stop value
metastock language: exit price:= min(fml("trailing stop), open).
so why does tradesim fail to work rationallly?
How can I get tradesim to register the stop limit price that I actually exit the trade with??
thank you, regards geoffrey