Professional Documents
Culture Documents
S.A.M.M.I ? VWAP SB[ɅI]
S.A.M.M.I ? VWAP SB[ɅI]
▄▄▄▄▄▄▄▄▄▄
//▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌
▐░░░░░░░░░░▌
//▐░█▀▀▀▀▀▀▀▀▀ ▀▀▀▀█░█▀▀▀▀ ▐░▌ ▐░▌ ▐░█▀▀▀▀▀▀▀█░▌ ▀▀▀▀█░█▀▀▀▀
▐░█▀▀▀▀▀▀▀█░▌
//▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌
▐░▌
//▐░█▄▄▄▄▄▄▄▄▄ ▐░▌ ▐░▌ ▐░▌ ▐░█▄▄▄▄▄▄▄█░▌ ▐░▌ ▐░▌
▐░▌
//▐░░░░░░░░░░░▌ ▐░▌ ▐░▌ ▐░▌ ▐░░░░░░░░░░░▌ ▐░▌ ▐░▌
▐░▌
// ▀▀▀▀▀▀▀▀▀█░▌ ▐░▌ ▐░▌ ▐░▌ ▐░█▀▀▀▀▀▀▀▀▀ ▐░▌ ▐░▌
▐░▌
// ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌
▐░▌
// ▄▄▄▄▄▄▄▄▄█░▌ ▄ ▐░▌ ▄ ▐░█▄▄▄▄▄▄▄█░▌ ▄ ▐░▌ ▄ ▄▄▄▄█░█▄▄▄▄ ▄
▐░█▄▄▄▄▄▄▄█░▌▄
//▐░░░░░░░░░░░▌▐░▌ ▐░▌▐░▌ ▐░░░░░░░░░░░▌▐░▌▐░▌▐░▌
▐░░░░░░░░░░░▌▐░▌▐░░░░░░░░░░▌▐░▌
// ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀
▀▀▀▀▀▀▀▀▀▀ ▀
//
// ▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄
▄
//▐░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░▌
▐░▌
//▐░█▀▀▀▀▀▀▀█░▌▀▀▀▀█░█▀▀▀▀ ▀▀▀▀█░█▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌ ▀▀▀▀█░█▀▀▀▀
▐░▌░▌ ▐░▌
//▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌
▐░▌▐░▌ ▐░▌
//▐░█▄▄▄▄▄▄▄█░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌
▐░▌ ▐░▌
//▐░░░░░░░░░░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌
▐░▌ ▐░▌
//▐░█▀▀▀▀▀▀▀█░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌
▐░▌ ▐░▌
//▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌
▐░▌▐░▌
//▐░█▄▄▄▄▄▄▄█░▌▄▄▄▄█░█▄▄▄▄ ▐░▌ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄█░▌ ▄▄▄▄█░█▄▄▄▄ ▐░▌
▐░▐░▌
//▐░░░░░░░░░░▌▐░░░░░░░░░░░▌ ▐░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌
▐░░▌
// ▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀
▀▀
//
// S.UPER T.REND U.LTIMATE P.ROJECT I.NTELLIGENT D.ESIGN
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0
at https://mozilla.org/MPL/2.0/
// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0
International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/
// Over 1000 indicator were referenced, credit goes to EACH AND EVERY CREATOR ON
TRADINGVIEW. It is impossible to list everyone. Thus, everyone gets credit.
// Extra Credit to old-school SMA traders who dont know about zero-lag, everget,
TJ_667, and veryfid, Matthew ("Dr Chaos") Kennel and steffenrg; modified by ©
Stupid_Bitcoin 2024
// The S.imple A.verage M.oving M.oney I.ndex (or) S.A.M.M.I is based on the Simple
SMA trading style, but using zero-lag moving averages
// S.imple A.verage M.oving M.oney I.ndex
// The summary of this code is work done by @ Stupid_Bitcoin 2024 and beyond.
// S.T.U.P.I.D. Donations ~ paypal ~ djyourstory@gmail.com
// A Market Maker and Casino are identical. They do not change the game.
// They understand your indicator, or your mind-set will keep changing.
// The Human Brain can not make a security call to the asset, but AI can.
// A majority of popular indicators are old, regardless of ratings.
// Many of these indicators can not upgrade into Version 5 of Pine Script.
// Before indicator design the 13 TEMA, 66 DEMA, created a tested trading
foundation.
// S.T.U.P.I.D. Disclaimer
// Game Theory proves the psychology of printing winning results will attract
criminals. It IS NOT suggested for indicator design.
// However, at the same time private use of printing winning rates on chart, will
expose that win rates vary by exchange.
// For example, "Exchange A" on every time frame posts better than an 80% win
rate.
// On the same asset and time frames "Exchange B" is 3% to 6% lower win rate, who
might claim to have "lower fees" than Exchange A.
// Private use of AI enhances scam detection and can catch criminals who exploit
the markets.
// However, errors may be present, pine script has limitations, I am not perfect,
everything is random, and each individual uses trading data differently.
//@version=5
indicator("S.A.M.M.I 🤖 VWAP SB[ɅI]", overlay=true, max_labels_count = 500,
max_lines_count = 500, max_boxes_count = 500, max_bars_back = 5000, timeframe='')
pumpup = not volu5 and not volu4 and not volu3 and ta.crossover(close, ohlc4) and
volume>avrg and barstate.isconfirmed and volume>volume[1] and (close-low)/(high-
low)>0.6
pumpdown = not vold5 and not vold4 and not vold3 and ta.crossunder(close, hlcc4)
and volume>avrg and barstate.isconfirmed and volume>volume[1] and
(close-low)/(high-low)<0.6
color_1 = vold0 ? cold0 : vold1 ? cold1 : vold2 ? cold2 : vold3 ? cold3 : vold4 ?
cold4 : vold5 ? cold5 : volu0 ? colu0 : volu1 ? colu1 : volu2 ? colu2 : volu3 ?
colu3 : volu4 ? colu4 : volu5 ? colu5 : na
plotcandle(open, high, low, close, title=' Vector Candle', color=(open < close) ?
color_1 : color_1, wickcolor=color_1, bordercolor=color_1, editable = false,
display=labelDisplay)
// Returns the theoretical numbers of current chart bars in the given target HTF
resolution (note that this number maybe very different from actual number on
certain symbols).
f_theoreticalDilationOf(_res) =>
// _res: resolution of any TF (in "timeframe.period" string format).
f_tfResInMinutes(_res) / f_resInMinutes()
//
// VWAP Logic
src = hl2
vol = ta.vwap(volume) * 0.0016
_mult = f_theoreticalDilationOf(HTF)
// ---------- RVWAP ---------- //
[rVWAP, stup3, stup2, stup1, stdn1, stdn2, stdn3] = computeVWAP(src, vol,
HTF_switch ? _len : _len * _mult, stDevMultiplier_1, stDevMultiplier_2,
stDevMultiplier_3)
vHtfSmoothLen = math.max(1, _len / HTF_Smooth_len)
rVWAP_out = not HTF_switch ? rVWAP : HTFRepaints ?
request.security(syminfo.tickerid, HTF, rVWAP) : request.security(syminfo.tickerid,
HTF, rVWAP[1], lookahead = barmerge.lookahead_on)
rVWAP_out := HTF_switch and HTF_Smooth ? ta.sma(ta.wma(ta.rma(rVWAP_out,
vHtfSmoothLen), vHtfSmoothLen), vHtfSmoothLen) : rVWAP_out
stup3_out = not HTF_switch ? stup3 : HTFRepaints ?
request.security(syminfo.tickerid, HTF, stup3) : request.security(syminfo.tickerid,
HTF, stup3[1], lookahead = barmerge.lookahead_on)
stup3_out := HTF_switch and HTF_Smooth ? ta.sma(ta.ema(ta.ema(stup3_out,
vHtfSmoothLen), vHtfSmoothLen), vHtfSmoothLen) : stup3_out
stup2_out = not HTF_switch ? stup2 : HTFRepaints ?
request.security(syminfo.tickerid, HTF, stup2) : request.security(syminfo.tickerid,
HTF, stup2[1], lookahead = barmerge.lookahead_on)
stup2_out := HTF_switch and HTF_Smooth ? ta.sma(ta.ema(ta.ema(stup2_out,
vHtfSmoothLen), vHtfSmoothLen), vHtfSmoothLen) : stup2_out
stup1_out = not HTF_switch ? stup1 : HTFRepaints ?
request.security(syminfo.tickerid, HTF, stup1) : request.security(syminfo.tickerid,
HTF, stup1[1], lookahead = barmerge.lookahead_on)
stup1_out := HTF_switch and HTF_Smooth ? ta.sma(ta.ema(ta.ema(stup1_out,
vHtfSmoothLen), vHtfSmoothLen), vHtfSmoothLen) : stup1_out
stdn1_out = not HTF_switch ? stdn1 : HTFRepaints ?
request.security(syminfo.tickerid, HTF, stdn1) : request.security(syminfo.tickerid,
HTF, stdn1[1], lookahead = barmerge.lookahead_on)
stdn1_out := HTF_switch and HTF_Smooth ? ta.sma(ta.ema(ta.ema(stdn1_out,
vHtfSmoothLen), vHtfSmoothLen), vHtfSmoothLen) : stdn1_out
stdn2_out = not HTF_switch ? stdn2 : HTFRepaints ?
request.security(syminfo.tickerid, HTF, stdn2) : request.security(syminfo.tickerid,
HTF, stdn2[1], lookahead = barmerge.lookahead_on)
stdn2_out := HTF_switch and HTF_Smooth ? ta.sma(ta.ema(ta.ema(stdn2_out,
vHtfSmoothLen), vHtfSmoothLen), vHtfSmoothLen) : stdn2_out
stdn3_out = not HTF_switch ? stdn3 : HTFRepaints ?
request.security(syminfo.tickerid, HTF, stdn3) : request.security(syminfo.tickerid,
HTF, stdn3[1], lookahead = barmerge.lookahead_on)
stdn3_out := HTF_switch and HTF_Smooth ? ta.sma(ta.ema(ta.ema(stdn3_out,
vHtfSmoothLen), vHtfSmoothLen), vHtfSmoothLen) : stdn3_out