Close positions question
1件の返信
Hello, I have a question,
I have a pending stop order system.
—–
If condition met
then,
buy stop + 2 pips of the (high)
—–
my question is, I want to close the opposite order -only if-
my buy order is executed. (not when the signal came, because, every signal does not end with orders)
So when I add the “close position” under the “buy stop” order,
it closes the position even the opposite is not open yet.
When I create a new condition like this, it enters a loop and doesnt open the new order.
Because it recognizes the “buy stops” magic number as if it is already opened.
——
if position long is open,
then,
close position short
——
Can you help?
最高
0
If you create two orders on signal – 1 BUY STOP (magic 1) and 1 SELL STOP (magic 2) and you want to make them OCO – One cancels other you can add a new condition that says:
if (Market Position is Long AND Pending Order Exists (2)) => Close Position (magic 2)
if (Market Position is Short AND Pending Order Exists (1)) => Close Position (magic 1)
That’s all. Also do not check “Evaluate on bar open only” on condition tab
0
1件の返信を表示中 - 1 - 1件目 (全1件中)