Professional Documents
Culture Documents
//////////////////////////////
///////////////////////////
/////////////////////////////////////////////////////////////////////////////
/////////////////
// -Datos
═════════════════════════════════════════════════════════════════════════════
═════════ //
//
-----------------------------------------------------------------------------
----------------- //
// Definiciones
-----------------------------------------------------------------------------
----- //
// -Calculos
═════════════════════════════════════════════════════════════════════════════
═══ //
//
-----------------------------------------------------------------------------
----------------- //
// Definicion
-----------------------------------------------------------------------------
----- //
nzVolume2 = nz(volume)
risingVol = nzVolume2 >= nzVolume2[1]
//
-----------------------------------------------------------------------------
----------------- //
// Perfil de volumen (precio por
volumen)------------------------------------------------------------ //
f_drawLineX2(_x11, _y1, _x21, _y2, _xloc, _extend, _color, _style, _width) =>
var id = line.new(_x11, _y1, _x21, _y2, _xloc, _extend, _color, _style,
_width)
line.set_xy1(id, _x11, _y1)
line.set_xy2(id, _x21, _y2)
line.set_color(id, _color)
grupo_Perfil_de_volumen = ' Perfil de volumen (precio por volumen)'
Informacion_Perfil_de_volumen = 'Perfil de (también conocido como precio por
volumen) es un estudio gráfico que muestra la actividad comercial durante un
período de tiempo específico en niveles de precios específicos.'
var startBarIndexX = 0
if time == chart.left_visible_bar_time
startBarIndexX := bar_index
f_getHighLow2() =>
var htf_h = 0., var htf_l = 0.
[htf_h, htf_l]
if bullCandle2[barIndex]
array.set(volumeStorageB, level,
array.get(volumeStorageB, level) + nzVolume2[barIndex] *
((barPriceHigh2[barIndex] - barPriceLow22[barIndex]) == 0 ? 1 : priceStep2 /
(barPriceHigh2[barIndex] - barPriceLow22[barIndex])) )
level += 1
volumeAbovePoc = 0.
if levelAbovePoc2 < profileLevels2 - 1
volumeAbovePoc := array.get(volumeStorage, levelAbovePoc2 + 1)
volumeBelowPoc = 0.
if levelBelowPoc2 > 0
volumeBelowPoc := array.get(volumeStorage, levelBelowPoc2 - 1)
if priceLevels
/////////////////////////
//////////////////////////
update()=>
var settings = zigzag.Settings.new(threshold_multiplier, depth,
color(na), false, false, false, false, "Absolute", true)
var zigzag.ZigZag zigZag = zigzag.newInstance(settings)
var zigzag.Pivot lastP = na
var float startPrice = na
var float height = na
settings.devThreshold := ta.atr(10) / close * 100 * threshold_multiplier
if zigZag.update()
lastP := zigZag.lastPivot()
if not na(lastP)
var line lineLast = na
if na(lineLast)
lineLast := line.new(lastP.start, lastP.end,
xloc=xloc.bar_time, color=color.gray, width=1, style=line.style_dashed)
else
line.set_first_point(lineLast, lastP.start)
line.set_second_point(lineLast, lastP.end)
_wrap(txt) =>
"(" + str.tostring(txt, format.mintick) + ")"
//////////////////////////
/////////////////////////////////////////////////// emAS
EMA20 = ta.ema(close,20)
EMA50 = ta.ema(close,50)
EMA100 = ta.ema(close,100)
EMA200 = ta.ema(close,200)