Is centralised money management possible? I cannot retrieve Ask(a different Symbol) other than current symbol...

To add comments, please log in or register
Ziad El
122
Ziad El  

Hi

The title explains it all:

It is possible to scan many pairs from a central chart with functions like iMA() etc:

double  iMA
 (
   string   symbol,     // symbol:  GOOD, this is needed because I am working with other Pair than that of the current chart
   int      timeframe,   
   ...   
 );

but what about money management?  Ask and Bid are only for the current symbol...

Is there a workaround?

Note: I am interested to know the answer for MQL4 and MQL5 as I am starting to migrate some of my work to MQL5...

Lakshan Perera
5750
Lakshan Perera  
Ziad El:

Hi

The title explains it all:

It is possible to scan many pairs from a central chart with functions like iMA() etc:

double  iMA(
   string       symbol,            // symbol:  ............ GOOD, this is needed because I am working with other Pair than that of the current chart
   int          timeframe,        // timeframe
  ...   );

but what about money management?  Ask and Bid are only for the current symbol...

Is there a workaround?

Note: I am interested to know the answer for MQL4 and MQL5 as I am starting to migrate some of my work to MQL5...

Here you go 2 methods

SymbolInfoDouble("EURUSD",SYMBOL_BID);
SymbolInfoDouble("EURUSD",SYMBOL_ASK);
   
   MqlTick tickData;
   SymbolInfoTick("EURUSD",tickData);
   
   tickData.ask;
   tickData.bid;
Ziad El
122
Ziad El  

Thanks Lakshan Perera

That was kind of you

Lakshan Perera
5750
Lakshan Perera  
Ziad El:

Thanks Lakshan Perera

That was kind of you

Also it is important to note if you are planing to get data of different symbols, you should make sure that the symbol you are requesting data from exist in the market watch, if it doesn't exist use following code to add it to the market watch

SymbolSelect("Symbol Name",true);
soubra2003
31846
soubra2003  

Note to Mr. Ziad,

It would be very simple to let the readers read your codes by using Code  button as screenshot below.



Ziad El
122
Ziad El  
Here I am, updated to format as coding
To add comments, please log in or register