0% found this document useful (0 votes)
158 views13 pages

F W B SB (Ʌi)

The document outlines the S.T.U.P.I.D. (Super Trend Ultimate Project Intelligent Design) system, which utilizes AI and game theory to enhance trading indicators and strategies. It emphasizes the importance of volume analysis, color coding, and the psychological aspects of trading to improve profitability and reduce errors. Additionally, the document includes a disclaimer stating that the information is for educational purposes and does not constitute financial advice.

Uploaded by

woxiyew292
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)
158 views13 pages

F W B SB (Ʌi)

The document outlines the S.T.U.P.I.D. (Super Trend Ultimate Project Intelligent Design) system, which utilizes AI and game theory to enhance trading indicators and strategies. It emphasizes the importance of volume analysis, color coding, and the psychological aspects of trading to improve profitability and reduce errors. Additionally, the document includes a disclaimer stating that the information is for educational purposes and does not constitute financial advice.

Uploaded by

woxiyew292
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/ 13

// ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄ ▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄

▄▄▄▄▄▄▄▄▄▄
//▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌
▐░░░░░░░░░░▌
//▐░█▀▀▀▀▀▀▀▀▀ ▀▀▀▀█░█▀▀▀▀ ▐░▌ ▐░▌ ▐░█▀▀▀▀▀▀▀█░▌ ▀▀▀▀█░█▀▀▀▀
▐░█▀▀▀▀▀▀▀█░▌
//▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌
▐░▌
//▐░█▄▄▄▄▄▄▄▄▄ ▐░▌ ▐░▌ ▐░▌ ▐░█▄▄▄▄▄▄▄█░▌ ▐░▌ ▐░▌
▐░▌
//▐░░░░░░░░░░░▌ ▐░▌ ▐░▌ ▐░▌ ▐░░░░░░░░░░░▌ ▐░▌ ▐░▌
▐░▌
// ▀▀▀▀▀▀▀▀▀█░▌ ▐░▌ ▐░▌ ▐░▌ ▐░█▀▀▀▀▀▀▀▀▀ ▐░▌ ▐░▌
▐░▌
// ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌
▐░▌
// ▄▄▄▄▄▄▄▄▄█░▌ ▄ ▐░▌ ▄ ▐░█▄▄▄▄▄▄▄█░▌ ▄ ▐░▌ ▄ ▄▄▄▄█░█▄▄▄▄ ▄
▐░█▄▄▄▄▄▄▄█░▌▄
//▐░░░░░░░░░░░▌▐░▌ ▐░▌▐░▌ ▐░░░░░░░░░░░▌▐░▌▐░▌▐░▌
▐░░░░░░░░░░░▌▐░▌▐░░░░░░░░░░▌▐░▌
// ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀
▀▀▀▀▀▀▀▀▀▀ ▀
//
// ▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄

//▐░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░▌
▐░▌
//▐░█▀▀▀▀▀▀▀█░▌▀▀▀▀█░█▀▀▀▀ ▀▀▀▀█░█▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌ ▀▀▀▀█░█▀▀▀▀
▐░▌░▌ ▐░▌
//▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌
▐░▌▐░▌ ▐░▌
//▐░█▄▄▄▄▄▄▄█░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌
▐░▌ ▐░▌
//▐░░░░░░░░░░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌
▐░▌ ▐░▌
//▐░█▀▀▀▀▀▀▀█░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌
▐░▌ ▐░▌
//▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌
▐░▌▐░▌
//▐░█▄▄▄▄▄▄▄█░▌▄▄▄▄█░█▄▄▄▄ ▐░▌ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄█░▌ ▄▄▄▄█░█▄▄▄▄ ▐░▌
▐░▐░▌
//▐░░░░░░░░░░▌▐░░░░░░░░░░░▌ ▐░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌
▐░░▌
// ▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀
▀▀

//
// 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 Fib, Wyc, Bol, all band together over MFT price prediction
tools, credit to WyckoffMode, Austimize, gabrielrtakeda, Zeiierman PVSRA, Robert J
Hoffman, plasmapug, KIVANC, Quantvue; and modified by Stupid_Bitcoin 2024
// 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.

// What is S.T.U.P.I.D.? AI reviewed and reported on every trading view indicator


video published to YouTube.
// Next, AI parsed most major YouTube stock/crypto channels into a key-word
language model.
// Human brains analyzed the AI results using Six Sigma.
// Six Sigma is priority based risk management to reduce errors.
// Next, We added Hoffman IRBs', Nikola Tesla Math, Game Theory.
// What is Robert J. Hoffman Award Winning Wick retracement? He can explain it to
you.
// His method merged with PVSRA to increase in profitability.
// PVSRA is a 200% fixed volume trigger with 4 stages of color.
// S.T.U.P.I.D. Vector candles are the result of PVSRA improvement. They use 12
triggers, plus color compression.
// Next, retail traders can not control paraxial errors. They make approximations
to a chart, which produce false signals.
// Removing data sources, like influences producing paraxial errors, increased
winning trade experiences.
// Next, the methodology considers the bad habits of retail traders.
// Next, a Game Theory model emerged. It uses the OODA loop, platonic dice theory,
and blackjack basic strategy.
// Example 1, alter Fibonacci numbers with Tesla values. The result in gaming and
trading, is more winning experiences.
// Example 2, entry/exit on rounded dollar values of 333 or 666, result in more
winning trades than 250/500/750.
// Proper numbers (generally are):
1,3,5,6,9,11,13,18,21,22,24,26,33,36,39,44,48,52,63,66,77,88,96,99,111,144,163,188,
199,222,333,369,396,444,555,639,666,693,777,888,936,963,993,996,999
// Six Sigma reallocates all prior data for development of 100 indicators.
// Each indicator was tested using Bitcoin.
// Development back tested over 3000 variations of code sequencing.
// Development defined edge cases using game theory. Six Sigma again filtered the
indicator data.
// Two-thirds of the indicators built, got eliminated. Out of 100 indicators the
top 33 remain.

