DeMark Pivot Point
Forums › ProRealTime foro Español › Soporte ProBuilder › DeMark Pivot Point
- This topic has 4 replies, 2 voices, and was last updated 7 years ago by bolsatrilera.
-
-
05/15/2017 at 10:46 AM #35567
Estoy intentando adaptar a Prorealtimev10.3 este ineteresante indicador aparecido en la plataforma Tradingview :https://es.tradingview.com/script/5ylLrNiE-DeMark-Pivot-Points/
¿Alguién puede ayudar en la adaptación ? no doy con ello.El código es:
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 15/05/2017
// Demark Pivot Points start with a different base and use different formulas for support
// and resistance. These Pivot Points are conditional on the relationship between the
// close and the open.
////////////////////////////////////////////////////////////
study(title=”DeMark Pivot Points”, shorttitle=”Pivot Point”, overlay = true)
width = input(2, minval=1)
xHigh = security(tickerid,”D”, high[1])
xLow = security(tickerid,”D”, low[1])
xClose = security(tickerid,”D”, close[1])
xOpen = security(tickerid,”D”, open[1])
xP = iff(xClose < xOpen, xHigh + (2 * xLow) + xClose,
iff(xClose > xOpen, (2 * xHigh) + xLow + xClose,
iff(xClose == xOpen, xHigh + xLow + (2 * xClose), xClose)))
xPP = xP / 4
vR1 = xP / 2 – xLow
vS1 = xP / 2 – xHigh
plot(xPP, color=blue, title=”PP”, style = circles, linewidth = width)
plot(vS1, color=#009600, title=”S1″, style = circles, linewidth = width)
plot(vR1, color=#ff0000, title=”R1″, style = circles, linewidth = width)05/15/2017 at 1:47 PM #35590¿Encontraste este código de los puntos del pivote del demark en la tela, es exacto con el de tradingview?
123456789101112131415161718IF DCLOSE(1) > DOPEN(1) THENphigh = DHIGH(1) + (DCLOSE(1) - DLOW(1)) / 2plow = (DLOW(1) + DCLOSE(1)) / 2ELSIF DCLOSE(1) < DOPEN(1) THENphigh = (DHIGH(1) + DCLOSE(1)) / 2plow = DLOW(1) - (DHIGH(1) - DCLOSE(1)) / 2ELSEphigh = DCLOSE(1) + (DHIGH(1) - DLOW(1)) / 2plow = DCLOSE(1) - (DHIGH(1) - DLOW(1)) / 2ENDIFRETURN phigh AS"DEMARK R", plow AS"DEMARK S"05/16/2017 at 9:14 AM #35674Buenos días Nicolas.Ese código me sale de la misma forma que el intento de traducción del código de Traingview que tengo,el problema es que visualmente no salen lineas paralelas como en el de Tradingview y no sé como hacerlo….
12345678910111213141516171819202122232425262728293031323334REM DEMARK PIVOT POINTS//adaptación para Prorealtimev10.3//indicador aparecido en la plataforma Tradignview////////////////////////////////////////////////////////////// Copyright by HPotter v1.0 15/05/2017// Demark Pivot Points start with a different base and use different formulas for support// and resistance. These Pivot Points are conditional on the relationship between the// close and the open.///////////////////////////////////////////////////////////xHigh = high[1]xLow = low[1]xClose = close[1]xOpen = open[1]if xClose < xOpen thenxP= xHigh + (2 * xLow) + xCloseendifif xClose > xOpen thenxP=(2 * xHigh) + xLow + xCloseendifif xClose = xOpen thenxP= xHigh + xLow + (2 * xClose)endifxPP = xP / 4vR1 = xP/ 2 - xLowvS1 = xP / 2 - xHighreturn xPP coloured(0,0,255)style(point,2)as "PP",vS1 coloured(0,100,0)style(point,2)as "S1",vR1 coloured(255,0,0)style(point,2)as "R1"05/16/2017 at 10:34 AM #3568205/16/2017 at 11:53 AM #35698creo que ahora lo comprendo Nicolas.Para que se vea como en el original hay que tener intradia (tiempo real).Lo mismo ocurre con el indicador de la biblioteca Pivot Point (Dayly)
-
AuthorPosts