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

Conversation

andif888
Copy link
Contributor

@andif888 andif888 commented Jun 6, 2021

This adds a "Price Volume Trend Indicator" to the strategy according to this implemenation at https://www.tradingview.com/script/3Ah2ALck-Price-Volume-Trend/

@Rikj000
Copy link
Owner

Rikj000 commented Jun 6, 2021

First of all, thank you! 🙏
But it's a bit unclear to me which test results are which, some direct BackTest results here would be the easiest for us!

  • So I'm assuming the older .fthypt file would be a vanilla test and the newer .fthypt file a test with the new PVT indicator implemented?
  • Or is this 2 tests of 1 process (Run 1 & Run 2) with the PVT indicator implemented?

In case of the latter then I'll have to ask you for a vanilla test (without the PVT indicator, but using the same --random-state so we can compare before/after on an identical run)

@Rikj000 Rikj000 added Feature - Enhancement Update or improvement to existing feature In Progress This is being worked on labels Jun 6, 2021
@Rikj000 Rikj000 linked an issue Jun 6, 2021 that may be closed by this pull request
@andif888
Copy link
Contributor Author

andif888 commented Jun 6, 2021

commit: dc3142a

.fthypt file without pvt -> strategy_MoniGoManiHyperStrategy_no_pvt.fthypt

.fthypt file with pvt -> strategy_MoniGoManiHyperStrategy_with_pvt.fthypt

command line:

freqtrade hyperopt -s MoniGoManiHyperStrategy \
-c ./user_data/mgm-config.json \
-c ./user_data/mgm-config-private.json \
--hyperopt-loss WinRatioAndProfitRatioLoss \
--spaces all \
-e 300 \
--random-state 2 \
--timerange 20210521-

highlevel results:

without pvt

+--------+---------+----------+------------------+--------------+-------------------------------+-----------------+-------------+                            
|   Best |   Epoch |   Trades |    Win Draw Loss |   Avg profit |                        Profit |    Avg duration |   Objective |
|--------+---------+----------+------------------+--------------+-------------------------------+-----------------+-------------|
| * Best |   2/300 |        4 |      0    4    0 |        0.00% |                            -- | 0 days 05:44:00 |          -0 |
| * Best |   4/300 |       70 |     31   20   19 |        0.92% |        29.037 USDT    (5.81%) | 0 days 11:19:00 | -2,854.78477 |
| * Best |   9/300 |       67 |     43    2   22 |        0.80% |        24.240 USDT    (4.85%) | 0 days 08:20:00 | -3,453.67246 |                           
|   Best |  88/300 |       92 |     45    8   39 |        1.12% |        46.309 USDT    (9.26%) | 0 days 09:00:00 | -5,028.57406 |                           
 [Epoch 300 of 300 (100%)] ||                                                                                       | [Time:  0:20:44, Elapsed Time: 0:20:44]

with pvt

+--------+---------+----------+------------------+--------------+-------------------------------+-----------------+--------------+                           
|   Best |   Epoch |   Trades |    Win Draw Loss |   Avg profit |                        Profit |    Avg duration |    Objective |
|--------+---------+----------+------------------+--------------+-------------------------------+-----------------+--------------|
| * Best |   2/300 |      139 |     45   26   68 |        0.29% |        18.105 USDT    (3.62%) | 0 days 13:37:00 | -1,301.19708 |
| * Best |  18/300 |       90 |     41   18   31 |        0.38% |        15.224 USDT    (3.04%) | 0 days 06:41:00 | -1,539.64835 |                           
|   Best |  36/300 |       99 |     39   19   41 |        0.72% |        32.016 USDT    (6.40%) | 0 days 12:29:00 | -2,799.91656 |                           
|   Best |  73/300 |       89 |     39   15   35 |        0.97% |        39.001 USDT    (7.80%) | 1 days 08:03:00 | -3,794.09449 |                           
|   Best | 259/300 |       75 |     27   24   24 |        1.46% |        49.272 USDT    (9.85%) | 0 days 10:57:00 | -3,937.80395 |                           
|   Best | 295/300 |       72 |     26   32   14 |        1.70% |        55.163 USDT   (11.03%) | 0 days 15:09:00 | -4,422.25698 |                           
|   Best | 300/300 |       65 |     27   30    8 |        1.82% |        53.369 USDT   (10.67%) | 0 days 18:15:00 | -4,921.45121 |                           
 [Epoch 300 of 300 (100%)] ||                                                                                       | [Time:  0:20:05, Elapsed Time: 0:20:05]

@Rikj000 Rikj000 added Planned Planned feature, improvement or bugfix (not being worked on yet) and removed In Progress This is being worked on labels Jun 6, 2021
@@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: please fix the # identation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 8f2b61f

@Rikj000
Copy link
Owner

Rikj000 commented Jun 6, 2021

Thank you for your work so far @andif888! 🦾
However please in the future let the HyperOpts finish so we can be more certain about the results 🙂
(For me it also takes hours for each HyperOpt, which might look long at first, but actually it's rather short to find things like these out in my opinion, currently my machine has been occupied all weekend HyperOpting for a good set of Freqtrade protections and I'm still not where I want them to be, only have been able to do a good handful of tests since these tests do take their time 😄)

However at the moment I can't see any clear improvements in the HyperOpt Results here can you? 👀

Also I'm thinking about only adding new indicators / weighted signals into the mix at the end of a development cycle, a little bit before packing up a release. So we'll always remain to have consistency in our weighted signals while implementing the things for the next version of MGM.

To keep track of upcoming versions and things still needed in them you can check the Milestones

@Rikj000 Rikj000 added the Needs Testing This feature, improvement or bugfix still is in need of testing label Jun 9, 2021
@Rikj000 Rikj000 removed their assignment Jun 13, 2021
@Rikj000 Rikj000 removed the Planned Planned feature, improvement or bugfix (not being worked on yet) label Jun 14, 2021
@andif888 andif888 closed this Jun 19, 2021
@andif888 andif888 deleted the feature_pvt_indicator branch June 19, 2021 10:29
@Rikj000 Rikj000 changed the title Feature: Price Volume Trend Indicator Weighted Signal: PVT - Price Volume Trend Indicator Jul 12, 2021
@Rikj000 Rikj000 changed the title Weighted Signal: PVT - Price Volume Trend Indicator Weighted Signal: PVT - Price Volume Trend Jul 12, 2021
@Rikj000 Rikj000 changed the title Weighted Signal: PVT - Price Volume Trend ⚡️ Weighted Signal: PVT - Price Volume Trend Sep 5, 2021
@Rikj000 Rikj000 removed the Needs Testing This feature, improvement or bugfix still is in need of testing label Sep 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature - Enhancement Update or improvement to existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

📝 Other & Better indicators!
3 participants