R3c0nTrader

Fibonacci Zone Study w/Candles - R3c0nTrader

R3c0nTrader 已更新   
Credits:
Thank you "eykpunter" for granting me permission to use "Fibonacci Zones" to create this study

What does this do? How is it different?
This study was created so it can be used with the strategy 'Fibonacci Zone DCA Strategy - R3c0nTrader' in order to generate buy/sell signals for a 3Commas bot.
I was not able to use "eykpunter's" "Fibonacci Zones" to create these signals as it was missing the code for this. To create the buy or sell signal you need to be able to create an alert for when the price moves through the Fib levels. Unfortunately, the "price" is not available to be selected when creating an alert with the original study. Hence the need to create this new study and to resolve the issue.

This study has overlay turned off by default so it will appear in a separate pane below your active chart. I did this so I can clearly view and separate the strategy from the study.

Steps Overview:
Add the study to your chart
Configure the study to match the Fib length you used in the strategy.
Create Alerts from the study to generate the buy or sell signals to 3Commas

The below steps for creating signals are just examples! Since there are numerous ways you can open or close a trade from a signal, please do your own testing. This cannot be understated.

Example of how to generate buy signals:
After adding the study, select the three dots for this study and click on "Add an alert on Fibonacci Zone Study /w Candles…"
Setup the condition to trigger the alert. If you want to initiate a buy when the price crosses over the top of the lower Fib zone (downtrend zone), then use the following:
Condition>Fibonacci Zone Study>Price High>Crossing Up>Fibonacci Zone Study>Top-Low Fib Border
Options>Once per bar
Expiration>Open-ended
Alert actions>Webhook URL (use the 3Commas webhook URL)
Alert name>Enter a name, "BUY Paper-Fib-Bot"
Message>Use the 3Commas message from the paper bot to open the trade

Example of how to generate sell signals:
After adding the study, select the three dots for this study and click on "Add an alert on Fibonacci Zone Study /w Candles…"
Setup the condition to trigger the alert. If you want to initiate a sell when the price reaches the top of the High Fib zone (uptrend zone), then try the following:
Condition>Fibonacci Zone Study>Price High>Crossing Up>Fibonacci Zone Study>Top-High Fib Border
(Note: I used "Crossing Up" but "Crossing" is another option; I just haven't tested it yet with a paper bot)
Options>Once per bar
Expiration>Open-ended
Alert actions>Webhook URL (use the 3Commas webhook URL)
Alert name>Enter a name, "SELL Paper-Fib-Bot"
Message>Use the 3Commas message from the paper bot to close the trade
版本注释:
Updated comments to correct script name. No other changes.
版本注释:
Update: Renamed Fib borders as old names were incorrect and confusing.
版本注释:
Added buy arrows and all the logic behind them so they should work with the 144 different ways to open a trade
Added a ton of options, now mimics most of the settings found in the strategy
Interesting statistic, Lines of code increased from 22 to 137
版本注释:
It is easier now to create Buy and Sell alerts. Just click to add alert and select Buy or Sell. Enjoy.
版本注释:
Buy/Sell Signals now only appear for unique trades which match the strategy.

Updated and revamped the menu.
Added new exit settings to match the new available options in the strategy.
版本注释:
Just updating chart
版本注释:
Updates:
Fixed trades not closing according to specified trailing deviation % ; Found trades were closing far later than they should be. Researched new calculation to fix this.

When "Trailing Deviation" is used, the following lines will now appear on the chart (these can be disabled in 'Style' Menu):
Original TTP value = White line showing the original target take profit value
Stop Value = Red line which follows the price based on the trailing value and is used to help calculate the trailing stop. If the price moves up, this pushes the yellow Trailing Stop Loss line up.
Trailing Stop Loss = Yellow line showing the trailing stop loss.


Added option for highlighting background color for buy/sell arrows; Added TP Area and SO Area

Added option for specifying the "Max ADX value", the "Min -DI value to open trade", and the "Max -DI value to open trade".
Tip: Use a DMI indicator to locate possible Min and Max values to use for ADX, +DI, and -DI.
版本注释:
Updates:
-Added TTP % input option. If you were using this in the strategy, you can use it in the study script to generate sell signals.
-Fixed issue where the strategy and the study would sometimes appear not to line up their buy and sell symbols on the chart. Issue resolved by using the closing candle value during calculation of SO orders.
-Fixed issue where sometimes the study would show buy and sell arrows on the same candle. Setup a timer to prevent buy and sell on the same candle.
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?