treigen

DCA Bot for ProfitView

treigen Diupdate   
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
Catatan Rilis:
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
Catatan Rilis:
Fix another issue where stop loss were being incorrectly added to the results counter when stop loss functionality was turned off
Catatan Rilis:
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.
Catatan Rilis:
Added leverage notice for when used capital exceeds 100% of available capital
Catatan Rilis:
Fixed an issue with the QFL offset percentage only working with condition1
Catatan Rilis:
Fixed a bug where the normal TP order adjustment alert would trigger at the same time as the initial entry order
Catatan Rilis:
Remove an unnecessary comma in the alert mesage if the set symbol is not blank, while the set exchange is left blank
Catatan Rilis:
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.
Catatan Rilis:
Updated to always use historical data on the selected timeframes
Catatan Rilis:
Fixed using wrong treshold for RSI on deal2
Catatan Rilis:
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.
Skrip terproteksi
Skrip ini dipublikasikan secara closed-source dan anda dapat menggunakannya dengan bebas. Anda dapat memfavoritkannya untuk digunakan pada grafik. Anda tidak dapat melihat atau mengubah kode sumbernya.
Pernyataan Penyangkalan

Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.

Inggin menggunakan skrip ini pada chart?