TradingView
allanster
8 Jun 2021 pukul 08.43

Gridimus Maximus 

Bitcoin / United States DollarCoinbase

Deskripsi

Gridimus ‎Maximus draws N grid lines stepping by price or percent in chosen direction from set price, or draws N grid lines stepping by ‎pivots.

The queue function method used is adapted from an example provided on the PineCoders website, much gratitude to LucF for this gem!

To prevent grid lines out of range from causing chart to rescale right click on chart's price column and enable Scale Price Chart Only.

Pictured example above is using Type Of Increment: Steps By ‎Pivot, Number Of Steps: 5.

Pictured example below is using Type Of Increment: Steps By Price, Number Of Steps: 6, Starts From Price: 10k, Steps By Percent Or Price: 10k.



Pictured example below is using Type Of Increment: Steps By Percent, Number Of Steps: 7, Starts From Price: 10k, Steps By Percent Or Price: 33%.




NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any portion thereof, you acknowledge that you have read and understood that this is for research purposes only and I am not responsible for any financial losses you may incur by using this script!

Catatan Rilis

Revision 1

Enabled adjustable transparency for grid lines.

Catatan Rilis

Revision 2

Added ability to specify number of bars to the left and right of ‎pivot. Reducing number of bars to the right of ‎pivot increases responsiveness.

Made the following cosmetic changes to default line style: Dotted Yellow.

Catatan Rilis

Revision 3

Cosmetic change, added padding for better alignment.

Catatan Rilis

Revision 4

Added option ‎Pivot Higher Timeframe.

Catatan Rilis

Revision 5

Added adjustable line width and changed default color to Gray for better viewing compatibility with both Dark & Light themes.

Catatan Rilis

Revision 6

Added option Grid Lines Extend, setting this option to Right allows the age of each ‎Pivot to be seen as shown in pictured example below.

Catatan Rilis

Revision 7

Improved alignment when using Grid Lines Extend: Right with higher timeframe ‎pivots. Added option to show price labels as shown in pictured example below.

Catatan Rilis

Revision 8

Updated for Pine Script™ v5.

Added option Direction To Step Towards: "Both" which allows for stepping in both directions when using Steps by Percent or Steps by Price.
Komentar
dgtrd
Beautiful
allanster
@dgtrd, thank you for both the kindness and the coins, much appreciated!
Axrage
Can you add the alert function?
allanster
@Axrage, apologies for missing your comment, thanks for your interest and inquiry. Pivot alerts would lag (be delayed) by the number of right bars specified in pivotRn. But I will consider your request for possible inclusion in some future update.
islam_khalid
Is it possible to add an option to distribute the levels around the center point instead of above and below the center point or the price?
allanster
@islam_khalid, thanks for your interest and suggestion. I have updated the script with the additional choice Direction To Step Towards: "Both".
Juhi2709
one word - beauty..
allanster
@Juhi2709, apologies for missing your comment, thank you for the kind words!
extazzy666
Super useful!
allanster
@extazzy666, great to hear, just updated with option to extend lines right from moment of each pivot.
Lebih lanjut