TradingView
dimkud
2023年3月4日早上2點16分

Divergence for Many [Dimkud - v5] 

1INCH / TetherUS PERPETUAL CONTRACTBinance

描述

Strategy is based on "Divergence for Many Indicators v4 ST" strategy by CannyTolany01
which is based on "Divergence for Many Indicator" indicator by LonesomeTheBlue

This strategy is searching for divergences on 18 indicators which you can select and optimise one by one.
Additionally you can connect any other External Indicator value. (just add this indicator the the chart and select option in settings)

To the original indicator/strategy I have added 9 additional indicators:
( Money Flow Index, Williams_Vix, Stochastic RSI , SMI Ergodic Oscillator, Volume Weighted MACD , Bull Bear Power, Balance of Power , Relative Volatility Index , Logistic Settings).

Converted strategy to v5 of Pine Script.
Added Static SL/TP in percents (%).

Added filters to filter enters:
1. Volume Weighted MACD - Multi-TimeFrame Filter
(It checks for histogram to falling or rising for a set periods of bars)

2. Money Flow Index - Multi-TimeFrame Filter
(It checks if MFI Oscillator is in the set diapason.
Also It checks if MFI is falling or rising for a set periods of bars )

3. ATR filter
(check changes in fast ATR to slow ATR )

Strategy shows good backtest results on many crypto tokens on 45m - 1h periods. (with parameters optimisation for every indicator)

To find best parameters - you can enable indicators one-by one, and optimise best parameters for each of them.
Then enable all indicators with successful results.
Optimise SL/TP.
Then try to enable and optimise filters (channels etc.)

The better is to optimise parameters separately for Short and Long trading. And run two separate bots (in settings enable only Long or only Short.)

Updates:
- Added visualisation for open trades (SL/TP)
- Added Volatility filter by ATR with many options for tests.
- Fixed some small bugs.
- Added second RSI filter (you can use two RSIs with different TF or settings)
- Updated ATR volatility and MFI filter. Removed non-effective options
- Added CCI filter
- Added option to Enable/Disable visualisation of TP/SL on chart
- Fixed one small quick bug. ("ATR filter short" was not working)
- Added Super Trend filter
- Added Momentum filter
- Added Volume Filter
- All "request.security" MultiTimeFrame calls changed to 100% non-repait function "f_security()"

發布通知

Fixed bug with the function 'Use Opposite Signal SL'
(close current order on Opposite signal)

Please Note:
If you are using function 'Use Opposite Signal SL'
And you want to use one of the available filters for signals (RSI, MFI, CCI, Mom etc).
Then you must activate and LONG and SHORT options for these filters (ex. 'Use RSI LONG Range' and 'Use RSI SHORT Range').
(Even if you have configured the strategy to trade only One direction.)

發布通知

- Added option to open Opposite order after SL
評論
upx98
Its great work, Man!
You boosted my vector of development divergences strategy

will be cool if in the next version you add more take profits or trailing stoploss or dynamic stoploss
ikova82
Thank you for sharing!
I tested your script, works..meh! But there is a lot of room for improvement! The first things I noticed are probably interested in you to optimize the script:
1) you completly ignored hidden divergences (many backtest-trades are regular and hidden at the same time, causes in a lot of fail signals) also signals running in hidden divergences and get kicked out
2) signals seems to be ignoring ema 200, going long/short in a active big down/uptrend isnt a good choice

just my 2 cents :)
EK-Neverforget
Alerts didn't trigger.
Any work around fix?
ymk000
I made a slight change to the minimum divergence part. It doesn't open entries below the minimum now.
However, it still continues to display divergences that are smaller than the minimum.

total_div = 0
ExtraEntryCondition=true
for x = 0 to array.size(all_divergences) - 1
div_value = array.get(all_divergences, x)
total_div += div_value > 0 ? 1 : div_value < 0 ? -1 : 0

if total_div < showlimit
ExtraEntryCondition:=false
dimkud
Useful function!
antonrex
@ymk000, When I completed your insert, an error occurs - Inappropriate input “div_value”, “end of line without line continuation” is expected. How to fix?
dciv
Can there also be added option for divergences for tickers, like ES, NQ etc
hardweiser
where hidden divergence?
dimkud
@hardweiser, Hidden divergences = signal possible trend continuation
So it's difficult to use and script don't use it.
hardweiser
@dimkud, ok, thanks
更多