Is it possible not to snap to the grids?

To add comments, please log in or register
Ziad El
122
Ziad El  

I want to draw tiny boxes around certain (X,Y) points, where X are datetime, and Y are prices.

I use the following, trying to get my width as less than a candle width:

datetime X1 = X -(Time(_Symbol,_Period,1)-Time(_Symbol,_Period,0))/4;
datetime X2 = X +(Time(_Symbol,_Period,1)-Time(_Symbol,_Period,0))/4;

Note: Time() is a custom made function to emulate MQL4 Time[] (I got inspired by the internet)

However, no matter how I change the "/4" factor, the chart will insist on snapping to the gridelines, so I end up with the following chart:


Lorentzos Roussos
22988
Lorentzos Roussos  
Ziad El:

I want to draw tiny boxes around certain (X,Y) points, where X are datetime, and Y are prices.

I use the following, trying to get my width as less than a candle width:

Note: Time() is a custom made function to emulate MQL4 Time[] (I got inspired by the internet)

However, no matter how I change the "/4" factor, the chart will insist on snapping to the gridelines, so I end up with the following chart:


Use a Text object , placed on the bar time with a webdings/wingdings font and an icon

Ziad El
122
Ziad El  
Fair!
whroeder1
17949
whroeder1  
Lorentzos Roussos: However, no matter how I change the "/4" factor, the chart will insist on snapping to the gridelines, so I end up with the following chart:

It is not snapping to grid lines. It is snapping to bars. In MT4 that is all you can do. In MT5 IIRC there is a setting that allows objects between bars.

Ziad El
122
Ziad El  

"In MT5 IIRC there is a setting that allows objects between bars."


Can you expand please on this?
Anthony Garot
1819
Anthony Garot  
Can you expand please on this?

I think this is what he means.

To add comments, please log in or register