Strategy · Pine Script v4 · Own pane

Dutch Bros Strategy

by maxits

This strategy looks for long entries when the MACD line exceeds its signal line by a set amount and volume rises by a chosen percentage.

View on GitHub

GitHub stars3on the repository
Pine versionv4older, still runs
Lines of code132
Settings25inputs
LicenceNone stated
Last update4 years ago25 Aug 2022

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

Source Code

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

Dutch Bros Strategy places one buy limit either a set number of pips or a percentage below the previous close. Exits start with a percentage stop that can be cancelled after a profit threshold and replaced by a trailing percentage stop. Users adjust MACD lengths, source, resolution, and the backtest window. The MACD and labels draw in a separate pane. Position size is a percentage of equity, and pyramiding is disabled.

Details

Published by

maxits on GitHub

Type

Strategy, Pine Script v4

Draws

Separate pane below the chart

Markets

Stocks

Timeframes

M15-H1

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
============ Plotting Options ============boolfalsesep
Plot Label?booltrueplotlabel
Label distance from Macd (if overlay=false otherwise distance from Price)int5dist
Plot Stop? (Only if overlay=true)booltrueplotStop
Plot Macd?booltrueplotmacd
============ Strategy Time for Backtesting ============boolfalsesep1
Start Timetimetimestamp("16 Sep 2021 09:30 -0400")i_time
Finish Timetimetimestamp("04 Oct 2021 16:00 -0400")f_time
============ Macd Inputs ============boolfalsesep2
Macd Resolutiontimeframe15_res
Macd Sourcesourceclosesrc
Fast Lengthint12fast_len
Show all 25 settings
SettingTypeDefaultVariable
Slow Lengthint26slow_len
Sign Lengthint9sign_len
Value of Macd above Signal Linefloat0.2macdValue
============ Strategy Entry Settings ============boolfalsesep3
Volume spikes in %float34.0volValue
Set Limit Order in Pips (Enable only one)booltrueenablePip
Set Limit Order in Per (Enable only one)boolfalseenablePer
Buy Limit Order (Pips From Previous Close)int100limitPip
Buy Limit Order (% From Previous Close)float2.0limitPer
============ Strategy Exit Settings ============boolfalsesep4
Initial Stop Loss Percentagefloat9.0stopPer
Profit Percentage to Cancel Stop Lossfloat3.5cancelPer
Trail Stop Order Percentage (Activates if cancel previous exit order)float2.0trailPer
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

Q-Trend + KVO Strategy

by TradersPost
228 stars

This strategy combines the ATR-banded Q-Trend indicator with the Klinger Volume Oscillator (KVO) to execute confluence trades. It enters long when a Q-Trend buy trigger aligns with a positive KVO value and a bullish candle confirmation, taking short trades und

Strategy v6 TrendVolume
Updated 3 months ago · None stated GitHub repository of Q-Trend + KVO Strategy

BBPBΔ(OBV-PVT)BB

by hasnocool
106 stars

This strategy calculates the normalized rate of change between On-Balance Volume (OBV) and Price Volume Trend (PVT) indicators. It applies Bollinger Bands to this volume metric along with a Hodrick-Prescott filter array for time series decomposition. Displayed

Strategy v4 VolumeVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of BBPBΔ(OBV-PVT)BB

BTC Futures MACD

by iamrichardD
57 stars

This strategy plots a MACD oscillator in a separate pane and trades Bitcoin futures from zero-line and signal-line crosses. Optional early momentum signals, a volume filter, and a trend moving-average filter can confirm entries. It sizes positions as fixed con

Strategy v6 Oscillators & momentumMoving averages Repaints
Updated 1 year ago · Apache-2.0 GitHub repository of BTC Futures MACD

RSI-VWAP Indicator

by oguzhandilber
47 stars

This strategy calculates a Relative Strength Index (RSI) applied to the Volume Weighted Average Price (VWAP) rather than standard close values. It plots dedicated long and short RSI-VWAP lines with customizable overbought and oversold thresholds, alongside an

Strategy v4 Oscillators & momentumVolume
Updated 5 years ago · None stated GitHub repository of RSI-VWAP Indicator
13 stars

This strategy calculates the Volume Zone Oscillator (VZO) alongside volume spikes to detect directional momentum. It enters long positions when the VZO turns bullish accompanied by a volume spike, and enters short when the VZO turns bearish with elevated volum

Strategy v5 VolumeOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Ruckard Neobutane VZO bA002

More Oscillators & momentum scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers