PHP Code:
//@version=5
indicator("tr", overlay = true, behind_chart = false, max_lines_count=500, max_labels_count=500, max_polylines_count=100, max_boxes_count=100, max_bars_back = 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(#2ffb01, 00), "Bullish CISD", group=crayon_box)
blood_bath = input.color(color.new(#ff0000, 00), "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, "0", color=active_crayon, linewidth=girth_units, style=plot.style_line)
/////////////////////////////////////////
yapay zeka açıklaması....
PHP Code:
//@version=5
indicator("Safir CISD (Sadeleştirilmiş)", overlay=true, max_bars_back=100)
// ==========================================
// 1. AYARLAR
// ==========================================
show_line = input.bool(true, "Çizgiyi Göster")
line_width = input.int(3, "Çizgi Kalınlığı", minval=1)
col_bull = input.color(color.new(#2ffb01, 0), "Yükseliş Rengi")
col_bear = input.color(color.new(#ff0000, 0), "Düşüş Rengi")
// ==========================================
// 2. REFERANS MUM BULUCU (FONKSİYON)
// ==========================================
// Geçmişe bakıp son anlamlı mumun açılışını bulur.
// Bu fonksiyon "consult_the_crystal_ball" ve "archaeologist_jones" yerine geçer.
f_find_reference(int bias) =>
float found_price = open
int found_idx = 0
// Geriye dönük 500 bar tara
for i = 0 to 500
// Mum yönünü belirle (1: Yeşil, -1: Kırmızı)
int candle_dir = close[i] > open[i] ? 1 : close[i] < open[i] ? -1 : 0
if candle_dir == 0
continue
// Eğer aradığımız yönde bir mum bulursak kaydet
if candle_dir == bias
found_price := open[i]
found_idx := i
// İlk uygun mumu bulunca döngüden çık (Mantık korundu)
break
[found_price, bar_index - found_idx]
// ==========================================
// 3. ANA MANTIK (CISD MOTORU)
// ==========================================
var int trend_dir = 0 // 1: Boğa, -1: Ayı
var float ref_price = na // Takip edilen seviye (Bagholder Entry)
var float extreme_point = na // Görülen en uç nokta (Pain Threshold)
// İlk Başlangıç (Trend Tespiti)
if trend_dir == 0 and bar_index > 10
int init_dir = close > open ? 1 : close < open ? -1 : 0
if init_dir != 0
trend_dir := init_dir
[p, t] = f_find_reference(init_dir)
ref_price := p
extreme_point := init_dir == 1 ? high : low
// Trend Takibi ve Güncelleme
int current_candle_dir = close > open ? 1 : close < open ? -1 : 0
if trend_dir == 1 // YÜKSELİŞTEYSEK
// Yeni bir tepe yaparsak referans noktasını güncelle
if high > extreme_point
extreme_point := high
// Son yeşil mumun açılışını yeni destek yap
[p, t] = f_find_reference(1)
ref_price := p
else if trend_dir == -1 // DÜŞÜŞTEYSEK
// Yeni bir dip yaparsak referans noktasını güncelle
if low < extreme_point
extreme_point := low
// Son kırmızı mumun açılışını yeni direnç yap
[p, t] = f_find_reference(-1)
ref_price := p
// ==========================================
// 4. KIRILIM VE SİNYAL (FLIP)
// ==========================================
bool trend_broke_up = trend_dir == -1 and close > ref_price // Short squeeze
bool trend_broke_dn = trend_dir == 1 and close < ref_price // Long rekt
// Trend değişimi gerçekleşirse
if trend_broke_up or trend_broke_dn
// Yeni yönü belirle
int new_dir = trend_broke_up ? 1 : -1
trend_dir := new_dir
// Yeni referansları ayarla
[p, t] = f_find_reference(new_dir)
ref_price := p
extreme_point := new_dir == 1 ? high : low
// ==========================================
// 5. GÖRSELLEŞTİRME
// ==========================================
active_color = trend_dir == 1 ? col_bull : col_bear
plot(show_line ? ref_price : na, "CISD Hattı", color=active_color, linewidth=line_width, style=plot.style_line)
böylece..hem yazarın... kişselliği.... hem de sadeleşme ile genellik elde edilir ki....
Yer İmleri