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

⚡️ Switched VWAP to Rolling VWAP #196

Merged
merged 4 commits into from
Nov 27, 2021
Merged
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
6 changes: 3 additions & 3 deletions user_data/mgm_tools/TotalOverallSignalImportanceCalculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def initialize_weighted_buy_signal_names():
'sma_short_golden_cross',
'stoch',
'tema',
'vwap_cross'
'rolling_vwap_cross'
]


Expand All @@ -81,7 +81,7 @@ def initialize_weighted_sell_signal_names():
'sma_short_death_cross',
'stoch',
'tema',
'vwap_cross'
'rolling_vwap_cross'
]


Expand All @@ -94,7 +94,7 @@ def initialize_combined_weighted_signal_names():
'sma_short_golden_death_cross': ['sma_short_golden_cross', 'sma_short_death_cross'],
'stoch': ['stoch'],
'tema': ['tema'],
'vwap_cross': ['vwap_cross']
'rolling_vwap_cross': ['rolling_vwap_cross']
}


Expand Down
16 changes: 8 additions & 8 deletions user_data/strategies/MoniGoManiHyperStrategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
'macd': lambda df: (df['macd'] > df['macdsignal']),
# Weighted Buy Signal: MFI crosses above 20 (Under-bought / low-price and rising indication)
'mfi': lambda df: (qtpylib.crossed_above(df['mfi'], 20)),
# Weighted Buy Signal: VWAP crosses above current price
'vwap_cross': lambda df: (qtpylib.crossed_above(df['vwap'], df['close'])),
# Weighted Buy Signal: Rolling VWAP crosses above current price
'rolling_vwap_cross': lambda df: (qtpylib.crossed_above(df['rolling_vwap'], df['close'])),
# Weighted Buy Signal: Price crosses above Parabolic SAR
'sar_cross': lambda df: (qtpylib.crossed_above(df['sar'], df['close'])),
# Weighted Buy Signal: Stochastic Slow below 20 (Under-bought, indication of starting to move up)
Expand All @@ -46,8 +46,8 @@
'macd': lambda df: (df['macd'] < df['macdsignal']),
# Weighted Sell Signal: MFI crosses below 80 (Over-bought / high-price and dropping indication)
'mfi': lambda df: (qtpylib.crossed_below(df['mfi'], 80)),
# Weighted Sell Signal: VWAP crosses below current price
'vwap_cross': lambda df: (qtpylib.crossed_below(df['vwap'], df['close'])),
# Weighted Sell Signal: Rolling VWAP crosses below current price
'rolling_vwap_cross': lambda df: (qtpylib.crossed_below(df['rolling_vwap'], df['close'])),
# Weighted Sell Signal: Price crosses below Parabolic SAR
'sar_cross': lambda df: (qtpylib.crossed_below(df['sar'], df['close'])),
# Weighted Sell Signal: Stochastic Slow above 80 (Over-bought, indication of starting to move down)
Expand Down Expand Up @@ -100,7 +100,7 @@ class MoniGoManiHyperStrategy(MasterMoniGoManiHyperStrategy):
# Plot configuration to show all Weighted Signals/Indicators used by MoniGoMani in FreqUI.
# Also loads in MGM Framework Plots for Buy/Sell Signals/Indicators and Trend Detection.
plot_config = MasterMoniGoManiHyperStrategy.populate_frequi_plots({
# Main Plots Signals/Indicators (SMAs, EMAs, Bollinger Bands, VWAP, TEMA)
# Main Plots Signals/Indicators (SMAs, EMAs, Bollinger Bands, Rolling VWAP, TEMA)
'main_plot': {
'sma9': {'color': '#2c05f6'},
'sma50': {'color': '#19038a'},
Expand All @@ -109,7 +109,7 @@ class MoniGoManiHyperStrategy(MasterMoniGoManiHyperStrategy):
'ema50': {'color': '#0a8963'},
'ema200': {'color': '#074b36'},
'bb_middleband': {'color': '#6f1a7b'},
'vwap': {'color': '#727272'},
'rolling_vwap': {'color': '#727272'},
'tema': {'color': '#9345ee'}
},
# Sub Plots - Each dict defines one additional plot
Expand Down Expand Up @@ -209,8 +209,8 @@ def do_populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFr
# Volume Indicators
# -----------------

# VWAP - Volume Weighted Average Price
dataframe['vwap'] = qtpylib.vwap(dataframe)
# Rolling VWAP - Volume Weighted Average Price
dataframe['rolling_vwap'] = qtpylib.rolling_vwap(dataframe)

return dataframe

Expand Down