Is it possible not to snap to the grids?

 

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:


 
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

 
Fair!
 
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.

 

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


Can you expand please on this?
 
Can you expand please on this?

I think this is what he means.

 
Did you made it work?
 
Anthony Garot:

I think this is what he means.

Anyone know if there's a way to set the same setting to be effective in the strategy tester?
 
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:


4 years later: for me it helped when I set the "Magnet Sensitivity" to zero (in the same tab as shown in Anthony Garot's reply). Magnet sensitivity is 10 by default.
 
Anthony Garot #:

I think this is what he means.

hey, where to access these settings? thanks
 
Linards Berzins #: hey, where to access these settings? thanks

MetaTrader Options (Ctrl-O) — Menu → Tools → Options