Indicator · Pine Script v4 · On the chart

Kijun-Sen + SSL + WAE

by krosenfeld7

Combines the Kijun-Sen baseline, SSL channel crossovers, and Waddah Attar Explosion momentum calculations to generate directional trade signals.

View on GitHub

GitHub stars5on the repository
Pine versionv4older, still runs
Lines of code74
Settings8inputs
LicenceApache-2.0
Last update3 years ago12 May 2023

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

74 lines of Pine Script v4 from KS+SSL+WAE/KS+SSL+WAE.txt, published under Apache-2.0. Keep the author's credit and licence lines when you reuse it.

KS+SSL+WAE.txt
//@version=4
study(title="Kijun-Sen + SSL + WAE", shorttitle="KS + SSL + WAE", overlay=true)

// Kijun-Sen+
basePeriods = input(26, minval=1, title="Kijun-Sen Period")
donchian(len) => avg(lowest(len), highest(len))
baseLine = donchian(basePeriods)
plot(baseLine, color=color.yellow, linewidth = 2, title="Kijun-Sen")

ksLong  = close > baseLine
ksShort = close < baseLine

// SSL
len=input(title="SSL Period", defval=10)
smaHigh=sma(high, len)
smaLow=sma(low, len)
var float Hlv = na
Hlv := close > smaHigh ? 1 : close < smaLow ? -1 : Hlv[1]
sslDown = Hlv < 0 ? smaHigh: smaLow
sslUp   = Hlv < 0 ? smaLow : smaHigh

plot(sslDown, linewidth=2, color=color.red)
plot(sslUp, linewidth=2, color=color.lime)

sslLong  = crossover(sslUp,  sslDown)
sslShort = crossunder(sslUp, sslDown)

// WAE
sensitivity = input(150, title="WAE Sensitivity")
fastLength=input(20, title="WAE Fast EMA Length")
slowLength=input(40, title="WAE Slow EMA Length")
channelLength=input(20, title="BB Channel Length")
mult=input(2.0, title="BB Stdev Multiplier")
deadZone=input(20, title="No trade zone threshold")

calc_macd(source, fastLength, slowLength) =>
    fastMA = ema(source, fastLength)
    slowMA = ema(source, slowLength)
    fastMA - slowMA

calc_BBUpper(source, length, mult) => 
    basis = sma(source, length)
    dev = mult * stdev(source, length)
    basis + dev

calc_BBLower(source, length, mult) => 
    basis = sma(source, length)
    dev = mult * stdev(source, length)
    basis - dev

t1 = (calc_macd(close, fastLength, slowLength) - calc_macd(close[1], fastLength, slowLength))*sensitivity
t2 = (calc_macd(close[2], fastLength, slowLength) - calc_macd(close[3], fastLength, slowLength))*sensitivity

e1 = (calc_BBUpper(close, channelLength, mult) - calc_BBLower(close, channelLength, mult))

trendUp = (t1 >= 0) ? t1 : 0
trendDown = (t1 < 0) ? (-1*t1) : 0

waeLong  = trendUp   > e1
waeShort = trendDown > e1

// Computing Strategy

long  = ksLong  and sslLong  and waeLong
short = ksShort and sslShort and waeShort

if long
    label.new(x = bar_index, y = na, text = "Long", yloc = yloc.abovebar, color = color.green)
if short
    label.new(x = bar_index, y = na, text = "Short", yloc = yloc.abovebar, color = color.red)

// Alerts
alertcondition(long, title = "Long Signal", message = "Long @ {{timenow}}: {{ticker}} -> {{interval}}: {{close}}")
alertcondition(short, title = "Short Signal", message = "Short @ {{timenow}}: {{ticker}} -> {{interval}}: {{close}}")

Overview

The indicator plots the Kijun-Sen and SSL lines directly on the price chart. When price aligns relative to the Kijun-Sen line, an SSL crossover occurs, and WAE momentum surpasses the Bollinger Band channel threshold, the script plots Long or Short labels above price bars and triggers alert conditions.

Details

Published by

krosenfeld7 on GitHub

Type

Indicator, Pine Script v4

Draws

On the price chart

Category

Trend, Oscillators & momentum, Moving averages, Volatility & bands

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
Kijun-Sen Periodint26basePeriods
SSL Periodint10len
WAE Sensitivityint150sensitivity
WAE Fast EMA Lengthint20fastLength
WAE Slow EMA Lengthint40slowLength
BB Channel Lengthint20channelLength
BB Stdev Multiplierfloat2.0mult
No trade zone thresholdint20deadZone
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

114 stars

ADX Strategy (original) is an overlay indicator that identifies trend-following trade signals using the Average Directional Index (ADX) combined with a Simple Moving Average filter. A long signal is generated when the ADX rises above a user-defined trend level

Indicator v4 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of ADX Strategy (original)
56 stars

Double Screened Decision is a multi-timeframe trend and momentum indicator overlaid directly on the price chart. It dynamically selects a higher timeframe based on the active chart resolution to evaluate higher-timeframe MACD, Bollinger Bands, RSI, and Stochas

Indicator v5 TrendMoving averages Repaints
Updated 4 months ago · None stated GitHub repository of Double Screened Decision
24 stars

This indicator plots Bollinger Bands on the price chart alongside a baseline moving average to identify trend-aligned swing setups. It calculates trend bias by comparing the Bollinger Bands basis to a customizable moving average, such as a 200 EMA. Trade signa

Indicator v5 Volatility & bandsOscillators & momentum
Updated 4 years ago · MPL-2.0 GitHub repository of Bollinger Band Swing

Index Intraday Analyst

by chris-c-thomas
14 stars

Index Intraday Analyst overlays CBOE cash indices such as SPX, NDX, RUT, and DJX. It plots a multi-EMA ribbon, a session-anchored TWAP with standard-deviation bands, and session levels such as prior-day high, low, and close, the opening range, and the high and

Indicator v6 TrendOscillators & momentum
Updated 6 months ago · MIT GitHub repository of Index Intraday Analyst

RePaNoCHa V4

by wocclyl
9 stars

RePaNoCHa V4 is an overlay alert indicator that plots a Tillson T3 moving average on the price chart and colors it by whether the line is rising or falling. It combines that slope with a range filter, ADX, parabolic SAR, RSI, and MACD to mark long and short si

Indicator v4 TrendOscillators & momentum
Updated 7 years ago · MIT GitHub repository of RePaNoCHa V4

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