Example - How to create multiple level grids

Example on how to create custom grids with variable N lines/labels:
Release Notes: -cleanup a bit
-added method to erase artifacts.
-vertical lines do not behave correctly!!
Remove from Favorite Scripts Add to Favorite Scripts


Hi Ricardo
As usual, you are very innovative great thanks. I would like to keep the initial range as it will be removed later and later the accurate ones. Do you think there is a way to combine your fractal with the grid?
Merci de votre partage, Ricardo Santos. ce script va m'aider pour réussir mes trades. :)
Hi RicardoSantos,
Great script. Thank you.
I have used it on low timeframes and the plots look great.
Unfortunately, Sometimes it does not delete the previous lines.
I tried but did not succeed.
Is it possible to fix them?
Thank you
RicardoSantos aaahopper
@aaahopper, right now i think there isnt a way around it, thats a side effect of creating the lines dynamically through the custom function, ill go through it again anyway and see if i can work around it but this may be definite for now
RicardoSantos aaahopper
you can use this workaround but you wont be able to use other persistent lines..
add this before the if statement:

if remove_artifacts
for _j = 0 to 55
line.new(bar_index, open, bar_index, open)
label.new(bar_index, open, "", color=#ffffffff)
This is cool! Appreciated your generous shared RicardoSantos =D
great bro
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Referred friends Coins My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out