// About S.T.U.P.I.D. Vector Candles


// Vector Candles enhance the old PVSRA, using six sigma.
// Price action is the candle. Volume explains how price action happens.
// Support and Resistance are not target points, they are broad areas.
// Color plays a critical role, reducing the number of charts to consult.
// It prevents eye strain, reduces mental mathematics, and presents 1000s of data
points.
// Over 12 stages of buying and selling volume are shown using color, and the
absence of color.
// Vector candle can encode the wick with volume data, based on color.
// Color Compression lookback is used to verify vector candle recovery.
// During recovery or the absence of volume, the color is absent from the candle
body.
// Chart data using vector colors will reflect these same values.
// Vector candles will display trigger volume on multi-stage candle sweeps.
// 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.

// Information contained in (Super Trend Ultimate Project Intelligent Design) or


S.T.U.P.I.D does not constitute financial advice or a solicitation to buy or sell
any securities of any type.
// Open Source code, or its publisher, does not accept liability for any loss or
damage, including without limitation any loss of profit, which may arise directly
or indirectly from the use of
// or reliance on such information. All investments involve risk. Investors are
fully responsible for all decisions they make.
// My open source code is for educational purposes.
// © Stupid_Bitcoin

//@version=5
indicator("F.W.B. Bands 💪🏻 SB[ɅI]", overlay=true, max_bars_back = 5000)
string GROUP_LABELS = 'Labels'
bool showLabelsPriceScaleInput = input.bool(false, 'Show Labels on Price
Scale.', tooltip="", group=GROUP_LABELS)
bool showPriceRayInput = input.bool(false, 'Show Price on Fractal
Rays.', tooltip="", group=GROUP_LABELS)
// options
labelDisplay = showLabelsPriceScaleInput ? display.all : display.pane // ,
editable = false, display=labelDisplay)
//------------------------------------------------------------------------------

// Simple Vector Candle


vlength = input.int(9, 'Vector Candle Volume Lookback', minval=1)
avrg = ta.vwma(volume, vlength)

vold0 = volume > avrg * 1.88 and close < open


vold1 = volume > avrg * 1.44 and volume <= avrg * 1.87 and close < open
vold2 = volume > avrg * 1.22 and volume <= avrg * 1.43 and close < open
vold3 = volume >= avrg * 0.90 and volume <= avrg * 1.21 and close < open
vold4 = volume < avrg * 0.60 and volume <= avrg * 0.89 and close < open
vold5 = volume < avrg * 0.30 and close < open

volu0 = volume > avrg * 1.88 and close > open,


volu1 = volume > avrg * 1.44 and volume <= avrg * 1.87 and close > open
volu2 = volume > avrg * 1.44 and volume <= avrg * 1.43 and close > open
volu3 = volume >= avrg * 0.90 and volume <= avrg * 1.21 and close > open
volu4 = volume < avrg * 0.60 and volume <= avrg * 0.89 and close > open
volu5 = volume < avrg * 0.30 and close < open

cold0 = color.rgb(255, 0, 0, 11)


cold1 = color.rgb(200, 0, 0, 33)
cold2 = color.rgb(200, 0, 0, 44)
cold3 = color.rgb(255, 45, 45, 55)
cold4 = color.rgb(255, 80, 80, 66)
cold5 = color.rgb(169, 89, 89, 66)

colu0 = color.rgb(4, 255, 0, 11)


colu1 = color.rgb(3, 200, 0, 33)
colu2 = color.rgb(3, 200, 0, 44)
colu3 = color.rgb(75, 255, 75, 55)
colu4 = color.rgb(75, 175, 75, 66)
colu5 = color.rgb(66, 120, 66, 66)

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)
//

var START_OFFSET = 50
var END_OFFSET = 100

// Super Volume Fractal Inputs


length = input.int(9, minval=1, title='Sigma Length') // Super Volume Fractal
Inputs
src = input(hl2, title='Source')
basis = ta.vwma(src, length)

// Super Fractal Functions


mult01 = input.float(1.0, minval=0.001, maxval=50, title='StdDev 1.0')
mult02 = input.float(1.618, minval=0.001, maxval=50, title='StdDev 1.618')
mult03 = input.float(2.618, minval=0.001, maxval=50, title='StdDev 2.618')
mult04 = input.float(3.618, minval=0.001, maxval=50, title='StdDev 3.618')
mult05 = input.float(4.618, minval=0.001, maxval=50, title='StdDev 4.618')
mult06 = input.float(0.618, minval=0.001, maxval=50, title='StdDev 0.618')

