0% found this document useful (0 votes)
21 views3 pages

Punk Cloud

The document contains a Pine Script™ code for a trading indicator called 'PunkChainer Super EMA' which utilizes Bollinger Bands, Exponential Moving Averages (EMA), and exhaustion candle counts to generate buy and sell signals. It includes features for visualizing trends, coloring bars based on conditions, and setting alerts for various market conditions. The script is designed to assist traders in making informed decisions based on technical analysis.

Uploaded by

darwincastro386
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views3 pages

Punk Cloud

The document contains a Pine Script™ code for a trading indicator called 'PunkChainer Super EMA' which utilizes Bollinger Bands, Exponential Moving Averages (EMA), and exhaustion candle counts to generate buy and sell signals. It includes features for visualizing trends, coloring bars based on conditions, and setting alerts for various market conditions. The script is designed to assist traders in making informed decisions based on technical analysis.

Uploaded by

darwincastro386
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.

0
at https://mozilla.org/MPL/2.0/
// © punkchainer

//@version=5
indicator(title="PunkChainer Super EMA", timeframe="", timeframe_gaps=true,
overlay=true)
//----------BOLLINGER BANDS PERCENTAGE OSCILLATOR---------
bblength = 20
bbsrc = close
bbmult = 2
basis = ta.sma(bbsrc, bblength)
dev = bbmult * ta.stdev(bbsrc, bblength)
bbupper = basis + dev
bblower = basis - dev
bbr = (bbsrc - bblower)/(bbupper - bblower)
obValue = 1.1
osValue = -0.1
//---Signals----
exitOversold = ta.crossover(bbr, osValue)
exitOverbought = ta.crossunder(bbr, obValue)
barcolor(exitOverbought ? color.orange : exitOversold ? color.blue : na,
title='candle coloring')

//-----------TREND HEURISTIC-------------------
th_length = input(36, "Ema", group="Trend Heuristic")

//Candle High MA
i_leng = th_length
i_src = high
i_out = ta.ema(i_src, i_leng)

//Candle close MA
x_leng = th_length
x_src = close
x_out = ta.ema(x_src, x_leng)

//Candle Low MA
y_leng = th_length
y_src = low
y_out = ta.ema(y_src, y_leng)

highP1 = plot(i_out, color=#0c3299, transp = 100)


mid = plot(x_out, color=#ffffff, transp = 0)
lowP1 = plot(y_out, color=#0c3299, transp = 100)
// COLOR
fill(highP1, lowP1, color=#0c3299, transp = 65)
barcolor(i_out and y_out > close ? #13a625 : i_out > close ? #787b86 : y_out and
i_out < close ? #b71c1c : na)

over1 = ta.crossover(close, i_out) ? 1 : 0


over2 = ta.barssince(ta.crossunder(close, y_out)) < ta.barssince(over1[1]) ? 1 : 0
over = over1 + over2
plotshape((over==2), size=size.tiny, style=shape.triangleup,
location=location.belowbar, color=#13a625)
//
over1_2 = ta.crossunder(close, y_out) ? 1 : 0
over2_2 = ta.barssince(ta.crossunder(close, i_out)) < ta.barssince(over1_2[1]) ?
1 : 0
over_2 = over1_2 + over2_2
plotshape((over_2==2), size=size.tiny, style=shape.triangledown,
location=location.abovebar, color=#b71c1c)
//-----------EXHAUSTION CANDLE COUNT (LELEDC)-----------------
maj_qual = (6)
maj_len = (30)
maj = input(true, title='Show Signal', group="Exhaustion Candle Count (Leledc)")

sell = 0.0
buy = 0.0

// Define a function named lele with parameters qual and len


lele(qual, len) =>
bindex = 0.0
sindex = 0.0
bindex := nz(bindex[1], 0)
sindex := nz(sindex[1], 0)
ret = 0

// Count bullish conditions


if close > close[4]
bindex += 1
bindex

// Count bearish conditions


if close < close[4]
sindex += 1
sindex

// Check for bullish exhaustion condition


if bindex > qual and close < open and high >= ta.highest(high, len)
bindex := 0
ret := -1
ret

// Check for bearish exhaustion condition


if sindex > qual and close > open and low <= ta.lowest(low, len)
sindex := 0
ret := 1
ret

// Assign the result of the lele function to the variable return_1


return_1 = lele(maj_qual, maj_len)

// Determine major signal


major = return_1

// Generate sell signal if major signal is -1 and maj is true


if major == -1 and maj == true
sell := 2

// Generate buy signal if major signal is 1 and maj is true


if major == 1 and maj == true
buy := 2

//alerts

plotshape(sell == 2, title='Bearish Exhaustion', size=size.auto,


style=shape.circle, location=location.abovebar, color=#ffffff, display=display.all)
plotshape(buy == 2, title='Bullish Exhaustion', size=size.auto, style=shape.circle,
location=location.belowbar, color=#ffffff, offset=0, display=display.all)

//alerts, retests
alertcondition( ta.crossunder(close, i_out),title='bull retest', message='bullish
retest!')
alertcondition(ta.crossover(close, y_out), title='bear retest', message='bearish
retest!')

//alerts cross
alertcondition(close > i_out and y_out,title='bull cross', message='bullish
trend!')
alertcondition(close > y_out and i_out, title='bear cross', message='bearish
retest!')

alertcondition(buy, title='Bullish Grab', message='Bullish Grab!')


alertcondition(sell, title='Bearish Grab', message='Bearish Grab!')

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy