Close Specific trades not all
-
Hello,
I hope all are good in fxdreema community.
I am facing a simple issue that, my EA trades on 2 pairs together and I set the EA on 3 different chart so it open 6 trades of different pairs.
And I set a global profit for each pairs to close (2 pairs).
and I also set different magic numbers on all 3 charts.
I am hoping to close 2 pairs when profit reached,But something wrong is happening that when profit of all 6 pairs reached then it close otherwise not.
-
@forexbob-0 manda el link
-
As Alan said, could you please share the link to the project?
-
-
@forexbob-0
"if trade" not specified symbol is any symbol

-
and, No need for "pairs1" and "pairs2" after using both market symbols.
Since this is a hedge system, you don't need RSI conditions and Bear Candle when you open a trade with the same conditions.
-
@PhiLykia Please explain why Pair 1/2 not needed.
As if I want to trade on various charts. How EA will identify the Pair 2 to open along with pair 1. -
@PhiLykia said in Close Specific trades not all:
@forexbob-0
"if trade" not specified symbol is any symbol

If we use specified symbol then we have to enter symbol in it and we can enter 2 symbols with having "," between them.
SO while doing this me again have a question.
If we are trading on 2 bunch of pairs.- AUDUSD,EURUSD
2 AUDUSD,GBPUSD
So if combined profit of 1st bunch reached but 2nd is still in loss then if as if we mentioned AUDUSD in 1 bunch then it will consider the profit of AUDUSD mentioned in 2 bunch. So it will close AUDUSD completely and leaving GBPUSD alonem and this will gone out of the strategy
- AUDUSD,EURUSD
-
I just saw your message, sorry, can you review the sample coding? I'll help you if you have any questions.
(There is a question of how GBPUSD will close.) -
@PhiLykia I just want to correct few things that.
Scenario 1
We gonna trade here on two pairs together let's say
GBPUSD and EURUSD. Trades will open here when we load EA on any of the one chart either GBPUSD or EURUSD. So when condition of pair 1 on which EA is loaded it opens a trade for that pair 1 and other trade will also get open which we enter as Pair 2 in inputs. These trades get opened together and get closed together then a certain input profit is reached on global space, This is clear and sorted, no need to do anything thereScenario 2.
Not if I want to trade on 6 currencies in 3 sets. let's say.
Set 1 - GBPUSD/EURUSD
Set 2 - AUDUSD/GBPUSD
Set 3 - AUDCHF/CADCHF
I want no interferance of any set to the other one's profit/loss.So in global space when profit of set 1 reached it closes only set 1. And do not disturb other one.
So as you said to specify the pair in closing function, when I tried it closes only the pair we enter into it.
For example we specify Pair 1 (GBPUSD) from set 1 (GBPUSD/EURUSD) in specify symbol space, it close only GBPUSD and leave EURUSD open.