TradingView
pAulseperformance
19 Okt 2021 pukul 22.08

[pp] Fib Alerts 

Solana / BitcoinFTX

Huraian

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.

Nota Keluaran

- 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.

Nota Keluaran

Added Realtime Lock to Avoid label repainting.
Cleaned some code.
Added level offset feature.

Notes:
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.
Komen
Meowella7777
Thank you Paul :))
pAulseperformance
@Meowella7777, Thank you! :) You inspired me to update this with 3commas integration
Meowella7777
berkusacoin
hi thanks for sharing , how can i reapeat same buy orders if price rich the top price again and again ?? maybe 2 or 3 times ??
pAulseperformance
@berkusacoin, You can create an alert that triggers more than once, but I would recommend using this as a one off. So you draw your fib, set your alerts. Rinse and repeat.
berkusacoin
@pAulseperformance, just i want to try to buy bottom levels like0.236 0.382 0.5 an sell 0.88 1 1.27 and repeat buy orders if sell order filled etc
MasBart
Thanks for this very nice script. Would it be possible if we can reset the top and bottom once we switch to other stocks/pairs/coins ? Or perhaps to put the lines for both in the displayed chart area so we can drag the lines? (instead of finding the top or bottom if the price difference is too high or going to the indicator settings to type the top and bottom price?)
pAulseperformance
@MasBart, My pleasure! I've also noticed that this indicator is very chart specific, which is fine for its intended purpose. (I wanted to automatically trade fibonacci levels with the least amount of effort possible). Typically what I am doing is drawing the fib, setting the alerts for the levels I want to buy and sell at and then creating one master anyalert() that will be sent to my bot. When I move on to another chart I just delete and add the script again, but I will see if I can add in some peak finding logic that will adjust to local min/max levels if the chart is changed to make things easier. :)
MasBart
@pAulseperformance, Thanks . I've noticed these 'difficulties' with the new interactive feature of pinev5. Cheers :-).
Sojum843
Hello sir , amazing script .. Is it possible to add alert on each specific levels with buy or sell signal so that infuture if price returns to that level it will automatically send buy sell alert ?
Thanks in advance
Lebih