Download MetaTrader 5
To add comments, please log in or register
Join MQL5 Cloud Network affiliate program and make money!
Philip
30
Philip 2014.03.16 14:14 

aaa

if i move the mouse on the chart, the index of the specific bar is shown like the picture,

how can i get this index ? i means get the index of bar depends on the location of mouse....

i would like to express by comment() function.

Thanks a lot your help ~

Tjipke de Vries
6282
Tjipke de Vries 2014.03.16 14:24  
wctmiami:
Print("Current bar for USDCHF H1: ",iTime("USDCHF",PERIOD_H1,0),", ",  iOpen("USDCHF",PERIOD_H1,0),", ",
                                      iHigh("USDCHF",PERIOD_H1,0),", ",  iLow("USDCHF",PERIOD_H1,0),", ",
                                      iClose("USDCHF",PERIOD_H1,0),", ", iVolume("USDCHF",PERIOD_H1,0));

What info do you get with this ??

Alain Verleyen
Moderator
28658
Alain Verleyen 2014.03.16 17:59  
wctmiami:

if i move the mouse on the chart, the index of the specific bar is shown like the picture,

how can i get this index ? i means get the index of bar depends on the location of mouse....

i would like to express by comment() function.

Thanks a lot your help ~

You can use the Crosshair tool (Ctrl+F). Click on last candle (index 0), hold down and move your mouse to the desired candle. First number is index.
Philip
30
Philip 2014.03.16 23:18  
deVries:


What info do you get with this ??


thanks, I just try to use this inform for checking the size of bar,

i tested, but they could't show up the index when i move the mouse point.

Philip
30
Philip 2014.03.16 23:22  
angevoyageur:
You can use the Crosshair tool (Ctrl+F). Click on last candle (index 0), hold down and move your mouse to the desired candle. First number is index.


yes, i can get the index of bar by crosshair tool,

but i need to comment(about index of bars) in the chart, cause for this value, i will calculate something.... impossible ??

qjol
3243
qjol 2014.03.16 23:55  
have you tried CHARTEVENT_MOUSE_MOVE ?
Philip
30
Philip 2014.03.17 04:14  
qjol:
have you tried CHARTEVENT_MOUSE_MOVE ?


could you explain more ?

qjol
3243
qjol 2014.03.17 06:08  
/
To add comments, please log in or register