PHP Code:
//@version=6
indicator("tr", shorttitle="..", overlay=true, max_lines_count=500, max_labels_count=500)
var string vanity_group = "Visual Settings"
magic_wand_toggle = input.bool(true, "Show Active CISD Level (Plot)", group=vanity_group)
drama_filter = input.string("Both", "Triggered CISD Display", options=["Both", "Bullish Only", "Bearish Only", "None"], group=vanity_group)
amnesia_mode = input.bool(false, "Limit Displayed Historical Lines", group=vanity_group)
short_term_memory = input.int(10, "Max Lines to Show", minval=1, group=vanity_group)
yell_at_me = input.bool(true, "Show Labels", group=vanity_group)
girth_units = input.int(4, "Line Width", minval=1, group=vanity_group)
scream_volume = input.string(size.normal, "Label Size", options=[size.tiny, size.small, size.normal, size.large], group=vanity_group)
hipster_font_toggle = input.string("Default", "Font Family", options=["Default", "Monospace"], group=vanity_group)
fashion_choice = input.string("Solid", "Triggered Line Style", options=["Solid", "Dashed", "Dotted"], group=vanity_group)
crayon_box = "Colors"
shrek_mode = input.color(color.new(color.green, 0), "Bullish CISD", group=crayon_box)
blood_bath = input.color(color.new(color.red, 0), "Bearish CISD", group=crayon_box)
nerd_stats = "Debug"
paranoia_switch = input.bool(false, "Debug: Show Extreme Tracking", group=nerd_stats)
gossip_column = "HTF Trend Panel"
stalker_mode = input.bool(true, "Show Multi-Timeframe Table", group=gossip_column)
feng_shui = input.string("Bottom Right", "Table Position", options=["Top Right", "Middle Right", "Bottom Right", "Bottom Left"], group=gossip_column)
eye_test = input.string("Small", "Table Size", options=["Tiny", "Small", "Normal", "Large"], group=gossip_column)
// ---------------------------------------------------------
var string fancy_typeface = hipster_font_toggle == "Monospace" ? font.family_monospace : font.family_default
decode_fashion_statement(outfit) =>
switch outfit
"Solid" => line.style_solid
"Dashed" => line.style_dashed
=> line.style_dotted
chosen_style = decode_fashion_statement(fashion_choice)
var int vibes = 0
var float bagholder_entry = na
var int time_machine_setting = na
var float pain_threshold = na
var label sticky_note_of_shame = na
var array<line> graveyard_of_hopes = array.new<line>()
var array<label> choir_of_screams = array.new<label>()
consult_the_crystal_ball(int bias) =>
int temporal_shift = 0
float ancient_price = open
for i = 0 to 500
int candle_attitude = close[i] > open[i] ? 1 : close[i] < open[i] ? -1 : 0
if candle_attitude == 0
continue
bool mood_match = candle_attitude == bias
if not mood_match
break
temporal_shift := i
ancient_price := open[i]
[ancient_price, bar_index - temporal_shift]
archaeologist_jones(int bias) =>
int i = 1
bool artifact_found = false
int dig_site_idx = 0
float artifact_value = na
for j = 1 to 500
i := j
int candle_attitude = close[i] > open[i] ? 1 : close[i] < open[i] ? -1 : 0
if candle_attitude == 0
continue
bool is_correct_era = candle_attitude == bias
if not artifact_found
if is_correct_era
artifact_found := true
dig_site_idx := i
artifact_value := open[i]
else
if not is_correct_era
break
dig_site_idx := i
artifact_value := open[i]
[artifact_value, bar_index - dig_site_idx]
if vibes == 0 and bar_index > 10
int first_impression = close > open ? 1 : close < open ? -1 : 0
if first_impression == 0
for k = 1 to 50
first_impression := close[k] > open[k] ? 1 : close[k] < open[k] ? -1 : 0
if first_impression != 0
break
if first_impression != 0
vibes := first_impression
[origin_price, origin_time] = consult_the_crystal_ball(first_impression)
bagholder_entry := origin_price
time_machine_setting := origin_time
pain_threshold := first_impression == 1 ? high : low
int candle_personality = close > open ? 1 : close < open ? -1 : 0
float fresh_hopium = na
int fresh_timestamp = na
if vibes == 1
if high > pain_threshold
pain_threshold := high
if candle_personality == 1
[p_price, p_idx] = consult_the_crystal_ball(1)
fresh_hopium := p_price
fresh_timestamp := p_idx
else
[p_price, p_idx] = archaeologist_jones(1)
fresh_hopium := p_price
fresh_timestamp := p_idx
bagholder_entry := fresh_hopium
time_machine_setting := fresh_timestamp
else if vibes == -1
if low < pain_threshold
pain_threshold := low
if candle_personality == -1
[p_price, p_idx] = consult_the_crystal_ball(-1)
fresh_hopium := p_price
fresh_timestamp := p_idx
else
[p_price, p_idx] = archaeologist_jones(-1)
fresh_hopium := p_price
fresh_timestamp := p_idx
bagholder_entry := fresh_hopium
time_machine_setting := fresh_timestamp
bool shorts_squeezed = vibes == -1 and close > bagholder_entry
bool longs_rekt = vibes == 1 and close < bagholder_entry
if shorts_squeezed or longs_rekt
bool should_i_paint_it = false
if drama_filter == "Both"
should_i_paint_it := true
else if drama_filter == "Bullish Only"
should_i_paint_it := shorts_squeezed
else if drama_filter == "Bearish Only"
should_i_paint_it := longs_rekt
if should_i_paint_it
color mood_ring = shorts_squeezed ? shrek_mode : blood_bath
line tragedy_line = line.new(time_machine_setting, bagholder_entry, bar_index, bagholder_entry, color=mood_ring, width=girth_units, style=chosen_style)
array.push(graveyard_of_hopes, tragedy_line)
label loud_noise = na
//if yell_at_me
//int middle_of_nowhere = math.round((time_machine_setting + bar_index) / 2)
//string gibberish = shorts_squeezed ? "+ALL" : "-SAT"
//color ink_color = shorts_squeezed ? shrek_mode : blood_bath
//loud_noise := label.new(middle_of_nowhere, bagholder_entry, gibberish, style=shorts_squeezed ? label.style_label_down : label.style_label_up, color=color.new(#000000, 100), textcolor=ink_color, size=scream_volume, text_font_family = fancy_typeface)
array.push(choir_of_screams, loud_noise)
int new_emotional_state = shorts_squeezed ? 1 : -1
vibes := new_emotional_state
[reset_price, reset_time] = consult_the_crystal_ball(new_emotional_state)
bagholder_entry := reset_price
time_machine_setting := reset_time
pain_threshold := new_emotional_state == 1 ? high : low
color active_crayon = vibes == 1 ? shrek_mode : blood_bath
plot(magic_wand_toggle ? bagholder_entry : na, "TR", color=active_crayon, linewidth=girth_units, style=plot.style_stepline)
///////////////////////
Yer İmleri