Drawing lines at specific round numbers
-
Hey @ambrogio
How you doing?
Remember the logic you wrote about lines at round numbers ... so following up on that, I want to reset the lines when price closes below the last one and redraw a new set to the most recent price
But the issue i see is that the number extension that is added to object names when more than one is drawn, increases also upon deletion and rewriting variables to zero.
How can I have it such that the redraws restart from the initial number 1-10 depending on the number of lines drawn
-
i think is better leave up from the name of the lines
-
@tec-nacks this is what i elaborated, but i'm pretty sure that someone else more good brain than mine can make the same with less blocks






-
@ambrogio waow.. pls share the project link
-
-
@ambrogio thank you
-
@ambrogio Hey,
I realized that the lines are not exactly drawing in the rounded number anymore.
Why is that? And how can this be correct?
For example; if you place the EA on chart now it's likely you won't get the right rounded numbers 30mins later place it on another chart window, it will be different levels
How can we have it to be consistent across on a rounded psychological number ?
Especially for pairs like JPYs , GOLD, Cryptos
-
it depends where the first psychological level is, assign a different color to the first line and you can see
-
-
@ambrogio Yea, i figured that 0.01 will not work for some assets because of varieties of broker's tick size ... so I had to fetch the data out and adjust to the accurate round numbers but it's looking like the not so correct ones is doing the job better
Still checking though
Thanks
