My EAs are bleeding
-
I ran 2 separate EAs with 2 different magic numbers. They have different stoploss and take profit. This only happen when the EAs are running on the same pair. Example both are running eur/usd.
If both EAs open a trade (even when they are different), the take profit and
stoploss become the same. I am not sure if this is a coding issue or a broker terminal issue.This thread has some similarity to the problem
https://www.mql5.com/en/forum/439925 -
@line What do you exactly need? Two independent trade launchers but one same closing policy? Or the opposite?
-
Thanks for responding. The EAs are completely different but running on the same pair. So their stoploss and takeprofit are different.
If one is trading and the second one takes a trade, the terminal changes the stoploss and takeprofit of the 2nd to the 1st.
Example:
EA #1 sl 100 tp 100
EA #2 sl 50 tp 50Since EA #1 is first on the trade, then EA #2 opens a trade, then EA #2 sl/tp is changed to EA #1.
They have different magics but on the same pair.
Not sure if this is a MT issue or coding issue.
-
@line i think you are trading on a "netting" MT5 account. Can you check this?
-
@ambrogio Thank you, I think this is the answer!
-
Netting: A Simpler Risk Management System
If you are still unfamiliar with the word netting, it basically means a trading method that only lets you have one position opened in one currency pair. So if you open two trading positions simultaneously, then it will automatically be counted as one, and the second position can add, reduce, or even close the previous trading volume. So in netting, opening multiple positions means combining them to produce a final net position. In contrast to hedging, netting the two positions will be recorded as one trade in the transaction history.For example, you buy 1 lot of GBP/USD, then an hour later, you sell 0.5 lot of the same currency pair. Right after you opened the second position, the buy position that was opened earlier will be partially closed by the system. This situation can happen multiple times, so you can open more positions to add or reduce trading volumes from the last position.
See Also: Lowest Spread Forex Brokers For GBP/USD
If you set a stop loss level, it will be placed according to the previous position opened. In other words, stop levels in each subsequent order will replace the previous ones. If a position is partly closed, stop loss and take profit will not be changed by the new position. But if a position is fully closed, stop loss and take profit will be d because they initially came with the previous position and so it cannot exist without it.
The advantages of using netting in forex trading are as follows:
You only need to manage one trading position in a single currency pair so you can save more time and energy.
You can easily calculate the breakeven point of all trading volumes of a pair.
You can reduce the risk of conflicting trading positions in which one position is gaining while the other is losing.
Netting has its own disadvantages; it makes it impossible for you to set a stop loss and take profit for each trading position separately. Merging the multiple positions into one will then force you to be more careful in analyzing the price movement and so it reduces the flexibility of trading compared to hedging. Also, you need to be extra careful when placing a pending order because it is possible that the previous trading position is still opened when the pending order is triggered. -
@line you're welcome!