is possible do that in MT4 ?

 

Hi guys  is possible click over screenn in chart ( but  also not over candel)  and  return me  open high low close  and data time  ? anyone  have some example script or similar?? thanks

 

ChartXYToTimePrice

Check sample code for this function.

ChartXYToTimePrice - Chart Operations - MQL4 Reference
ChartXYToTimePrice - Chart Operations - MQL4 Reference
  • docs.mql4.com
ChartXYToTimePrice - Chart Operations - MQL4 Reference
 
Drazen Penic #:

ChartXYToTimePrice

Check sample code for this function.

Thank you for the response. I noticed that the function only gives me the hourly time because I am currently on the hourly timeframe. If I switch to the minute timeframe, it also provides me with minutes. Is it possible to have access to minutes while staying on the hourly timeframe, as if I were on the minute timeframe?

thanks again

 
faustf #:

Thank you for the response. I noticed that the function only gives me the hourly time because I am currently on the hourly timeframe. If I switch to the minute timeframe, it also provides me with minutes. Is it possible to have access to minutes while staying on the hourly timeframe, as if I were on the minute timeframe?

thanks again


No.

How would you do it anyway?

How would you distinguish minutes inside the hour candle? 

 
Drazen Penic #: How would you distinguish minutes inside the hour candle? 

If the human clicks on the forming bar, only then use TimeCurrent.

 
thanks
 
William Roeder #:

If the human clicks on the forming bar, only then use TimeCurrent.


You are right, that's the only candle where OP could get what he wants. As I understood, he would like to have that feature over the whole chart.

 

sorry if  ask , suppose  you have data  and hour in a chart eurusd , if  you want  at the same time a  value  of open candel of other chart  i tryed  with  iOpen("NZDUSD",PERIOD_H1,"2023.05.29 04:00")

whats worng ??  or is possible have it ?  thanks

 
faustf #:   i tryed  with  iOpen("NZDUSD",PERIOD_H1,"2023.05.29 04:00") whats worng ??
  1. Perhaps you should read the manual. iOpen - Timeseries and Indicators Access - MQL4 Reference
       How To Ask Questions The Smart Way. (2004)
          How To Interpret Answers.
             RTFM and STFW: How To Tell You've Seriously Screwed Up.

  2. Your code is wrong. Read the warning message. Compare that to the documentation.

 
faustf #:

sorry if  ask , suppose  you have data  and hour in a chart eurusd , if  you want  at the same time a  value  of open candel of other chart  i tryed  with  iOpen("NZDUSD",PERIOD_H1,"2023.05.29 04:00")

whats worng ??  or is possible have it ?  thanks

iOpen requires bar index, not time.

First use iBarShift to get bar index for the time you want to get information, then use that index in iOpen function.


As William wrote - read the documentation, there are examples of usage and code you can copy/paste into your source.

Also - search the help file you get with the editor - you will find more examples.

iBarShift - Timeseries and Indicators Access - MQL4 Reference
iBarShift - Timeseries and Indicators Access - MQL4 Reference
  • docs.mql4.com
iBarShift - Timeseries and Indicators Access - MQL4 Reference
 
thanks  so much at all, many many thanks :)
Reason: