Download MetaTrader 5

Summarizing the High Price of the Asia Session

To add comments, please log in or register
Hans Meiser
11
Hans Meiser  
Hi, I am new to mql. Is it possible to summarize the high prices of the last 20 intraday-asia-sessions? I need as the result the compound number. Can somebody show me an code example?
Hans Meiser
11
Hans Meiser  

I can do this only with a hole day like this code:

for(int i = 1; i < 20; i++)

{

double highs = iHigh(Symbol(), PERIOD_D1, i);

double sum = sum+highs;

}

But i need it with intraday highs.

Tjipke de Vries
6384
Tjipke de Vries  
Hans_Meiser:

I can do this only with a hole day like this code:

for(int i = 1; i < 20; i++)

{

double highs = iHigh(Symbol(), PERIOD_D1, i);

double sum = sum+highs;

}

But i need it with intraday highs.


https://www.mql5.com/en/articles/1575 some reading and you can find how to get also the high for a few hours time
Hans Meiser
11
Hans Meiser  
Thats a very interesting code, thank you deVries:)
To add comments, please log in or register