Download MetaTrader 5
To add comments, please log in or register
Share the links to products and make your profit
Leo
86
Leo 2015.09.13 17:38 
Hi everyone,

I wish to implement my EA on several symbols (I wish to create such a scanner so I would like to avoid open multiple charts) and I have a doubt.

If I create an array with those symbols (e.g. string symbols["AAPL","MMM",...]) and in the OnTick() function I set a for loop, like:
for(int i = 0; i < ArraySize(symbols); i++)
{
string symb = symbols[i];
//...
long voltemp = Volume[i]; // ??? Is that changing every loop to select symbols[i]'s Volume?
//...
}

The special array Volume (but like all others, Close, High, Low, ...) are automatically set on that symbol or I have to set another option to "select" each symbol and get correspondent data?

Thank you very much!
whroeder1
13613
whroeder1 2015.09.13 18:50  
Volume like all other predefined variables only refer to the current chart's pair and timeframe.
Zirkon
123
Zirkon 2015.09.13 23:12  
leourb_:
Hi everyone,

I wish to implement my EA on several symbols (I wish to create such a scanner so I would like to avoid open multiple charts) and I have a doubt.

If I create an array with those symbols (e.g. string symbols["AAPL","MMM",...]) and in the OnTick() function I set a for loop, like:

The special array Volume (but like all others, Close, High, Low, ...) are automatically set on that symbol or I have to set another option to "select" each symbol and get correspondent data?

Thank you very much!
You have to use iVolume().
Leo
86
Leo 2015.09.14 11:28  

Thank you zirkoner! That's what I need :)

WHRoeder: I was referring to find a function that let me call data of another pair/security that the one on the chart :)

Thanks! 

whroeder1
13613
whroeder1 2015.09.14 12:16  
/
To add comments, please log in or register