// Super Fractal Functions percentage of standard deviation


show_wul_perc = input.bool(true, 'Show %', inline='white_up_low_spread',
group='White Upper/Lower Spread')
color wul_perc_text_color = input.color(color.rgb(255, 255, 255), 'Text Color',
inline='white_up_low_spread', group='White Upper/Lower Spread')
color wul_perc_line_color = input.color(color.rgb(255, 255, 255), 'Line Color',
inline='white_up_low_spread', group='White Upper/Lower Spread')
wul_fill_enabled = input.bool(false, 'Fill Spread %', inline='perc_th',
group='White Upper/Lower Spread')
wul_spread_perc_th = input.float(4.0, 'Threshold', inline='perc_th', group='White
Upper/Lower Spread')

show_wm_perc = input.bool(true, 'Show %', inline='wm_up_low_spread',


group='White/Magenta Spread')
color wm_perc_text_color = input.color(color.rgb(255, 47, 196), 'Text Color',
inline='wm_up_low_spread', group='White/Magenta Spread')
color wm_perc_line_color = input.color(color.rgb(255, 47, 196), 'Line Color',
inline='wm_up_low_spread', group='White/Magenta Spread')
wm_fill_enabled = input.bool(false, 'Fill Spread %', inline='perc_th',
group='White/Magenta Spread')
wm_spread_perc_th = input.float(4.0, 'Threshold', inline='perc_th',
group='White/Magenta Spread')

show_wa_perc = input.bool(true, 'Show %', inline='wa_up_low_spread',


group='White/Aqua Spread')
color wa_perc_text_color = input.color(color.rgb(0, 255, 255), 'Text Color',
inline='wa_up_low_spread', group='White/Aqua Spread')
color wa_perc_line_color = input.color(color.rgb(0, 255, 255), 'Line Color',
inline='wa_up_low_spread', group='White/Aqua Spread')
wa_fill_enabled = input.bool(false, 'Fill Spread %', inline='perc_th',
group='White/Aqua Spread')
wa_spread_perc_th = input.float(3.3, 'Threshold', inline='perc_th',
group='White/Aqua Spread')

show_ao_perc = input.bool(true, 'Show %', inline='ao_up_low_spread',


group='Aqua/Orange Spread')
color ao_perc_text_color = input.color(color.rgb(255, 152, 0), 'Text Color',
inline='ao_up_low_spread', group='Aqua/Orange Spread')
color ao_perc_line_color = input.color(color.rgb(255, 152, 0), 'Line Color',
inline='ao_up_low_spread', group='Aqua/Orange Spread')
ao_fill_enabled = input.bool(false, 'Fill Spread %', inline='perc_th',
group='Aqua/Orange Spread')
ao_spread_perc_th = input.float(3.3, 'Threshold', inline='perc_th',
group='Aqua/Orange Spread')

show_or_perc = input.bool(true, 'Show %', inline='or_up_low_spread',


group='Orange/Red Spread')
color or_perc_text_color = input.color(color.rgb(244, 67, 54), 'Text Color',
inline='or_up_low_spread', group='Orange/Red Spread')
color or_perc_line_color = input.color(color.rgb(244, 67, 54), 'Line Color',
inline='or_up_low_spread', group='Orange/Red Spread')
or_fill_enabled = input.bool(false, 'Fill Spread %', inline='perc_th',
group='Orange/Red Spread')
or_spread_perc_th = input.float(3.3, 'Threshold', inline='perc_th',
group='Orange/Red Spread')

show_rp_perc = input.bool(true, 'Show %', inline='rp_up_low_spread',


group='Red/Purple Spread')
color rp_perc_text_color = input.color(color.rgb(152, 21, 212), 'Text Color',
inline='rp_up_low_spread', group='Red/Purple Spread')
color rp_perc_line_color = input.color(color.rgb(152, 21, 212), 'Line Color',
inline='rp_up_low_spread', group='Red/Purple Spread')
rp_fill_enabled = input.bool(false, 'Fill Spread %', inline='perc_th',
group='Red/Purple Spread')
rp_spread_perc_th = input.float(3.3, 'Threshold', inline='perc_th',
group='Red/Purple Spread')
// Options for font size
font_size_huge = 'Huge'
font_size_large = 'Large'
font_size_normal = 'Normal'
font_size_small = 'Small'
font_size_tiny = 'Tiny'
font_size_input = input.string(font_size_small, 'Spread % Font Size',
options=[font_size_huge, font_size_large, font_size_normal, font_size_small,
font_size_tiny])
var perc_font_size = size.large
if font_size_input == font_size_huge
perc_font_size := size.huge
perc_font_size
if font_size_input == font_size_large
perc_font_size := size.large
perc_font_size
if font_size_input == font_size_normal
perc_font_size := size.normal
perc_font_size
if font_size_input == font_size_small
perc_font_size := size.small
perc_font_size
if font_size_input == font_size_tiny
perc_font_size := size.tiny
perc_font_size

//------------------------------------------------------------------------------
dev01 = mult01 * ta.stdev(src, length)
dev02 = mult02 * ta.stdev(src, length)
dev03 = mult03 * ta.stdev(src, length)
dev04 = mult04 * ta.stdev(src, length)
dev05 = mult05 * ta.stdev(src, length)
dev06 = mult06 * ta.stdev(src, length)
upper01 = basis + dev01
lower01 = basis - dev01
upper02 = basis + dev02
lower02 = basis - dev02
upper03 = basis + dev03
lower03 = basis - dev03
upper04 = basis + dev04
lower04 = basis - dev04
upper05 = basis + dev05
lower05 = basis - dev05
upper06 = basis + dev06
lower06 = basis - dev06

// Super Fractal Functions Compute spreads percentage


percentages(upper_band, lower_band) =>
perc_up = math.round((upper_band - lower_band) / lower_band * 99, 1)
perc_down = math.round((upper_band - lower_band) / upper_band * 99, 1)
[perc_up, perc_down]

[wul_perc_dir_up, wul_perc_dir_down] = percentages(upper01, lower01)


[wm_up_perc_dir_up, wm_up_perc_dir_down] = percentages(upper01, upper06)
[wm_low_perc_dir_up, wm_low_perc_dir_down] = percentages(lower06, lower01)
[wa_up_perc_dir_up, wa_up_perc_dir_down] = percentages(upper02, upper01)
[wa_low_perc_dir_up, wa_low_perc_dir_down] = percentages(lower01, lower02)
[ao_up_perc_dir_up, ao_up_perc_dir_down] = percentages(upper03, upper02)
[ao_low_perc_dir_up, ao_low_perc_dir_down] = percentages(lower02, lower03)
[or_up_perc_dir_up, or_up_perc_dir_down] = percentages(upper04, upper03)
[or_low_perc_dir_up, or_low_perc_dir_down] = percentages(lower03, lower04)
[rp_up_perc_dir_up, rp_up_perc_dir_down] = percentages(upper05, upper04)
[rp_low_perc_dir_up, rp_low_perc_dir_down] = percentages(lower04, lower05)

//Super Fractal Plots


D06U = plot(upper06, 'Upper 0.618', color=color.rgb(255, 47, 196, 65), linewidth=1,
editable = false, display=labelDisplay)
D05U = plot(upper05, 'Upper 4.618', color=color.rgb(152, 21, 212, 70), linewidth=1,
editable = false, display=labelDisplay)
D04U = plot(upper04, 'Upper 3.618', color=color.rgb(244, 67, 54, 75), linewidth=1,
editable = false, display=labelDisplay)
D03U = plot(upper03, 'Upper 2.618', color=color.rgb(255, 152, 0, 80), linewidth=1,
editable = false, display=labelDisplay)
D02U = plot(upper02, 'Upper 1.618', color=color.rgb(0, 255, 255, 85), linewidth=1,
editable = false, display=labelDisplay)
D01U = plot(upper01, 'Upper 1.0', color=color.rgb(255, 255, 255, 90), linewidth=1,
editable = false, display=labelDisplay)
plot(basis, 'Basis', color=color.rgb(255, 166, 0, 65), style=plot.style_line,
linewidth=1, editable = false, display=labelDisplay)
D01L = plot(lower01, 'Lower 1.0', color=color.rgb(255, 255, 255, 90), linewidth=1,
editable = false, display=labelDisplay)
D02L = plot(lower02, 'Lower 1.618', color=color.rgb(0, 255, 255, 85), linewidth=1,
editable = false, display=labelDisplay)
D03L = plot(lower03, 'Lower 2.618', color=color.rgb(255, 152, 0, 80), linewidth=1,
editable = false, display=labelDisplay)
D04L = plot(lower04, 'Lower 3.618', color=color.rgb(244, 67, 54, 75), linewidth=1,
editable = false, display=labelDisplay)
D05L = plot(lower05, 'Lower 4.618', color=color.rgb(152, 21, 212, 70), linewidth=1,
editable = false, display=labelDisplay)
D06L = plot(lower06, 'Lower 0.618', color=color.rgb(255, 47, 196, 65), linewidth=1,
editable = false, display=labelDisplay)
plotchar(wul_perc_dir_up, title='WUL Spread %', char='', location=location.top)

// Reversed RSI Fractal


import gabrielrtakeda/tk/1 as tk
// <constant_declarations>
MINUTE = 60
HOUR = 60 * MINUTE
DAY = 24 * HOUR
WEEK = 7 * DAY
MONTH = 4 * WEEK
TRANSPARENT = color.rgb(0, 0, 0, 100)

string FRACTAL_RSI_LEVEL_COLOR_HINT = 'This color will be applied for all fractal


RSI Levels. The data that will differ from each other is the line\'s label with
timeframe `period` on each one.'
string LABELS_SHOW_PRICE_SCALE_HINT = 'Enable this option to see labels on price
scale.'
string LABELS_SHOW_PRICE_RAY_HINT = 'Enable this option to see fractal RSI levels
prices on fractal rays respectively.'
string FRACTAL_RAY_VISIBILITY_RULE_HINT = 'When you choose the `15m` option, the
fractal ray will be visible only when the current timeframe was less than or equals
to 15 minutes. Condition: `if tf != CURRENT_TIMEFRAME and tf <= CHOSEN_OPTION`.'
DEFAULT_TABLE_SIZE = size.small

// <inputs>
string GROUP_GENERAL = 'General'
string textSizeInput = input.string(title='Text Size',
defval=DEFAULT_TABLE_SIZE, options=[size.tiny, size.small, size.normal,
size.large], group=GROUP_GENERAL)
string GROUP_RSI_LEVELS = 'RSI Levels · Settings'
int preOversoldLevelInput = input.int(26, 'Pre-oversold Level',
minval=1, maxval=49, group=GROUP_RSI_LEVELS)
int preOverboughtLevelInput = input.int(52, 'Pre-overbought Level',
minval=51, maxval=100, group=GROUP_RSI_LEVELS)
bool showPreOverLevelsInput = input.bool(true, 'Show "Pre-over"
Levels.', tooltip='pre-oversold / pre-overbought', group=GROUP_RSI_LEVELS)

string GROUP_FRACTAL_SETTINGS = 'Fractal Rays · Settings'


int fractalRsiLengthInput = input.int(6, 'Length', minval=1,
group=GROUP_FRACTAL_SETTINGS)
float fractalRsiSourceInput = input.source(open, 'Source',
group=GROUP_FRACTAL_SETTINGS)

string GROUP_FRACTAL_RAYS = 'Fractal Rays · Style'


color fractalRsiRayColorInput = input.color(color.rgb(195, 18, 226, 15),
'Ray Color', tooltip=FRACTAL_RSI_LEVEL_COLOR_HINT, group=GROUP_FRACTAL_RAYS)
string fractalRsiRayStyleInput = input.string(line.style_solid, 'Ray
Style', options=[line.style_solid, line.style_dashed, line.style_dotted],
group=GROUP_FRACTAL_RAYS)
int fractalRsiRayLengthInput = input.int(1, 'Ray Length',
group=GROUP_FRACTAL_RAYS)

string GROUP_FRACTAL_OVERSOLD = 'Fractal Rays · Oversold'


int fractalRsiOversoldLvlInput = input.int(44, 'Oversold Level', minval=1,
group=GROUP_FRACTAL_OVERSOLD)
string fractalRsiOversoldPrefixInput = input.string(title='Oversold Prefix',
defval='🚀', group=GROUP_FRACTAL_OVERSOLD)
string fractalRsiOversoldSuffixInput = input.string(title='Oversold Suffix',
defval='', group=GROUP_FRACTAL_OVERSOLD)
bool showfractalRsiOversoldLvlInput = input.bool(true, 'Show "Oversold"
Levels.', tooltip='Overbought / Oversold', group=GROUP_FRACTAL_SETTINGS)

string GROUP_FRACTAL_OVERBOUGHT = 'Fractal Rays · Overbought'


int fractalRsiOverboughtLvlInput = input.int(66, 'Overbought Level',
minval=1, group=GROUP_FRACTAL_OVERBOUGHT)
string fractalRsiOverboughtPrefixInput = input.string(title='Overbought Prefix',
defval='🚫', group=GROUP_FRACTAL_OVERBOUGHT)
string fractalRsiOverboughtSuffixInput = input.string(title='Overbought Suffix',
defval='', group=GROUP_FRACTAL_OVERBOUGHT)
bool showfractalRsiOverboughtLvlInput = input.bool(true, 'Show "Overbought"
Levels.', tooltip='Overbought / Oversold', group=GROUP_FRACTAL_SETTINGS)

string GROUP_FRACTAL_VISIBILITY_RULES = 'Fractal Rays · Visiblity Rules'


string fractalRayVisRuleInput_1m = input.string('5m', '· for `1m`
fractal', options=['hidden', '1m', '5m', '15m', '1h', '4h', '12h', 'D', 'W'],
tooltip=FRACTAL_RAY_VISIBILITY_RULE_HINT, group=GROUP_FRACTAL_VISIBILITY_RULES)
string fractalRayVisRuleInput_5m = input.string('15m', '· for `5m`
fractal', options=['hidden', '1m', '5m', '15m', '1h', '4h', '12h', 'D', 'W'],
tooltip=FRACTAL_RAY_VISIBILITY_RULE_HINT, group=GROUP_FRACTAL_VISIBILITY_RULES)
string fractalRayVisRuleInput_15m = input.string('1h', '· for `15m`
fractal', options=['hidden', '1m', '5m', '15m', '1h', '4h', '12h', 'D', 'W'],
tooltip=FRACTAL_RAY_VISIBILITY_RULE_HINT, group=GROUP_FRACTAL_VISIBILITY_RULES)
string fractalRayVisRuleInput_1h = input.string('4h', '· for `1h`
fractal', options=['hidden', '1m', '5m', '15m', '1h', '4h', '12h', 'D', 'W'],
tooltip=FRACTAL_RAY_VISIBILITY_RULE_HINT, group=GROUP_FRACTAL_VISIBILITY_RULES)
string fractalRayVisRuleInput_4h = input.string('12h', '· for `4h`
fractal', options=['hidden', '1m', '5m', '15m', '1h', '4h', '12h', 'D', 'W'],
tooltip=FRACTAL_RAY_VISIBILITY_RULE_HINT, group=GROUP_FRACTAL_VISIBILITY_RULES)
string fractalRayVisRuleInput_12h = input.string('D', '· for `12h`
fractal', options=['hidden', '1m', '5m', '15m', '1h', '4h', '12h', 'D', 'W'],
tooltip=FRACTAL_RAY_VISIBILITY_RULE_HINT, group=GROUP_FRACTAL_VISIBILITY_RULES)
string fractalRayVisRuleInput_1D = input.string('W', '· for `1D`
fractal', options=['hidden', '1m', '5m', '15m', '1h', '4h', '12h', 'D', 'W'],
tooltip=FRACTAL_RAY_VISIBILITY_RULE_HINT, group=GROUP_FRACTAL_VISIBILITY_RULES)
string fractalRayVisRuleInput_1W = input.string('W', '· for `1W`
fractal', options=['hidden', '1m', '5m', '15m', '1h', '4h', '12h', 'D', 'W'],
tooltip=FRACTAL_RAY_VISIBILITY_RULE_HINT, group=GROUP_FRACTAL_VISIBILITY_RULES)
//
// <function_declarations>
fn_fractalVisibilityRule(string visibilityRule) =>
int ms = 1
if visibilityRule == 'hidden'
ms := 1
else if visibilityRule == '1m'
ms := 1 * MINUTE
else if visibilityRule == '5m'
ms := 5 * MINUTE
else if visibilityRule == '15m'
ms := 15 * MINUTE
else if visibilityRule == '1h'
ms := 1 * HOUR
else if visibilityRule == '4h'
ms := 4 * HOUR
else if visibilityRule == '12h'
ms := 12 * HOUR
else if visibilityRule == 'D'
ms := 1 * DAY
else if visibilityRule == 'W'
ms := 1 * WEEK
ms

//
fn_requestFractal(string period, expression) =>
request.security(syminfo.tickerid, period, expression, gaps=barmerge.gaps_off)

//
fn_plotRay(float y, string label, color color, int length=9) =>
lb = label.new(x=bar_index + length, y=y, text=label, color=color.rgb(0, 0, 0,
100), textcolor=color, style=label.style_label_left, size=textSizeInput)
ln = line.new(x1=bar_index, y1=y, x2=label.get_x(lb) + 1, y2=y,
style=fractalRsiRayStyleInput, color=color)
label.delete(lb[1])
line.delete(ln[1])

//
fn_plotRsiLevelRay(simple string period, simple int level, color color) =>
fractalRsiUpLvl = fn_requestFractal(period, tk.rsiDown())
fractalRsiDownLvl = fn_requestFractal(period, tk.rsiUp())
hasFractalRsiLevel = not na(fractalRsiUpLvl) and not na(fractalRsiDownLvl)
rsiLevel = tk.rsiLevel(level, fractalRsiSourceInput, fractalRsiLengthInput,
fractalRsiUpLvl, fractalRsiDownLvl)
prefix = level < 50 ? fractalRsiOversoldPrefixInput :
fractalRsiOverboughtPrefixInput
suffix = level < 50 ? fractalRsiOversoldSuffixInput :
fractalRsiOverboughtSuffixInput
priceLabel = showPriceRayInput ? str.format(' · {0,number,' +
str.tostring(syminfo.mintick) + '}', rsiLevel) : ''
fn_plotRay(hasFractalRsiLevel ? rsiLevel : na, prefix + ' ' +
tk.labelizeTimeFrame(period) + priceLabel + ' ' + suffix , color,
length=fractalRsiRayLengthInput)

//
// <calculations>
tf = timeframe.in_seconds()
// upperband
LVL_70 = tk.rsiLevel(70)
LVL_68 = tk.rsiLevel(68)
LVL_66 = tk.rsiLevel(66)
LVL_64 = tk.rsiLevel(64)
LVL_62 = tk.rsiLevel(62)
LVL_60 = tk.rsiLevel(60)
PRE_OVERBOUGHT_LVL = tk.rsiLevel(preOverboughtLevelInput)

// lowerband
PRE_OVERSOLD_LVL = tk.rsiLevel(preOversoldLevelInput)
LVL_30 = tk.rsiLevel(30)
LVL_28 = tk.rsiLevel(28)
LVL_26 = tk.rsiLevel(26)
LVL_24 = tk.rsiLevel(24)
LVL_22 = tk.rsiLevel(22)
LVL_20 = tk.rsiLevel(20)

// upperband
PLOT_70 = plot(LVL_70, title="Level 70 · Overbought", color=color.new(color.teal,
55), linewidth=1, editable = false, display=labelDisplay)
PLOT_68 = plot(LVL_68, title="Level 68", color=color.new(color.purple, 75),
linewidth=1, editable = false, display=labelDisplay)
PLOT_66 = plot(LVL_66, title="Level 66", color=color.new(color.purple, 75),
linewidth=1, editable = false, display=labelDisplay)
PLOT_64 = plot(LVL_64, title="Level 64", color=color.new(color.purple, 75),
linewidth=1, editable = false, display=labelDisplay)
PLOT_62 = plot(LVL_62, title="Level 62", color=color.new(color.purple, 75),
linewidth=1, editable = false, display=labelDisplay)
PLOT_60 = plot(LVL_60, title="Level 60", color=color.new(color.teal, 55),
linewidth=1, editable = false, display=labelDisplay)
fill(PLOT_70, PLOT_60, title="Upperband Background", color=color.new(color.purple,
95))

// lowerband
PLOT_30 = plot(LVL_30, title="Level 30 · Oversold", color=color.new(color.purple,
55), linewidth=1, display=labelDisplay)
PLOT_28 = plot(LVL_28, title="Level 28", color=color.new(color.teal, 75),
linewidth=1, editable = false, display=labelDisplay)
PLOT_26 = plot(LVL_26, title="Level 26", color=color.new(color.teal, 75),
linewidth=1, editable = false, display=labelDisplay)
PLOT_24 = plot(LVL_24, title="Level 24", color=color.new(color.teal, 75),
linewidth=1, editable = false, display=labelDisplay)
PLOT_22 = plot(LVL_22, title="Level 22", color=color.new(color.teal, 75),
linewidth=1, editable = false, display=labelDisplay)
PLOT_20 = plot(LVL_20, title="Level 20", color=color.new(color.purple, 55),
linewidth=1, editable = false, display=labelDisplay)
fill(PLOT_30, PLOT_20, title="Lowerband Background", color=color.new(color.purple,
95))

// 'pre-over'
PRE_OVERBOUGHT_PLOT = plot(showPreOverLevelsInput ? PRE_OVERBOUGHT_LVL : na,
title="Pre-overbought Level", color=color.new(color.teal, 55), linewidth=1,
display=display.pane)
PRE_OVERSOLD_PLOT = plot(showPreOverLevelsInput ? PRE_OVERSOLD_LVL : na,
title="Pre-oversold Level", color=color.new(color.teal, 95), linewidth=1,
display=display.pane)
fill(PRE_OVERBOUGHT_PLOT, PLOT_30, title="Pre-overbought Background",
color=color.new(color.white, 98))
fill(PRE_OVERSOLD_PLOT, PLOT_60, title="Pre-oversold Background",
color=color.new(color.white, 98))
//
// fractal rsi levels
bool visibilityRule_1m = tf != 1 * MINUTE and tf <=
fn_fractalVisibilityRule(fractalRayVisRuleInput_1m)
fn_plotRsiLevelRay('1', fractalRsiOversoldLvlInput, visibilityRule_1m ?
fractalRsiRayColorInput : TRANSPARENT)
fn_plotRsiLevelRay('1', fractalRsiOverboughtLvlInput, visibilityRule_1m ?
fractalRsiRayColorInput : TRANSPARENT)

bool visibilityRule_5m = tf != 5 * MINUTE and tf <=


fn_fractalVisibilityRule(fractalRayVisRuleInput_5m)
fn_plotRsiLevelRay('5', fractalRsiOversoldLvlInput, visibilityRule_5m ?
fractalRsiRayColorInput : TRANSPARENT)
fn_plotRsiLevelRay('5', fractalRsiOverboughtLvlInput, visibilityRule_5m ?
fractalRsiRayColorInput : TRANSPARENT)

bool visibilityRule_15m = tf != 15 * MINUTE and tf <=


fn_fractalVisibilityRule(fractalRayVisRuleInput_15m)
fn_plotRsiLevelRay('15', fractalRsiOversoldLvlInput, visibilityRule_15m ?
fractalRsiRayColorInput : TRANSPARENT)
fn_plotRsiLevelRay('15', fractalRsiOverboughtLvlInput, visibilityRule_15m ?
fractalRsiRayColorInput : TRANSPARENT)

bool visibilityRule_1h = tf != 1 * HOUR and tf <=


fn_fractalVisibilityRule(fractalRayVisRuleInput_1h)
fn_plotRsiLevelRay('60', fractalRsiOversoldLvlInput, visibilityRule_1h ?
fractalRsiRayColorInput : TRANSPARENT)
fn_plotRsiLevelRay('60', fractalRsiOverboughtLvlInput, visibilityRule_1h ?
fractalRsiRayColorInput : TRANSPARENT)

bool visibilityRule_4h = tf != 4 * HOUR and tf <=


fn_fractalVisibilityRule(fractalRayVisRuleInput_4h)
fn_plotRsiLevelRay('240', fractalRsiOversoldLvlInput, visibilityRule_4h ?
fractalRsiRayColorInput : TRANSPARENT)
fn_plotRsiLevelRay('240', fractalRsiOverboughtLvlInput, visibilityRule_4h ?
fractalRsiRayColorInput : TRANSPARENT)

bool visibilityRule_12h = tf != 12 * HOUR and tf <=


fn_fractalVisibilityRule(fractalRayVisRuleInput_12h)
fn_plotRsiLevelRay('720', fractalRsiOversoldLvlInput, visibilityRule_12h ?
fractalRsiRayColorInput : TRANSPARENT)
fn_plotRsiLevelRay('720', fractalRsiOverboughtLvlInput, visibilityRule_12h ?
fractalRsiRayColorInput : TRANSPARENT)

bool visibilityRule_1D = tf != 1 * DAY and tf <=


fn_fractalVisibilityRule(fractalRayVisRuleInput_1D)
fn_plotRsiLevelRay('D', fractalRsiOversoldLvlInput, visibilityRule_1D ?
fractalRsiRayColorInput : TRANSPARENT)
fn_plotRsiLevelRay('D', fractalRsiOverboughtLvlInput, visibilityRule_1D ?
fractalRsiRayColorInput : TRANSPARENT)

bool visibilityRule_1W = tf != 1 * WEEK and tf <=


fn_fractalVisibilityRule(fractalRayVisRuleInput_1W)
fn_plotRsiLevelRay('W', fractalRsiOversoldLvlInput, visibilityRule_1W ?
fractalRsiRayColorInput : TRANSPARENT)
fn_plotRsiLevelRay('W', fractalRsiOverboughtLvlInput, visibilityRule_1W ?
fractalRsiRayColorInput : TRANSPARENT)
//

mee_rsi = ta.rsi(close, 3) //Wick Pressure 1 & 2


box_length = 6
atr_mult = 0.6
rsi_ob = 66
rsi_os = 44
bull_color = input(defval=color.rgb(0, 255, 0, 85), title="Bull Pressure",
inline="box_color")
bear_color = input(defval=color.rgb(255, 0, 0, 85), title="Bear Pressure",
inline="box_color")
mee_rsi1 = ta.rsi(close, 9)
box_length1 = 16
atr_1mult =0.6
rsi_ob1 = 77
rsi_os1 = 33
bull_color1 = input(defval=color.rgb(0, 255, 0, 85), title="Apis Pressure",
inline="box_color")
bear_color1 = input(defval=color.rgb(255, 0, 0, 85), title="Grizzly Pressure",
inline="box_color")

rsi_bullish_cond = mee_rsi < rsi_os or mee_rsi[1] < rsi_os or mee_rsi[2] <


rsi_os //Wick Pressure 1 //fast bull wick pressure
ll3 = ta.lowest(low, 3)
lc3 = math.min(ta.lowest(close, 3), ta.lowest(open, 3))
ApisBull1 = low<=lc3 and low[1]<=lc3 and low[2]<=lc3 and open>=lc3 and open[1]>=lc3
and open[2]>=lc3 and lc3-ll3>(atr_mult*ta.atr(9)) and rsi_bullish_cond and
close>open
if ApisBull1
box.new(bar_index, lc3, bar_index+box_length, ll3, border_color=bull_color,
bgcolor=color.rgb(0, 255, 225, 95))
//
rsi_bearish_cond = mee_rsi > rsi_ob or mee_rsi[1] > rsi_ob or mee_rsi[2] >
rsi_ob //fast bear wick pressure
hh3 = ta.highest(high, 3)
hc3 = math.max(ta.highest(close, 3), ta.highest(open, 3))
GrizzlyBear1 = high>=hc3 and high[1]>=hc3 and high[2]>=hc3 and open<=hc3 and
open[1]<=hc3 and open[2]<=hc3 and hh3-hc3>(atr_mult*ta.atr(9)) and rsi_bearish_cond
and close<open
if GrizzlyBear1
box.new(bar_index, hh3, bar_index+box_length, hc3, border_color=bear_color,
bgcolor=color.rgb(255, 0, 255, 95))
//

rsi_bullish_cond1 = mee_rsi1 < rsi_os1 or mee_rsi1[1] < rsi_os1 or mee_rsi1[2] <


rsi_os1 // Wick Pressure Level 2 // slow bull wick pressure
ll4 = ta.lowest(low, 3)
lc4 = math.min(ta.lowest(close, 3), ta.lowest(open, 3))
ApisBull2 = low<=lc4 and low[1]<=lc4 and low[2]<=lc4 and open>=lc4 and open[1]>=lc4
and open[2]>=lc4 and lc4-ll4>(atr_1mult*ta.atr(9)) and rsi_bullish_cond1 and
close>open
if ApisBull2
box.new(bar_index, lc4, bar_index+box_length1, ll4, border_color=bull_color1,
bgcolor=color.rgb(0, 255, 225, 95))
//

rsi_bearish_cond1 = mee_rsi1 > rsi_ob1 or mee_rsi1[1] > rsi_ob1 or mee_rsi1[2] >


rsi_ob1 // slowbear wick pressure
hh4 = ta.highest(high, 3)
hc4 = math.max(ta.highest(close, 3), ta.highest(open, 3))
GrizzlyBear2 = high>=hc4 and high[1]>=hc4 and high[2]>=hc4 and open<=hc4 and
open[1]<=hc4 and open[2]<=hc4 and hh4-hc4>(atr_1mult*ta.atr(9)) and
rsi_bearish_cond1 and close<open
if GrizzlyBear2
box.new(bar_index, hh4, bar_index+box_length1, hc4, border_color=bear_color1,
bgcolor=color.rgb(255, 0, 255, 95))
//

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