R3c0nTrader

Fibonacci Zone DCA Strategy - R3c0nTrader

R3c0nTrader מעודכן   
Credits:
Thank you "eykpunter" for granting me permission to use "Fibonacci Zones" to create this strategy
Thank you "junyou0424" for granting me permission to use "DCA Bot with SuperTrend Emulator" which I used for adding bot inputs, calculations, and strategy

Pre-requisites:
You can use this script without a 3Commas account and see how 3Commas DCA Bot would perform. However, I highly recommend signing up for their free account, going through their training, and testing this strategy with a paper bot. This would give you a base understanding of the settings you will see in this strategy and why you will need to know them.

What can this do?
First off, this is a Long only strategy as I wrote it with DCA in mind. It cannot be used for shorting. Shorting defeats the purpose of a DCA bot which has a goal that is Long a position not Short a position. If you want to short, there are plenty of free scripts out there that do this.

I created this script out of curiosity and I wanted to see how a strategy based on “Fibonacci” levels would work with a 3Commas DCA bot. I came across "eykpunter’s" "Fibonacci Zones" study and in TradingView and I found it to be a very interesting concept. The "Fib Zones" in his study are basically a "Donchian Channel" of 4 Fibonacci lines. These are the High @ 0.236, Center High @ 0.382, Center Low @ 0.618, and Low @ 0.764.

The Fib Zones in this strategy can be used as conditions to open a trade as well as closing a trade. There is also the option to close a trade based on a Target Take Profit (%).

Advanced Fibonacci trading is also supported by specifying additional parameters for Trade Entry and Exit.

For example, for order entry, you can increase the minimum trend strength to open an order via the "minimum ADX value" option. You can also further limit order entry by selecting the option to "Only open trades on bullish +DI" (Positive Directional Index).

Or you can play the contrarian. For example, I would look for "buying the dip" opportunities by doing the following under "Trade Entry Settings":
Set the "Min ADX value to open trade" to zero
Set the option "Open a trade when the price moves" to "1-To the bottom of Downtrend Fib zone" or "2-Higher than the top of the Downtrend Fib zone"
Uncheck option "Only open trades on bullish +DI"
Set the 'Min ADX value to open trade' to Zero
Set the 'Max +DI value to open trade' to a value between 10-20.

For Trade Exit settings, I can use a "Target Take Profit (%)" or one of the High Fib levels to close the trade.

Here's an example result when using a Contrarian-Fibonacci-Zone-DCA strategy:


Explanation of Chart lines and colors on chart



Six Options for Entering a Fibonacci Trade
Open a trade when the price moves:
1-To the bottom of Downtrend Fib zone
2-Higher than the top of the Downtrend Fib zone
3-Higher than the bottom of Ranging Fib Zone
4-Higher than the top of Ranging Fib Zone
5-Higher than the bottom of Uptrend Fib Zone
6-To the top of Uptrend Fib Zone


Three Options for Exiting a Fibonacci Trade
Take profit using:
"Target Take Profit (%)"
"High Fibonacci Border-1"
"High Fibonacci Border-2"

הערות שחרור:
Updated line colors for Fib zones to make it more discernable from the Take Profit line; updated thickness of TP, Avg Price, and SO line.
הערות שחרור:
Added Fib-Based Stop Loss option. Use this to exit the trade when the "High Fibonacci Border-1" (the highest fib line) falls below the average price. Works with all 3 trade exit options.
הערות שחרור:
Updated and reorganized the menu, the strategy and study scripts both have similar menus and are less confusing.
On the strategy menu, added more options and control for when to enter a trade (144 variations!)
Interesting statistic, lines code grew from 218 to 237
הערות שחרור:
Updates:

Reduced extraneous signals:
Buy/Sell Signals now only appear for unique trades which match the strategy.


Menu touchups and updated with more options

Fib Borders now listed with the highest border at the top and the lowest at the bottom

More options to exit trade
הערות שחרור:
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 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.

These updates have also been applied to the corresponding study script and can be used with this strategy script to generate buy/sell signals.
סקריפט קוד פתוח

ברוח TradingView אמיתית, מחבר הסקריפט הזה פרסם אותו בקוד פתוח, כך שסוחרים יכולים להבין ולאמת אותו. כל הכבוד למחבר! אתה יכול להשתמש בו בחינם, אך שימוש חוזר בקוד זה בפרסום כפוף לכללי הבית. אתה יכול להכניס אותו למועדפים כדי להשתמש בו בגרף.

כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.

רוצה להשתמש בסקריפ זה בגרף?