Need Help ** getting the time of iLowest and iHighest

 

Hi all,

I'd like to get the time of iLowest and iHighest values below. Although I have searched a lot I cloundn't find anything about it. Can anyone help me ragarding this?

Regards,

Cosan

double lowbar = iLowest("EURUSD", PERIOD_D1, MODE_LOW,BarsBack,StartBar);

double highbar = iHighest("EURUSD", PERIOD_D1, MODE_HIGH,BarsBack,StartBar);

 
Just use Time[] or iTime with lowbar and highbar.
 
Can you please specify how i can use it. I've already found Time function but I could't find how to use it. Thanks a lot..
 

Hi Cosan, thank you for your post! I always find the "Navigator" useful in MT4 terminal. I personally find it difficult to understand sometimes, but I believe that it can help you find your way to where you want to go.

INSTRUCTIONS:

1. Open "MetaEditor". (its where you can build your code for your strategies AND in your case, determine how you would like to use the time function)

2. Click the "little book icon" called "MQL Navigator" then in the MQL Navigator pane that pops up in the right corner of the screen, click the "Dictionary" tab.

3. In the dictionary you can do your research on the iTime(), Time[] functions or any other functions you would like to study.

4. If you want to plow a few hours into learning how to code in mql4, you can actually download a hard core book of mql4 coding. You can download it FREE here: https://book.mql4.com/

(look in the left side of the screen for the download link OR read it straight up right from the website)

Learning how to code can be like learning a different language. It can take lots of time and can be overwhelming, but as time goes on, I find coding less intimidating and enjoyable. :)

Hope this helps. Good luck.

 
Cosan:
Can you please specify how i can use it. I've already found Time function but I could't find how to use it. Thanks a lot..
It's all in the Documentation . . . Time[] & iTime()
 

Try this but note that this returns the open time of the bar containing the lowest price not the time the low was set. Also iLowest and iHighest are supposed to be of int type.

int lowbar = iLowest("EURUSD", PERIOD_D1, MODE_LOW,BarsBack,StartBar);
int highbar = iHighest("EURUSD", PERIOD_D1, MODE_HIGH,BarsBack,StartBar);
datetime LowestTime=Time[lowbar];
datetime HighestTime=Time[highbar];
 
tonny:

Try this but note that this returns the open time of the bar containing the lowest price not the time the low was set. Also iLowest and iHighest are supposed to be of int type.


Thnx Tonny.. U made my day..