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

Re: Same day exits



PureBytes Links

Trading Reference Links

<x-flowed>
>From: "Mel F" <melsmail@xxxxxxxxxxx>

>I am trying to exit on the bar of entry only using following code
>Buy{setup condition} next bar at open + Value1;

>In a separate signal I have two exits as follows
>If marketposition <> 1 then begin
>    ExitLong("1stDayProfit")  Open tomorrow + Value10 limit;
>    ExitLong("1stDayLoss")    Open tomorrow - Value20 stop;
>end;

Since you have a limit and a stop in the same bar it is impossible for TS 
(or any program) to know in which order they occurred after your entry from 
OHLC daily data. In short: forget about it. The only thing you know about 
the order of the OHLC is that the Open was first and the Close was last. The 
order of everything in between is unknown without tick data, so even if your 
idea is programmed "right" the data will be useless.

Bill Wynne

Bill@xxxxxxxxxxxxxxx

>What I am finding is that if the Entry price is greater than the
>ExitLong("1stDayProfit")  price it exits at the Entryprice

Try exitlong at entryprice + valueX.

>If I change from limit to a stop order for ExitLong("1stDayProfit")
>  and the high is less than the ExitLong("1stDayProfit") price it also 
>exits
>at the entryprice
>
>How can I code it to exit correctly on the same day as entry?
>
>Mel
>melsmail@xxxxxxxxxxx
>
</x-flowed>