TradingView
CryptoComrade
15 mars 2021 14:33

Grid System 

Cognex CorporationNASDAQ

Description

This script plots a a square composed of 8 equilateral triangles ("grid"). User can set the frequency of calculation/interval by adjusting the 't' parameter.


Steps for calculating grid:
1. Find the highest high and lowest low for last 't' periods.
2. Calculate midpoint for prices during that interval (highest high + lowest low) / 2.
3. Center of the grid = {time[t/2], price midpoint}.

Interpretation:
Volatility: If price is volatile for a given period, the area of the grid will expand, since the top and bottom sides are based on the highest high and lowest low for the period. So as range for a given period increases, the grid's area increases.

Support and resistance: The grid's center line often acts as the support / resistance line.

Trend Following: The example chart shows Cognex (CGNX) price using an interval of t=365. When the stock's trend was bullish, the area of the grids became increasingly larger and the y-coordinate of each grid was greater than that of the previous grid.
Commentaires
xxxSALTHEART
Dude.....well done!
decentMeerkat007
how do you use this please? Thanks
UnknownUnicorn6774437
A wonderful indicator! Very useful when used at different time intervals. Thanks!!!!
decentMeerkat007
anyone know how to use this please? thanks
rangadv
hi,
which time frame is advisable to check this
NorthStarDayTrading
With just 23 lines of code. Love it!
CodyMaki
very cool quick question would it be ok to use a 240 time setting or should i keep the pre set input 365
nooby_trader
@CodyMaki, What 365 means? 365 bars?
maroof81
thank you
maroof81
Thanks
Plus