* If Condition A then Enter Long
* If Condition B then Enter Long
I would still want Codition B to execute even when Condition A is currently true or when both, Condition A and Condition B become true at the same time.
For instance:
Case #1) If Condition A then buy 1 contract. Condition B is never true. Exit Long 1 contract.
Case #2) If Condition A then buy 1 contract., then Condition B is true, buy 1 contract. Exit Long 2 contracts.
Case #3) If Condition A and Condition B become true at the same time, buy 1 contract for Condition A and 1 contract for Condition B. Exit Long 2 contracts.
Case #4) If Condition B then buy 1 contract. Condition A is never true. Exit Long 1 contract.
if (Position.MarketPosition == MarketPosition.Flat) { if (Condition A) { EnterLong(); } } if (Condition B) { EnterLong(); } if (Position.MarketPosition == MarketPosition.Long) { if(Condition X) { ExitLong(); } }
Comment