sonnyparlin

OBV MA Strategy

sonnyparlin アップデート済   
The On Balance Volume + Moving Average Strategy

Parameters: 1H candles, ETHUSDT on BINANCEUS, commission percent uses Binance's maker/taker fees of 0.075%
Strategy: I create a 30 day moving average of the On Balance Volume "obvSma = ta.sma(ta.obv, 30)." Then I use the following buy conditions:

  • OBV crosses above the OBV moving average
  • The obv drops x% below the OBV moving average (buy a dip)
  • The OBV moving average is rising, the OBV is greater than the OBV moving average and the OBV is rising

The first buy condition is attempting to buy into an uptrend. When the OBV rises above the OBV moving average, people are buying and it's a good time to enter the trade.
The idea behind the second buy condition is to buy a dip so make sure you are careful to not set it too shallow or you'll end up buying the dip before the dip before the dip. :) I recommend 10% or more.
The third buy condition is there in case our trailing stop takes us out of a trade but the trend is still rising, we don't want to miss out on that profit so if the OBV is above the OBV moving average, the average is rising and the OBV is rising, we are likely in the middle of an uptrend and we should buy in.
リリースノート:
Changed some default parameters for the chart and also updated a variable name to be more clear.

`takeProfit` is now `activation`

I initially called it takeProfit because I tend to keep my trailing stop loss very tight so that if the candle hits the activation level but then starts to fall, the trailing stop will activate. The downside of this is that you end up missing opportunities, but overall, you see much more profit with a tighter trailing stop. The trick is to set your activation level to where you're happy taking profit. Setting it too low produces less profit, setting it too high wins you less trades. I tend to keep my activation level anywhere between 0.5% and 2% depending on the asset.
リリースノート:
Added user configurable moving average length for the OBV moving average.
リリースノート:
Removed
オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?