Hello,
I'm working on a multi‑symbol Expert Advisor that monitors trade events across several instruments. I know that OnTradeTransaction is triggered when a trade transaction occurs on the account, but I'm not entirely sure about its scope when used in an EA.
If I have a single EA running on a chart (e.g., EURUSD), will its OnTradeTransaction handler be called for trades placed on other symbols (e.g., GBPUSD, XAUUSD, etc.) as long as those trades are executed on the same trading account? Or is the handler only invoked for transactions that involve the EA's chart symbol?
In other words, is OnTradeTransaction account‑wide regardless of which EA (or manual trading) initiated the trade, or is it somehow limited to the symbol of the chart where the EA resides?
Thank you for any clarification.
I use it and i trade all major and minor FX pairs.
you confirm that ??? i not understund i repat the question sorry
If I have a single EA running on EURUSD (just one chart), and inside that EA I have an OnTradeTransaction function – will it receive all trade transactions that occur on the trading account, regardless of which symbol they are for? For example, if a trade is executed on GBPUSD or XAUUSD (either manually or by another EA on a different chart), will my EURUSD EA's OnTradeTransaction be triggered?
Or does the handler only receive transactions that involve the symbol of the chart the EA is attached to?
you confirm that ??? i not understund i repat the question sorry
If I have a single EA running on EURUSD (just one chart), and inside that EA I have an OnTradeTransaction function – will it receive all trade transactions that occur on the trading account, regardless of which symbol they are for? For example, if a trade is executed on GBPUSD or XAUUSD (either manually or by another EA on a different chart), will my EURUSD EA's OnTradeTransaction be triggered?
Or does the handler only receive transactions that involve the symbol of the chart the EA is attached to?
The parameters of OnTradeTransaction() include MqlTradeRequest, and the MqlTradeRequest structure includes:
string symbol; // Trade symbol(You can specify your desired trading symbol).
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I'm working on a multi‑symbol Expert Advisor that monitors trade events across several instruments. I know that OnTradeTransaction is triggered when a trade transaction occurs on the account, but I'm not entirely sure about its scope when used in an EA.
If I have a single EA running on a chart (e.g., EURUSD), will its OnTradeTransaction handler be called for trades placed on other symbols (e.g., GBPUSD, XAUUSD, etc.) as long as those trades are executed on the same trading account? Or is the handler only invoked for transactions that involve the EA's chart symbol?
In other words, is OnTradeTransaction account‑wide regardless of which EA (or manual trading) initiated the trade, or is it somehow limited to the symbol of the chart where the EA resides?
Thank you for any clarification.