Traduzione codice TW Power of ICT
Forums › ProRealTime forum Italiano › Supporto ProBuilder › Traduzione codice TW Power of ICT
- This topic has 2 replies, 2 voices, and was last updated 1 week ago by
Msport71.
-
-
10/07/2025 at 8:50 AM #252232
Buongiorno,
sono davvero curioso di provare questo indicatore, basato sulla teoria di Wykoff.
Grazie per l’aiuto.
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © TFlab
//@version=5indicator(“Power Of 3 ICT 01 [TradingFinder] AMD ICT & SMC Accumulations”, “TFlab AMD”, overlay = true, max_bars_back = 5000, max_boxes_count = 500,max_labels_count = 500,max_lines_count = 500)
// Accumulation
show_Accumulation = input(true, ‘Accumulation ‘, group = ‘Accumulation ‘)
Accumulation_ses = input.session(‘1900-0100’, ”, inline = ‘Accumulation’, group = ‘Accumulation ‘)
Accumulation_color = input.color(#8bbcfc, ‘Color’, inline = ‘Accumulation’, group = ‘Accumulation ‘)
Accumulation_text = ‘Accumulation’// Manipulation
show_Manipulation = input(true, ‘Manipulation ‘, group = ‘Manipulation ‘)
Manipulation_ses = input.session(‘0100-0700’, ”, inline = ‘Manipulation’, group = ‘Manipulation ‘)
Manipulation_color = input.color(#F0B884, ‘Color’, inline = ‘Manipulation’, group = ‘Manipulation ‘)
Manipulation_text = ‘Manipulation’// Distribution
show_Distribution = input(true, ‘Distribution ‘, group = ‘Distribution ‘)
Distribution_ses = input.session(‘0700-1300’, ”, inline = ‘Distribution’, group = ‘Distribution ‘)
Distribution_color = input.color(#0CC1C0, ‘Color’, inline = ‘Distribution’, group = ‘Distribution ‘)
Distribution_text = ‘Distribution’//zones
On_Accumulation = math.sign(nz(time(timeframe.period, Accumulation_ses, “America/New_York”)))
On_Manipulation = math.sign(nz(time(timeframe.period, Manipulation_ses, “America/New_York”)))
On_Distribution = math.sign(nz(time(timeframe.period, Distribution_ses, “America/New_York”)))//High & Low Detector
LowHighDetector(On, Color, Text) =>
var int Bar = 0
var float High = 0.0
var float Low = 0.0
var box BoX = na
var line H_Line = na
var line L_Line = na
var label LabeL = na
var bool Permit = false
if (On[1] == 0 and On == 1)
Bar := bar_index
High := high
Low := lowelse
if On[1] == 1 or On == 1
High := math.max(high , High)
Low := math.min(low , Low)if On > On[1] and str.tonumber(timeframe.period) <= 60
BoX := box.new(bar_index,High, bar_index , Low, bgcolor = color.new(Color, 85),
border_color = color.rgb(34, 101, 155),
border_style = line.style_dotted)LabeL := label.new(int(math.avg(Bar,bar_index)), High , text = Text ,xloc = xloc.bar_index, yloc = yloc.price, size = size.normal ,
style = label.style_label_down , textcolor = color.rgb(34, 101, 155), color = color.rgb(255, 255, 255, 100))
if On[1] == 1 or On == 1
box.set_top(BoX, High)
box.set_bottom(BoX, Low)
box.set_right(BoX, bar_index)
label.set_x(LabeL,math.round(math.avg(Bar,bar_index)))
label.set_y(LabeL, High)if show_Accumulation
LowHighDetector(On_Accumulation, Accumulation_color,Accumulation_text)if show_Manipulation
LowHighDetector(On_Manipulation,Manipulation_color,Manipulation_text)if show_Distribution
LowHighDetector(On_Distribution,Distribution_color,Distribution_text)10/10/2025 at 3:32 PM #252455ecco
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101// ============================================================// PRC_Power Of 3 ICT AMD [TradingFinder]// version = 1// 10.10.2025// Iván González @ www.prorealcode.com// Sharing ProRealTime knowledge// Traducido y adaptado por ProRealTime GEM// ============================================================// ==================== PARÁMETROS DE USUARIO =================// --- Controles Generales ---// IMPORTANTE: Ajusta este valor según la diferencia horaria entre el servidor de tu broker y Nueva York (EST/EDT).// Ejemplos:// - Servidor en Europa (CET/CEST, UTC+1/UTC+2) y NY (UTC-5/UTC-4) -> El offset es -6 o -7. Prueba con -6.// - Servidor en Londres (UTC/UTC+1) y NY -> El offset es -5.TimeZoneOffset = -6 // Horas de diferencia (Broker Time - NY Time)// --- Sesión de Acumulación ---showAccumulation = 1 // 1=Sí, 0=NoAccumulationStart = 190000 // Hora de inicio (formato HHMM)AccumulationEnd = 010000 // Hora de finalización (formato HHMM)// --- Sesión de Manipulación ---showManipulation = 1 // 1=Sí, 0=NoManipulationStart = 010000ManipulationEnd = 070000// --- Sesión de Distribución ---showDistribution = 1 // 1=Sí, 0=NoDistributionStart = 070000DistributionEnd = 130000// ==================== LÓGICA DE SESIONES HORARIAS =================// Detectamos si estamos dentro de cada sesióninAccumulation = (opentime >= AccumulationStart OR opentime < AccumulationEnd) AND showAccumulationinManipulation = (opentime >= ManipulationStart AND opentime < ManipulationEnd) AND showManipulationinDistribution = (opentime >= DistributionStart AND opentime < DistributionEnd) AND showDistribution// ==================== DETECTOR DE ALTOS Y BAJOS DE SESIÓN =================// --- Lógica para Acumulación ---ONCE startBarA = -1ONCE sessionHighA = 0ONCE sessionLowA = 0IF inAccumulation AND NOT inAccumulation[1] THEN // Primera barra de la sesiónstartBarA = barindexsessionHighA = highsessionLowA = lowELSIF inAccumulation THEN // Barras dentro de la sesiónsessionHighA = MAX(sessionHighA, high)sessionLowA = MIN(sessionLowA, low)ELSIF NOT inAccumulation AND inAccumulation[1] THEN // Primera barra DESPUÉS de la sesiónendBarA = barindex - 1midBarA = round((startBarA + endBarA) / 2)DRAWRECTANGLE(startBarA, sessionHighA, endBarA, sessionLowA) COLOURED(139,188,252) fillCOLOR(139,188,252,30)DRAWTEXT("Accumulation", midBarA, sessionHighA + 0.5*averagetruerange[14](close))startBarA = -1 // Reiniciar para el próximo cicloENDIF// --- Lógica para Manipulación ---ONCE startBarM = -1ONCE sessionHighM = 0ONCE sessionLowM = 0IF inManipulation AND NOT inManipulation[1] THENstartBarM = barindexsessionHighM = highsessionLowM = lowELSIF inManipulation THENsessionHighM = MAX(sessionHighM, high)sessionLowM = MIN(sessionLowM, low)ELSIF NOT inManipulation AND inManipulation[1] THENendBarM = barindex - 1midBarM = round((startBarM + endBarM) / 2)DRAWRECTANGLE(startBarM, sessionHighM, endBarM, sessionLowM) COLOURED(240,184,132) fillCOLOR(240,184,132,30)DRAWTEXT("Manipulation", midBarM, sessionHighM + 0.5*averagetruerange[14](close))startBarM = -1ENDIF// --- Lógica para Distribución ---ONCE startBarD = -1ONCE sessionHighD = 0ONCE sessionLowD = 0IF inDistribution AND NOT inDistribution[1] THENstartBarD = barindexsessionHighD = highsessionLowD = lowELSIF inDistribution THENsessionHighD = MAX(sessionHighD, high)sessionLowD = MIN(sessionLowD, low)ELSIF NOT inDistribution AND inDistribution[1] THENendBarD = barindex - 1midBarD = round((startBarD + endBarD) / 2)DRAWRECTANGLE(startBarD, sessionHighD, endBarD, sessionLowD) COLOURED(12,193,192) FILLCOLOR(12,193,192,30)DRAWTEXT("Distribution", midBarD, sessionHighD + 0.5*averagetruerange[14](close))startBarD = -1ENDIFRETURN1 user thanked author for this post.
10/10/2025 at 6:17 PM #252462 -
AuthorPosts
Find exclusive trading pro-tools on