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

Re: Can any kind soul help me on this?



PureBytes Links

Trading Reference Links

AceTrader wrote:
>I wanted to code my intraday day trading system so that the limit
>order issued is active till end of day or when an opposite signal is
>generated. As far as I know, by default, all stop and limit order are
>good till end of the intraday bar only.

{initialization}

if time = <time of first bar> then begin
 longlimitorder = -1;
 shortlimitorder = -1;
end;

...

{buy/sell signals}

if <condition for buying> then
   longlimitorder = <buy price>;
if <condition for selling> then
   shortlimitorder = <sell price>;

...

{place orders}

if longlimitorder > 0 then buy at longlimitorder limit;
if shortlimitorder > 0 then sell at shortlimitorder limit;

...

That should re-establish the same limit order throughout the day.

-Alex