Indicator · Pine Script v4 · On the chart

MC Study - Aggressive

by Metzenas

This indicator builds a WaveTrend-style oscillator from typical price, using an exponential moving average channel and a smoothed channel index.

View on GitHub

GitHub stars2on the repository
Pine versionv4older, still runs
Lines of code50
Settings2inputs
LicenceNone statedfile: MPL-2.0
Last update5 years ago8 Apr 2021

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  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 indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

50 lines of Pine Script v4 from studies/mc_study_aggressive.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

mc_study_aggressive.pine
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Metzenas

//@version=4
study("MC Study - Aggressive", overlay=true)

n1 = input(10, "Channel Length")
n2 = input(21, "Average Length")
// ema21 = input(21, "EMA 21")

ap = hlc3 
esa = ema(ap, n1)
d = ema(abs(ap - esa), n1)
ci = (ap - esa) / (0.015 * d)
tci = ema(ci, n2)
// ema21_ = ema(hlc3, ema21)
 
wt1 = tci
wt2 = sma(wt1,3)
crossCondition = cross(wt1, wt2)
long_condition = (wt2 - wt1 <= 0)
short_condition = (wt2 - wt1 > 0)

// Money Flow
// length = input(title="Length", type=input.integer, defval=60, minval=1, maxval=2000)
// src = hlc3
// upper = sum(volume * (change(src) <= 0 ? 0 : src), length)
// lower = sum(volume * (change(src) >= 0 ? 0 : src), length)
// _rsi(upper, lower) =>
//     if lower == 0
//         100
//     if upper == 0
//         0
//     100.0 - (100.0 / (1.0 + upper / lower))
// mf = _rsi(upper, lower)

// Filters
body_size = abs(close - open) / (high - low)

// Base
long_signal_base = crossCondition and long_condition

alertcondition(long_signal_base, "MC Aggr buy", "MC - Buy")

if (long_signal_base)
    l = label.new(bar_index, high)
    label.set_text(l, "buy_base@\n"+tostring(close))
    label.set_color(l, color.green)
    label.set_yloc(l, yloc.belowbar)
    label.set_style(l, label.style_label_up)

Overview

MC Study - Aggressive flags a base buy when the fast line crosses its three-bar simple average while the fast line is at or above that average, then draws a green label under the bar showing the close and fires a buy alert. Channel length and average length change the smoothing. It draws on the price chart. A short condition and candle body size are calculated but unused, and there are no exit rules.

Details

Published by

Metzenas on GitHub

Type

Indicator, Pine Script v4

Draws

On the price chart

Category

Oscillators & momentum

Markets

Any symbol

Timeframes

Any timeframe

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
Channel Lengthint10n1
Average Lengthint21n2
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

948 stars

The Adaptive RSI Moving Average (ARSIMA) is an overlay indicator that dynamically adjusts its smoothing factor based on the Relative Strength Index (RSI). When the RSI moves toward extreme overbought or oversold conditions, the smoothing factor increases to ma

Indicator v4 Moving averagesOscillators & momentum
Updated 10 days ago · GPL-3.0 GitHub repository of Adaptive RSI Moving Average

This overlay indicator screens a pasted list of up to forty symbols and draws a table on the price chart. It classifies bullish or bearish setups from the percent change between the current candle and the candle 250 bars back, then shows RSI with a simple movi

Indicator v5 Oscillators & momentumVolume
Updated 1 year ago · MPL-2.0 GitHub repository of Momentum Setup - Ankush Bajaj Momentum Investing Setup

This indicator plots trade entry and exit signals on the price chart by combining Bollinger Bands with optional filter conditions. It calculates standard Bollinger Bands along with RSI, Aroon, and moving average filters. Reversal signals trigger when price bre

Indicator v4 Volatility & bandsOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Bollinger Bands Winner IND [Alorse]
318 stars

This indicator plots three moving averages on the price chart alongside colored fills between the lines to visualize trend structure. Internally, it calculates a Stochastic RSI oscillator to detect oversold reversals. When the Stochastic %K line rises above 10

Indicator v5 Moving averagesOscillators & momentum
Updated 2 months ago · MIT GitHub repository of TVT 3X Scale In Out
285 stars

Mean Reversion Study is an indicator that identifies trade setups combining exponential moving averages, RSI extremes, and engulfing candlestick patterns. It highlights bullish setups when a bullish engulfing candle forms below the EMA while RSI is oversold, a

Indicator v4 Mean reversionCandlestick patterns
Updated 3 years ago · None stated GitHub repository of Mean Reversion Study

More indicators

Trade Your Charts With a Regulated Broker

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

Compare brokers