[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exit



PureBytes Links

Trading Reference Links

>From: KD <debkow@xxxxxxxxxx>
>To: omega-list@xxxxxxxxxx, bfulks@xxxxxxxxxxxx
>Subject: Exit
>Date: Wed, 15 Nov 2000 09:17:14 +0100
>
>Hello,
>
>
>I have a little problem with my exit rule.
>I use buy and sell rules in my system and they work fine,
>but I would like to add exitlong (exitshort) module.
>I'd like to exitlong once my profit since entry is > 100
>and price crosses below this level (entry price + 100).
>(If it will be a false signal, my buy rule will open a new position).
>I wrote:
>
>maxprice=highest(high,barssinceentry);
>
>If (MarketPosition = +1) then begin
>   If maxprice > EntryPrice(0) + 100 then
>   ExitLong at EntryPrice(0) + 100  stop  ;
>   end ;
>
>But I can't use stop orders for today's bar. They work only for tomorrow.
>For example: yesterday my entry price was 1000. Today the highest price
>was 1130 and close 1090. I would like to exit long at 1100,

Krzysztof:

Consider that even if you could have your stop working intrabar the results 
would be unreliable. Using your example: when the market is at 1101 your 
stop would be at 1100; there would be no way to know what transpired inside 
the bar after that point. In fact, if the market rallied to 1130 and then 
dropped below your stop at 1100, and then closed at 1101, TS would still 
assume you were NOT stopped out in historical testing. Obviously in real 
life you WOULD be stopped out. The TS manual discusses this in detail.

Also, consider your code asks for a stop at nearly the same price and time 
as your target:

>   If maxprice > EntryPrice(0) + 100 then
>   ExitLong at EntryPrice(0) + 100  stop  ;

As soon as the market
is at "+100.01" your stop would go in at "+100."
In theory, and in real time, your stop would be 1 tick
under the market if I understand correctly.

Bill Wynne

>but with
>this code I can't do that. I can exit my position only tomorrow,
>but tomorrow's open could be ie. 1050.
>How can I change my code?
>
>Thanks and best regards,
>Krzysztof
>
>