Drawing lines at specific round numbers
-
good day
I am trying to create an EA tat draws horizontal lines at certain round numbers on pips on the chart ,please please assist.
-
@miro1360 , you got any clue?
-
you have to search for MathCeil and MathFloor
https://fxdreema.com/forum/topic/4454/draw-horizontal-line-and-calculate-round-numbers-from-open-price/3 -
please elaborate , i dont follow
so I cant build it using blocks on fxdreems
-
@miro1360 when i convert the EA you built in the topic https://fxdreema.com/forum/topic/7467/finding-the-nearest-horizontal-line-of-indicator-complex-question?_=1684957084794
and convert it to mt5 , i get errors
-
@cyberspace said in Drawing lines at specific round numbers:
please elaborate , i dont follow
so I cant build it using blocks on fxdreems

-
why do I keep getting a ASK undeclared identifier error @ambrogio
-
maybe you wrote ASK in capital letter instead of Ask?
-
@ambrogio its no working still, try it on your side and see
-
It works for me, otherwise I wouldn't have posted. Please share your attempt that doesn't work
-
-
@ambrogio
shared/AegjtpTW -
@ambrogio waow this is lovely man ... being a while .. How are you?
How can I draw like 10 of these lines above each other at a specific pips distance and below also ?
Can you share a template ?
-
@cyberspace you have to move "draw line" from "on chart" to "on tick" section.
And yes, you are right, it doesn't work because we are on MT5 and not on MT4. I found something on the mql5 site, you have to assign the ask and bid value in MT5, like thishttps://www.mql5.com/en/forum/372442/page2#comment_33008806

-
@cyberspace this is a little example to draw 4 lines, you have to play around depend on your needs
-
@ambrogio thank you man
sure I will
-
@ambrogio Ooh..I see. but the custom code is not necessary on MT4 right ? Just the pass and the horizontal line correct ?
-
@tec-nacks exactly
Be sure that the "pass n times" must be executed AFTER the "pass once" block
And remember to reset these blocks somewhere -
@ambrogio I will. Thank you man.
Will be in touch
-
This is the second thread you created for the same question. Please don't duplicate threads.
