Guilherme Mendonca:
With SymbolInfoString(), you can access BASE_CURRENCY, PROFIT_CURRENCY and MARGIN_CURRENCY. Read on the documentation and you'll find your answer!
Hi folks,
I would like to select in Deals or Orders History any symbol that begins with "EUR" letters.
Even if my EA is on "EURUSD" chart, I would like to get "history deals" from "EURCAD" for example, or any symbol that begins with "EUR..."
The following is my code to select only the Symbol on chart. How can I do this?
La_patates:
With SymbolInfoString(), you can access BASE_CURRENCY, PROFIT_CURRENCY and MARGIN_CURRENCY. Read on the documentation and you'll find your answer!
I think I was not very specific, specially the example.With SymbolInfoString(), you can access BASE_CURRENCY, PROFIT_CURRENCY and MARGIN_CURRENCY. Read on the documentation and you'll find your answer!
I’m not trying to find some currency data.
As I’m trading futures of stock markets, I’m looking for something like.
if(HistoryDealGetString(deal_ticket,DEAL_SYMBOL)==DXY***)
So, I would like to receive all data from all symbols that starts with “DXY”.
The purpose of this is because sometimes I’m trading multiple Futures CFDs with different expiration dates.
Check the attach to seen an example.
Files:
instead of if(HistoryDealGetString(deal_ticket,DEAL_SYMBOL)==DXY***)
try
string abc = HistoryDealGetString(deal_ticket,DEAL_SYMBOL) ;
if(StringFind(abc,"DXY"){
//whatever you want to do
}

Documentation on MQL5: Constants, Enumerations and Structures / Trade Constants / Deal Properties
- www.mql5.com
Deal Properties - Trade Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Douglas Prager:
instead of if(HistoryDealGetString(deal_ticket,DEAL_SYMBOL)==DXY***)
try
string abc = HistoryDealGetString(deal_ticket,DEAL_SYMBOL) ;
if(StringFind(abc,"DXY"){
//whatever you want to do on
}
Thanks.
That’s I was looking for!

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi folks,
I would like to select in Deals or Orders History any symbol that begins with "EUR" letters.
Even if my EA is on "EURUSD" chart, I would like to get "history deals" from "EURCAD" for example, or any symbol that begins with "EUR..."
The following is my code to select only the Symbol on chart. How can I do this?