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, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.

Хотите использовать этот скрипт на графике?