Order History - global or local?

 

Well, the question is, when i have EA and set to trade only trade at the time and then have another script running in other pair or whatever with the same thing, just one trade at a time (done by OrderSelect MODE_HISTORY) doest that mean that when the first EA is in a trade, the second wont trade because it will see one open order on the account?

Or is it just related to the local EA running?

Thanks for any answers..

 

OrderSelect() from any EA operates on the same target list of trades.

What your code will or won't do depends on how it is written.

 

This is beginning to touch my question.

If I use OrderSelect() to select a trade, does that information remain available globally?

Example:

OnTick()  {
--  OrderSelect(cc, ....) //-- this returns a valid open or pending trade

  subroutineA()

}

subroutineA()  {
-- is the selected trade information available here?
-- if I called OrderSelect(cc, ....) inside THIS subroutine, is the trade information available to OnTick() and subroutineB() ?

   Call subroutineB()

}

subroutineB() {
--Is the selected trade information available here?
-- if I called OrderSelect(cc, ....) inside THIS subroutine, is the trade information available to OnTick() and subroutineA() ?

}

I need to clearly understand how the OrderSelect() information is made available inside an EA -- globally or locally?

Any clarification would be appreciated

 
Globally. You are reading out of the terminal's DB. Doesn't matter where you read.
 
whroeder1:
Globally. You are reading out of the terminal's DB. Doesn't matter where you read.
Excellent!  That helps clarify something that has not been clear in my mind.  Thanks for the reply.
Reason: