TradingView
LonesomeTheBlue
Dec 24, 2021 7:43 PM

Gann Fan 

Bitcoin / TetherUSBinance

Description

Hello All,

For long time I have been getting many requests about Gann Fan indicator. now we have linefill() function in Pine Language and I think it's right time to make Gann Fan Indicator. Many Thanks to Pine Team for adding many new features to the Pine Language!

How this indicator works:
- It calculates midline (1/1)
- By using midline it calculates other lines (1/2, 1/3, 1/4...etc)
- It calculates highest/lowest Pivot Points in last 280 bars.(by default it's 280 bars, you can change it and pivot period)
- It checks the location of highest/lowest Pivot Points
- After the calculation of the Gann Fan lines, it draws lines, puts Labels and paints the zones between the lines according to the colors set by the user

Long time ago I created a special algorithm for calculating the line with 45 degree and I used it for "1/1" line. Anybody who needs it can use this algorithm freely ;)

Options:
You can change following items;
- The colors
- Transparency. Possible values for transparency are from 0 (not transparent) to 100 (invisible)
- Line styles
- Loopback Period (by default it's 280)
- Pivot Period (by default it's 5)
- Enable/disable Labels
- Label location (by default it's 50


Tradingview Gann Fan page: The Gann Fan is a technical analysis tool created by WD Gann. The tool is comprised of 9 diagonal lines (extending indefinitely) designed to show different support and resistance levels on a chart. These angles -drawn from main tops and bottoms- divide time and price into proportionate parts and are often used to predict areas of support and resistance, key tops and bottoms and future price moves. Please note that the chart needs to be scaled properly to ensure the market has a square relationship....


Enjoy!

Comments
tbiktag
Fantastic work! Thanks for sharing it with the community
LonesomeTheBlue
@tbiktag, Thank you mate!
Cervinmole
Hello
Many thanks for sharing this beautiful script. 🙏🙏
I have 3 questions, which I would like to ask you, please:

🔵 Q1/ Between lines 28 and 33, there is this:
float l_ = ta.lowest(292)
float h_ = ta.highest(292)
float perc = (h_ - l_) /82
float hh = h_ + perc * 10
float ll = l_ - perc * 8
float middle = (hh - ll) / 131.0

Could you tell us what the following values are: 82, 10, 8, and 131?

🔵 Q2/ Can we use your script, both for very small timeframes (1', or 3') and for medium or long timeframes (1h, 4h, 1D, 1W)? Your recommendation.

🔵 Q3/ Maybe 1 idea to add to your script:
the possibility of being able to choose to see, or not, 3 angles (example: 30 °, 60 °, and especially 45 °) in another Timeframe superimposed.
Example: Graph in the 3' timeframe with your indicator + the other 3 angles of the 15' Timeframe (thickness of these 3 angles, thicker to distinguish them from the angles of the timeframe of the graph).
navaroj
@LonesomeTheBlue I have a Query. For 1 x 1 , the Time(X axis ) and Price (Y axis) ,the Scaling of Price and Time should be equal( For P=T). How did you do that? Can you please enlighten us. Would be very helpful.Thanks in Advance..
amazinggadgets0221
Please, add alerts for changing Gann fan direction. It will really a big help for community.
Crypto_Zombianz
Bro i never use any gann level indicator before, its my first time that i m using it, and its like a magic.....many many thanks bro
BLKJaguar91
you're a wizard harry
LonesomeTheBlue
@BLKJaguar91, Thank you :)
Buen0Time5
Topical Gann ...
CMFXBORSACRYPTO
emeğinize sağlık hocam
More