treigen

DCA Bot for ProfitView

treigen Cập nhật   
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
Phát hành các Ghi chú:
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
Phát hành các Ghi chú:
Fix another issue where stop loss were being incorrectly added to the results counter when stop loss functionality was turned off
Phát hành các Ghi chú:
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.
Phát hành các Ghi chú:
Added leverage notice for when used capital exceeds 100% of available capital
Phát hành các Ghi chú:
Fixed an issue with the QFL offset percentage only working with condition1
Phát hành các Ghi chú:
Fixed a bug where the normal TP order adjustment alert would trigger at the same time as the initial entry order
Phát hành các Ghi chú:
Remove an unnecessary comma in the alert mesage if the set symbol is not blank, while the set exchange is left blank
Phát hành các Ghi chú:
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.
Phát hành các Ghi chú:
Updated to always use historical data on the selected timeframes
Phát hành các Ghi chú:
Fixed using wrong treshold for RSI on deal2
Phát hành các Ghi chú:
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.
Mã được bảo vệ
Tập lệnh này được xuất bản mã nguồn đóng và bạn có thể sử dụng một cách tự do. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ. Bạn không thể xem hoặc sửa đổi mã nguồn.
Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?