PureBytes Links
Trading Reference Links
|
As always, Bob is on the money. My simplistic approach might be:
If time >= 1514 {(X) or whatever} and {your condition} then exitlong;
Of course you need to adjust the time for your market's closing and time
zone. To make this easier to change, and to optimize the time of exit, you
could make the time an input.
Bill Wynne
SmartTrades.com
In a message dated 3/22/00 7:49:56 AM Pacific Standard Time,
bfulks@xxxxxxxxxxxx writes:
> At 8:15 AM -0600 3/22/00, Randy Rehler wrote:
>
> >Ex. S&P 500
> >
> >If the close of the 1 min bar at 3:14 is less than X ( Condition1 is true
),
>
> >exit the next bar ( 3:15 bar ) at the market, thus simulating a M.O.C.
> using
> >daily data.
> >
> >My code is below.
> >
> >If MP = 1 and Time = Sess1EndTime then begin
> > If Condition1 then ExitLong all contracts at market;
> >end;
> >
> >My problem is identifying the last or second to last bar for the day
> session
> >intraday so I can check for Condition1 and if true exit the trade. My
> >attempt to do so is the "Time = Sess1EndTime" snippet or some variation
> >thereof. It does not work. Any ideas?
>
> I must be missing something obvious but why not:
>
> If MP = 1 and Time = Sess1EndTime - 1 then begin
> If Condition1 then ExitLong all contracts at market;
> end;
>
>
> Bob Fulks
>
>
|