I have an easy question. For example, I have two signals A and B
A:
Code: Select all
condition1 = CurrentBar > 1 and var0 crosses over var1 ;
if condition1 then
Buy ( "MA2CrossLE" ) next bar at close limit;
Code: Select all
condition1 = CurrentBar > 1 and var0 > var1 ;
if condition1 then
Buy ( "MA2CrossLE" ) next bar at close limit;
For signal A, if limit order is not filled, the order will be cancelled at the end of "next bar", and no orders will be generated until signal A becomes true again.
For signal B, I am wondering what will happen if limit order is not filled in the "next bar"? (assume I don't want to change to market order).
My thought is, for signal B, if limit order is not filled, the order will be cancelled at the end of "next bar". And because signal B remains true, so a new limit order will be generated several seconds later in the next bar of "next bar" with a NEW limit price of previous close price until a limit order is filled or signal B becomes false.
Am I right? Or this limit order will remain unchanged and won't be replaced by new limit orders with new limit price?
I can test on Monday, but some input here will help me if I run into some confusion.
Thanks a lot