How do I set a special condition in the stop out level or margin ?
-
Suppose now I have (10) ten long open positions in the market .In the case of loss
And my expert advisor works every time it calculates deals, buy and sell and increases one
In the present example
i have (10) buy And I can't open (11) sell , Because stop out level .Here at the moment I want to open the same number of open positions it is (10 sell) then + 1.
How would the condition be in this case? -
@khalids222 I'm afraid I don't fully understand. You have 10 buys and cannot open the eleventh one but want 11 sells at one? Is that what you mean?
-
@l-andorrà said in How do I set a special condition in the stop out level or margin ?:
I'm afraid I don't fully understand. You have 10 buys and cannot open the eleventh one but want 11 sells at one? Is that what you mean?
@l-andorrà said in How do I set a special condition in the stop out level or margin ?:
I'm afraid I don't fully understand. You have 10 buys and cannot open the eleventh one but want 11 sells at one? Is that what you mean?The ea works on the following:
1- buy=0.01
2- sell= 0.02
3- buy=0.02
4- sell=0.02
5- buy=0.02
6- sell=0.02
7- buy=0.02
8- sell=0.02
9- buy=0.02
10-sell=0.02
11-buy=0.02Here, at this moment, you will find that the number of long positions exceeds the number of short positions by one
total buy=11 lot & total sell = 10 lot
At the same time, I closed my winning long positions = total buy (11 lot) & Remain short positions in loss (10 lot)
At the moment the price direction has moved up, the expert advisor will open a buy position (11 lot) selling lot +1 .
Also at the same moment, the expert advisor will not be able to open additional lot due to margin or stop out level .
At the moment there are several options :
1- make the expert open the same number of open trades in the market : 10 buy only So that they become hedging. -
@khalids222 Now I begin to understand. Is there a maximum or minimum amount of trades to open at the same time?
-
@l-andorrà NO
-
@khalids222 Then it os certainly difficult to do. You need a loop to identify all open trades right now and counting what they are doing. I'm afraid this is not my field of expertise, sorry. Maybe roar or miro can help.
-
@l-andorrà ok thank you