treigen

DCA Bot for ProfitView

treigen Mis à jour   
The base for this strategy is the "Backtesting 3commas DCA Bot v2" script by rouxam. I have made some additions, edits, and fixes, as well as tailored it for usage with ProfitView.
The strategy works in such a way that you select one or multiple rules together, in order to determine when a trade should be initiated.
The selectable rules are:
  • RSI-7: Initiate trading when the 7 period RSI goes below a specified threshold.
  • Technicals: This is essentially the TradingView screener strength. A multitude of technical indicators combined that range from Strong Sell - Sell - Buy - Strong Buy.
  • QFL: Find a support/resistance line on a specified timeframe, and initiate trading only when the price is below a certain point from this line.

Once the deal start rule is met, trading will initiate, and a series of additional orders will be placed and spaced out according to the order settings set in the indicator. These orders includes Take Profit, Stoploss, Trailing Take Profit, and specified additional entry orders to DCA your way into a position.

The indicator is set up so that by hooking this up to ProfitView, all of the signals should automatically be replicated to your assigned exchange, along with discord/telegram notifications for when the deals start and end, and the resulting pnl.

If you want to use it for spot markets, while technically possible, you will need to significantly edit the PV Alert syntax that i have supplied below.
Run this on your testnet of choice, it is likely that there are undiscovered issues at this point.
The strategy currently only works with 'Longs' at the time of publishing, but may be subject to change.



==ProfitView Setup==
!!Important!!
The assigned PV Alert name must contain the keyword 'Long', fex "DCA Long"
Uncheck the Once per Bar advanced filter option on the PV Alert you use for this.
Copy/Paste the text into the PV Alert: pastebin.com/X8BSqS8W
Notes de version:
In order to start automating the strategy after inserting your PV details, create an alert and select "alert() function calls only".

Fixed issue with a timeframe warning being shown when a rule was set to 1D or above
Notes de version:
Fix another issue where stop loss were being incorrectly added to the results counter when stop loss functionality was turned off
Notes de version:
Added possibility to do two different conditions, each can be tailored to specific market conditions, fex QFL 3m and TA 4H for bullish trend entries, or QFL 4H and RSI-7 30m for bearish trend entries.
The both will check if either of these conditions are met when starting a deal.
Notes de version:
Added leverage notice for when used capital exceeds 100% of available capital
Notes de version:
Fixed an issue with the QFL offset percentage only working with condition1
Notes de version:
Fixed a bug where the normal TP order adjustment alert would trigger at the same time as the initial entry order
Notes de version:
Remove an unnecessary comma in the alert mesage if the set symbol is not blank, while the set exchange is left blank
Notes de version:
Added a new selectable rule for starting a deal -> SNV
SNV in this case stands for "Stochastic and Volatility": If the stochastic on the selected timeframe is above a threshold, and the current volatility has a high percentile compared to earlier readings, begin a deal.

Added a selectable mintick, allowing the the rounding of order price values to a custom number, fex if the exchange has orders with a price difference of 0.5.
Fixed a bug with Deal Start Condition 2 where it might enter a deal even if no condition was selected.
The information box will now display an error if the timeframe selected on any Deal Start Condition 2 is below current chart timeframe.
Notes de version:
Updated to always use historical data on the selected timeframes
Notes de version:
Fixed using wrong treshold for RSI on deal2
Notes de version:
Added Moving Average as a selectable rule. Entries can be filtered to begin a deal if the price is either above or below the MA on the selected timeframe.
Script protégé
Ce script est publié en code source fermé et vous pouvez l'utiliser librement. Vous pouvez le préférer pour l'utiliser sur un graphique. Vous ne pouvez pas visualiser ou modifier son code source.
Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?