two diffrent EA on two diffrent graphs with the same global params name - page 2

 
RaptorUK:

1.  No it isn't . . .  the platform cannot do it as it does not know in what way you want to manage your orders,  trailing stop is one example . . .  

2.  very probably,  but there really is no need . . . I have an EA running on 6 charts on one terminal with no issues.

3.  I'm not sure you can . . . you can get all the info you need using the  Trading Functions  to look at the trades Pool for open orders or the History Pool for closed orders.



Perhaps we have some misunderstanding . . . . by managing trades I mean modifying or closing trades dynamically,  one example of this would be a trailing SL,  another would be closing an order by using another opposite order.

 


it's not about modifing, open or close orders, the problem starts when i can't even use ordersTotal() for the existing graph cause that might count the other graph orders when i only want the current graph ordersTotal...
 
redharel:

it's not about modifing, open or close orders, the problem starts when i can't even use ordersTotal() for the existing graph cause that might count the other graph orders when i only want the current graph ordersTotal...
If you want to count the orders specifically relating to a specific EA you have to just count the ones that belong to the specific EA . . . by Symbol() and/or Magic number . . .   it's very simple.
 
redharel:

first graph was EURUSD with EURUSD EA while the second one was GBPUSD with GBPUSD EA, both on the same MT4

while running two EA on diffrent coins i had a mix in params values(same name and both was global in their EA).

i had two trades when running it live today without no reason(the second deal should never been opened) and afterwards i also tried it on strategy tester and as i thought the second deal should never been opened in the first place.

am i right or is it a diffrent bug apart from the global thing?

intuitive answer eh ?, more like guessing ...

I guess what your EA need is MT GlobalVariable  (click that and press F3 on MT, GV for short). When your EURUSD EA wants to open position, it should check the GV first, if its value is (say) 0, then it should open position and then set the GV value to (say) 1. When GBPUSD EA wants to open position, it should check the GV value. Because the GV value is not 0, then GBPUSD EA can not open position. When EURUSD close that position, it should set the GV value back to 0.

And vice versa. 

 
RaptorUK:
If you want to count the orders specifically relating to a specific EA you have to just count the ones that belong to the specific EA . . . by Symbol() and/or Magic number . . .   it's very simple.


cheers mate
Reason: