Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

⚡️ Weighted Signal: PVT - Price Volume Trend #54

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions user_data/Total-Average-Signal-Importance-Report.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
Signal importance report
--------------------------------------------------------------------
Stake currency: USDT

Total Overall Signal Importance:
--------------------------------------------------------------------
avg | down | side | up
adx_strong_up_down: 53.17% | 46.5% | 50.0% | 63.0%
bollinger_bands: 32.67% | 15.5% | 20.0% | 62.5%
ema_long_golden_death_cross: 43.5% | 67.5% | 49.5% | 13.5%
ema_short_golden_death_cross: 43.17% | 30.0% | 35.5% | 64.0%
macd: 32.83% | 10.0% | 25.0% | 63.5%
rsi: 52.5% | 46.5% | 50.0% | 61.0%
sma_long_golden_death_cross: 43.17% | 63.0% | 42.5% | 24.0%
sma_short_golden_death_cross: 40.5% | 59.5% | 14.5% | 47.5%
vwap_cross: 67.0% | 70.0% | 76.0% | 55.0%
pvt_cross: 30.83% | 77.5% | 11.0% | 4.0%

Total Overall Buy Signal Importance:
--------------------------------------------------------------------
avg | down | side | up
adx_strong_up: 91.33% | 93.0% | 100.0% | 81.0%
bollinger_bands: 30.67% | 0.0% | 0.0% | 92.0%
ema_long_golden_cross: 16.0% | 35.0% | 13.0% | 0.0%
ema_short_golden_cross: 46.33% | 48.0% | 20.0% | 71.0%
macd: 19.33% | 20.0% | 11.0% | 27.0%
rsi: 55.0% | 47.0% | 45.0% | 73.0%
sma_long_golden_cross: 49.33% | 74.0% | 26.0% | 48.0%
sma_short_golden_cross: 51.33% | 100.0% | 29.0% | 25.0%
vwap_cross: 90.33% | 100.0% | 71.0% | 100.0%
pvt_cross: 28.67% | 64.0% | 22.0% | 0.0%

Total Overall Sell Signal Importance:
--------------------------------------------------------------------
avg | down | side | up
adx_strong_down: 15.0% | 0.0% | 0.0% | 45.0%
bollinger_bands: 34.67% | 31.0% | 40.0% | 33.0%
ema_long_death_cross: 71.0% | 100.0% | 86.0% | 27.0%
ema_short_death_cross: 40.0% | 12.0% | 51.0% | 57.0%
macd: 46.33% | 0.0% | 39.0% | 100.0%
rsi: 50.0% | 46.0% | 55.0% | 49.0%
sma_long_death_cross: 37.0% | 52.0% | 59.0% | 0.0%
sma_short_death_cross: 29.67% | 19.0% | 0.0% | 70.0%
vwap_cross: 43.67% | 40.0% | 81.0% | 10.0%
pvt_cross: 33.0% | 91.0% | 0.0% | 8.0%

Losing Open Trade Sell Unclogger:
--------------------------------------------------------------------

minimal_losing_trade_duration_minutes: 36
minimal_losing_trades_open: 4
trend_lookback_candles_window: 24

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion user_data/mgm-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"max_trend_total_signal_needed_candles_lookback_window_value": 6,
"search_threshold_weighted_signal_values": 10,
"search_threshold_trend_total_signal_needed_candles_lookback_window_value": 1,
"number_of_weighted_signals": 9
"number_of_weighted_signals": 10
},
"stoploss_spaces": {
"stoploss_min_value": -0.02,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TotalOverallSignalImportanceCalculator:
-----------------------------------------------------------------
First do 1 or 2 HyperOpt Runs and extract your results to a 'mgm-config-hyperopt.json'

Then execute:
Then execute:
`python ./user_data/mgm_tools/Total-Overall-Signal-Importance-Calculator.py` from your favorite terminal / CLI
to calculate the overall importance of the signals being used. The higher the score of a signal the better!
"""
Expand Down Expand Up @@ -73,7 +73,8 @@ def initialize_weighted_buy_signal_names():
'rsi',
'sma_long_golden_cross',
'sma_short_golden_cross',
'vwap_cross'
'vwap_cross',
'pvt_cross'
]


Expand All @@ -87,7 +88,8 @@ def initialize_weighted_sell_signal_names():
'rsi',
'sma_long_death_cross',
'sma_short_death_cross',
'vwap_cross'
'vwap_cross',
'pvt_cross'
]


Expand All @@ -101,7 +103,8 @@ def initialize_combined_weighted_signal_names():
'rsi': ['rsi'],
'sma_long_golden_death_cross': ['sma_long_golden_cross', 'sma_long_death_cross'],
'sma_short_golden_death_cross': ['sma_short_golden_cross', 'sma_short_death_cross'],
'vwap_cross': ['vwap_cross']
'vwap_cross': ['vwap_cross'],
'pvt_cross': ['pvt_cross']
}


Expand Down
16 changes: 14 additions & 2 deletions user_data/strategies/MoniGoManiHyperStrategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
# Weighted Buy Signal: SMA short term Golden Cross (Short term SMA crosses above Medium term SMA)
'sma_short_golden_cross': lambda df: (qtpylib.crossed_above(df['sma9'], df['sma50'])),
# Weighted Sell Signal: VWAP crosses above current price
'vwap_cross': lambda df: (qtpylib.crossed_above(df['vwap'], df['close']))
'vwap_cross': lambda df: (qtpylib.crossed_above(df['vwap'], df['close'])),
# Weighted Buy Signal: PVT crosses above PVT_SMA (Price and volume increase)
'pvt_cross': lambda df: (qtpylib.crossed_above(df['pvt'], df['pvt_sma']))
}

# Define the Weighted Sell Signals to be used by MGM
Expand All @@ -52,7 +54,9 @@
# Weighted Sell Signal: SMA short term Death Cross (Short term SMA crosses below Medium term SMA)
'sma_short_death_cross': lambda df: (qtpylib.crossed_below(df['sma9'], df['sma50'])),
# Weighted Sell Signal: VWAP crosses below current price
'vwap_cross': lambda df: (qtpylib.crossed_below(df['vwap'], df['close']))
'vwap_cross': lambda df: (qtpylib.crossed_below(df['vwap'], df['close'])),
# Weighted Sell Signal: PVT crosses below PVT_SMA
'pvt_cross': lambda df: (qtpylib.crossed_below(df['pvt'], df['pvt_sma']))
}

# Returns the method responsible for decorating the current class with all the parameters of the MGM
Expand Down Expand Up @@ -118,6 +122,10 @@ class MoniGoManiHyperStrategy(MasterMoniGoManiHyperStrategy):
},
'RSI (Relative Strength Index)': {
'rsi': {'color': '#7fba3c'}
},
'PVT (Price Volume Trend)': {
'pvt': {'color': '#19038a'},
'pvt_sma': {'color': '#ae231c'}
}
}
}
Expand Down Expand Up @@ -183,6 +191,10 @@ def do_populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFr
# VWAP - Volume Weighted Average Price
dataframe['vwap'] = qtpylib.vwap(dataframe)

# PVT - Price Volume Trend
dataframe['pvt'] = qtpylib.pvt(dataframe)
dataframe['pvt_sma'] = ta.SMA(qtpylib.pvt(dataframe), timeperiod=21)

return dataframe

def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
Expand Down