This is a work in progress. It is also untested and not in any way financial advice.
Combine multiple metrics in an attempt to predict local tops and bottoms.
Can be used as a buy / sell signal or as a way to dynamically DCA based on how 'risky' current price level is.
There are 2 pine scripts in here, both are indicators designed to work with TradingView.
It's the same logic in both, one of them in an overlay and the other one is an oscillator scaled to the 0..1 range.
It's been published on TradingView as an indicator, just search for:
Update: they got taken down, apparently references to the github project are not allowed (pretty lame), will republish next month. For now you can just copy and paste the scripts in the pine editor.
- EMA 5 Daily / EMA 50 Weekly
- Mayer Multiple
- Sharpe Ratio
- Price / EMA 400
- RSI 20
- Puell Multiple
- Power Law
- Sortino Ratio
- Bitcoin google trend numbers
- RUPL/NUPL
Average the above metrics and then try to adjust / correct the average (explained below).
Because of the logarithmic nature of BTC growth and diminishing returns the peaks of our oscillator get lower and lower and the bottoms get higher and higher. We are also dealing with data (prices) that span multiple orders of magnitude which is not ideal when mapping to the 0..1 range.
Multiplying by the log of the linear regression and by the log of average true range.
multi = math.log(lr) * math.log(ta.atr(5)) // feels too arbitrary, open to suggestions
The peaks look okay after the adjustment but the bottoms don't go below 0.25 after 2013 or so, open to suggestions on how to adjust it better.
- Optimize rolling window length of various oscillators
- Figure out what other metrics we can use, maybe MACD etc
- Figure out a better way to adjust for diminishing returns and the logarithmic nature of BTC growth
- Weighted average + optimization of the weights by
- neural networks
- simulated annealing
- monte carlo simmulations
- genetic algorithms
- Run backtests and calculate net profit
- Use net profit as a fitness function to 'evolve' a better indicator automagically (a combination of the above 2)
If you have any suggestions or ideas for improvement please get in touch.
Feel free to email me. You can also just open a PR.
I am just now getting familiar with pine script and I am also not an expert in this field so there's likely plenty of room for improvement.
Inspired by Benjamin Cowen's BTC risk idea.
Special thanks to M. Almusimie for working out most of the oscillators involved and Jay for suggestions.
Address | |
---|---|
BTC | 3B1gtQhVQj1x5c1jzVHHzq2eGKyEqf7rQb |
ETH | 0x18Df0b2C16d3E3927Ef74e02268fE36949bb6b2c |
ADA | addr1vyqvaqs56d90ha55duh04eh59y7fcps8duplgm987nyhv9qp3n05f |
USDT | 0x96A37296B30Bf19A917c34810b3f040192Be2e67 |