[pp] Fib Alerts

Using the new input.price() function we can now automate our fibonacci tools a little better.

This tool is designed with the intention of trading off of a fibonacci level using alerts.

How to use:

1.Add the indicator to your chart.
2. Place the bottom price where you would normally start your fibonnaci drawing
3. Place the top price where you would normally end your fibonacci drawing
4. Set your alert syntax "buy alert message" and "sell alert message" Should be replaced with webhook configurations or something better.
5. Fibonacci values > 1 (ie. 0.382, 0.5, 0.618) are recognized as retracements and work well as buying opportunities. When the price crosses one of these levels the "buy alert message" alert will be immediately triggered ONCE per BAR (I may update this in the future so it can only trigger ONCE ever to avoid multiple orders)
6. Fibonacci values < 1 (ie . -0.113, -0.27) are recognized as extensions levels and work well as selling opportunities. When the price crosses one of these levels the "Sell alert message" alert will be triggered.

If anyone knows how to convert the fibonacci values to logarithmic values I would greatly appreciate insight.
Release Notes:
- Squashed a bug 🐛
- Added option for sell, buy, signaling based on fib level.
- Better labels
- Tried to make it compatible with 3commas. Unfortunately, I can't publish Open source script with private libraries. And I don't want to publish my private libraries for obvious reason. If enough people want I can publish this script with 3commas integration as a private invite closed source publication.
- Let me know if you want 3commas auto integration.

Also, still looking for help with logarithmic fib levels. I'll figure it out sooner or later.
Release Notes:
Added Realtime Lock to Avoid label repainting.
Cleaned some code.
Added level offset feature.

Tried to fix the interactive levels to reset when changing the chart. This is currently impossible to do with the current version of Pine. Perhaps, they will change this in the future. For now, just use this as a chart specific tool. The easiest way to use it efficiently is just to delete it and re-add it to the chart. Ideally, I would create this with two modes. One for interactive mode (current) and one for automatic Fib levels. Unfortunately, it's limited to interactive mode only on initialization.

Trade, Code, & Travel.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.


The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?