Page 1 of 1

limit order life cycle

Posted: May 23 2024
by giuliocorbelli
In this PowerLanguage code, are the limit entry orders active just for the time the conditions are true and then they get cancelled when the conditions become false?
Or are they submitted and never canceled till one of them gets executed?

//if entriestoday(date) = 0 and marketposition = 0 then begin
//
// if timewindow
// then buy ("Long") 1 contract next bar at mylow limit;
// if timewindow
// then sellshort ("Short") 1 contract next bar at myhigh limit;
//
//end;

Re: limit order life cycle

Posted: May 28 2024
by Polly MultiCharts
Hello giuliocorbelli,

Orders are supposed to be canceled automatically if the conditions for sending an order specified in your script are not met.
When the bar closes, orders are canceled, but when the new bar opens, they are sent again if the conditions are met. The same procedure is repeated each bar.