ayuda con colocacion de precio por encima de ema20
Forums › ProRealTime foro Español › Soporte ProBuilder › ayuda con colocacion de precio por encima de ema20
- This topic has 16 replies, 3 voices, and was last updated 1 year ago by Patrickgarridoo.
-
-
06/15/2023 at 7:34 AM #216249
Buena en este indicador me falta añadir en el ultimo cuadro que cuando el precio este por encima o por debajo de ema20 se señalice en el cuadro de precio que he creado y me lo marque con una bola arriba si esta por encima o abajo si esta debajo ema20 del precio, pero correlativo a la temporalidad que indica el cuadro. tendria que ser como indico en la imagen. Ya que yo lo intento pero no me sale correlativo a las temporalidades si se menan de sitio si no siempre me salen ordenadas y no correlativas. Un saludo
defparam drawonlastbaronly = true
TIMEFRAME(1mn)
ema201 = ExponentialAverage[20](close)
precio1 = close
distancia1 = abs((ema201/precio1)-1)*100
c1=close > close[1]
TIMEFRAME(2mn)
ema202 = ExponentialAverage[20](close)
precio2 = close
distancia2 = abs((ema202/precio2)-1)*100
c2=close > close[1]
TIMEFRAME(3mn)
ema203 = ExponentialAverage[20](close)
precio3 = close
distancia3 = abs((ema203/precio3)-1)*100
c3=close > close[1]
TIMEFRAME(4mn)
ema204 = ExponentialAverage[20](close)
precio4 = close
distancia4 = abs((ema204/precio4)-1)*100
c4=close > close[1]
TIMEFRAME(5mn)
ema205 = ExponentialAverage[20](close)
precio5 = close
distancia5 = abs((ema205/precio5)-1)*100
c5=close > close[1]
TIMEFRAME(6mn)
ema206 = ExponentialAverage[20](close)
precio6 = close
distancia6 = abs((ema206/precio6)-1)*100
c6=close > close[1]
TIMEFRAME(7mn)
ema207 = ExponentialAverage[20](close)
precio7 = close
distancia7 = abs((ema207/precio7)-1)*100
c7=close > close[1]TIMEFRAME(default)
menordistancia = min(distancia1,min(distancia2,min(distancia3,min(distancia4,min(distancia5,min(distancia6,distancia7))))))
TF1 = 0
TF2 = 0
TF3 = 0
TF4 = 0
TF5 = 0
TF6 = 0
TF7 = 0
//
D1 = distancia1
D2 = distancia2
D3 = distancia3
D4 = distancia4
D5 = distancia5
D6 = distancia6
D7 = distancia7r=204
g=0
b=0r1=204
g1=0
b1=0r3=204
g3=0
b3=0r4=204
g4=0
b4=0r5=204
g5=0
b5=0r6=204
g6=0
b6=0r7=204
g7=0
b7=0//
menordistancia1 = min(D1,min(D2,min(D3,min(D4,min(D5,min(D6,D7))))))
IF menordistancia1 = D1 and c1 THEN
TF1 = 1 //1-minute TF
D1 = 9999999
r=0
g=180
b=0
ELSIF menordistancia1 = D1 THEN
TF1 = 1 //1-minute TF
D1 = 9999999
//———————————————————————ELSIF menordistancia1 = D2 and c1 THEN
TF1 = 2 //2-minute TF
D2 = 9999999
r=0
g=180
b=0
ELSIF menordistancia1 = D2 THEN
TF1 = 2 //2-minute TF
D2 = 9999999
//———————————————————————ELSIF menordistancia1 = D3 and c1 THEN
TF1 = 3 //3-minute TF
D3 = 9999999
r=0
g=180
b=0
ELSIF menordistancia1 = D3 THEN
TF1 = 3 //3-minute TF
D3 = 9999999
//———————————————————————ELSIF menordistancia1 = D4 and c1 THEN
TF1 = 4 //4-minute TF
D4 = 9999999
r=0
g=180
b=0
ELSIF menordistancia1 = D4 THEN
TF1 = 4 //4-minute TF
D4 = 9999999
//———————————————————————ELSIF menordistancia1 = D5 and c1 THEN
TF1 = 5 //5-minute TF
D5 = 9999999
r=0
g=180
b=0
ELSIF menordistancia1 = D5 THEN
TF1 = 5 //5-minute TF
D5 = 9999999//———————————————————————
ELSIF menordistancia1 = D6 and c1 THEN
TF1 = 6 //6-minute TF
D6 = 9999999
r=0
g=180
b=0
ELSIF menordistancia1 = D6 THEN
TF1 = 6 //6-minute TF
D6 = 9999999
//———————————————————————ELSIF menordistancia1 = D7 and c1 THEN
TF1 = 7 //7-minute TF
D7 = 9999999
r=0
g=180
b=0
ELSIF menordistancia1 = D7 THEN
TF1 = 7 //7-minute TF
D7 = 9999999
//———————————————————————ENDIF
//
menordistancia2 = min(D1,min(D2,min(D3,min(D4,min(D5,min(D6,D7))))))
IF menordistancia2 = D1 and c2 THEN
TF2 = 1 //1-minute TF
D1 = 9999999
r1=0
g1=180
b1=0ELSIF menordistancia2 = D1 THEN
TF2 = 1 //1-minute TF
D1 = 9999999
//———————————————————————ELSIF menordistancia2 = D2 and c2 THEN
TF2 = 2 //2-minute TF
D2 = 9999999
r1=0
g1=180
b1=0
ELSIF menordistancia2 = D2 THEN
TF2 = 2 //2-minute TF
D2 = 9999999
//———————————————————————ELSIF menordistancia2 = D3 and c2 THEN
TF2 = 3 //3-minute TF
D3 = 9999999
r1=0
g1=180
b1=0
ELSIF menordistancia2 = D3 THEN
TF2 = 3 //3-minute TF
D3 = 9999999
//———————————————————————ELSIF menordistancia2 = D4 and c2 THEN
TF2 = 4 //4-minute TF
D4 = 9999999
r1=0
g1=180
b1=0
ELSIF menordistancia2 = D4 THEN
TF2 = 4 //4-minute TF
D4 = 9999999
//———————————————————————ELSIF menordistancia2 = D5 and c2 THEN
TF2 = 5 //5-minute TF
D5 = 9999999
r1=0
g1=180
b1=0
ELSIF menordistancia2 = D5 THEN
TF2 = 5 //5-minute TF
D5 = 9999999//———————————————————————
ELSIF menordistancia2 = D6 and c2 THEN
TF2 = 6 //6-minute TF
D6 = 9999999
r1=0
g1=180
b1=0
ELSIF menordistancia2 = D6 THEN
TF2 = 6 //6-minute TF
D6 = 9999999
//———————————————————————ELSIF menordistancia2 = D7 and c2 THEN
TF2 = 7 //7-minute TF
D7 = 9999999
r1=0
g1=180
b1=0
ELSIF menordistancia2 = D7 THEN
TF2 = 7 //7-minute TF
D7 = 9999999
//———————————————————————ENDIF
//
menordistancia3 = min(D1,min(D2,min(D3,min(D4,min(D5,min(D6,D7))))))
IF menordistancia3 = D1 and c3 THEN
TF3 = 1 //1-minute TF
D1 = 9999999
r3=0
g3=180
b3=0
ELSIF menordistancia3 = D1 THEN
TF3 = 1 //1-minute TF
D1 = 9999999
//———————————————————————
ELSIF menordistancia3 = D2 and c3 THEN
TF3 = 2 //2-minute TF
D2 = 9999999
r3=0
g3=180
b3=0
ELSIF menordistancia3 = D2 THEN
TF3 = 2 //2-minute TF
D2 = 9999999
//———————————————————————
ELSIF menordistancia3 = D3 and c3 THEN
TF3 = 3 //3-minute TF
D3 = 9999999
r3=0
g3=180
b3=0
ELSIF menordistancia3 = D3 THEN
TF3 = 3 //3-minute TF
D3 = 9999999
//———————————————————————
ELSIF menordistancia3 = D4 and c3 THEN
TF3 = 4 //4-minute TF
D4 = 9999999
r3=0
g3=180
b3=0
ELSIF menordistancia3 = D4 THEN
TF3 = 4 //4-minute TF
D4 = 9999999
//———————————————————————
ELSIF menordistancia3 = D5 and c3 THEN
TF3 = 5 //5-minute TF
D5 = 9999999
r3=0
g3=180
b3=0
ELSIF menordistancia3 = D5 THEN
TF3 = 5 //5-minute TF
D5 = 9999999
//———————————————————————
ELSIF menordistancia3 = D6 and c3 THEN
TF3 = 6 //6-minute TF
D6 = 9999999
r3=0
g3=180
b3=0
ELSIF menordistancia3 = D6 THEN
TF3 = 6 //6-minute TF
D6 = 9999999
//———————————————————————
ELSIF menordistancia3 = D7 and c3 THEN
TF3 = 7 //7-minute TF
D7 = 9999999
r3=0
g3=180
b3=0
ELSIF menordistancia3 = D7 THEN
TF3 = 7 //7-minute TF
D7 = 9999999
//———————————————————————
ENDIF
//
menordistancia4 = min(D1,min(D2,min(D3,min(D4,min(D5,min(D6,D7))))))
IF menordistancia4 = D1 and c4 THEN
TF4 = 1 //1-minute TF
D1 = 9999999
r4=0
g4=180
b4=0
ELSIF menordistancia4 = D1 THEN
TF4 = 1 //1-minute TF
D1 = 9999999
//———————————————————————
ELSIF menordistancia4 = D2 and c4 THEN
TF4 = 2 //2-minute TF
D2 = 9999999
r4=0
g4=180
b4=0
ELSIF menordistancia4 = D2 THEN
TF4 = 2 //2-minute TF
D2 = 9999999
//———————————————————————
ELSIF menordistancia4 = D3 and c4 THEN
TF4 = 3 //3-minute TF
D3 = 9999999
r4=0
g4=180
b4=0
ELSIF menordistancia4 = D3 THEN
TF4 = 3 //3-minute TF
D3 = 9999999
//———————————————————————
ELSIF menordistancia4 = D4 and c4 THEN
TF4 = 4 //4-minute TF
D4 = 9999999
r4=0
g4=180
b4=0
ELSIF menordistancia4 = D4 THEN
TF4 = 4 //4-minute TF
D4 = 9999999
//———————————————————————
ELSIF menordistancia4 = D5 and c4 THEN
TF4 = 5 //5-minute TF
D5 = 9999999
r4=0
g4=180
b4=0
ELSIF menordistancia4 = D5 THEN
TF4 = 5 //5-minute TF
D5 = 9999999
//———————————————————————ELSIF menordistancia4 = D6 and c4 THEN
TF4 = 6 //6-minute TF
D6 = 9999999
r4=0
g4=180
b4=0
ELSIF menordistancia4 = D6 THEN
TF4 = 6 //6-minute TF
D6 = 9999999
//———————————————————————
ELSIF menordistancia4 = D7 and c4 THEN
TF4 = 7 //7-minute TF
D7 = 9999999
r4=0
g4=180
b4=0
ELSIF menordistancia4 = D7 THEN
TF4 = 7 //7-minute TF
D7 = 9999999
//———————————————————————
ENDIF
//
menordistancia5 = min(D1,min(D2,min(D3,min(D4,min(D5,min(D6,D7))))))
IF menordistancia5 = D1 and c5 THEN
TF5 = 1 //1-minute TF
D1 = 9999999
r5=0
g5=180
b5=0
ELSIF menordistancia5 = D1 THEN
TF5 = 1 //1-minute TF
D1 = 9999999
//———————————————————————
ELSIF menordistancia5 = D2 and c5 THEN
TF5 = 2 //2-minute TF
D2 = 9999999
r5=0
g5=180
b5=0
ELSIF menordistancia5 = D2 THEN
TF5 = 2 //2-minute TF
D2 = 9999999
//———————————————————————
ELSIF menordistancia5 = D3 and c5 THEN
TF5 = 3 //3-minute TF
D3 = 9999999
r5=0
g5=180
b5=0
ELSIF menordistancia5 = D3 THEN
TF5 = 3 //3-minute TF
D3 = 9999999
//———————————————————————
ELSIF menordistancia5 = D4 and c5 THEN
TF5 = 4 //4-minute TF
D4 = 9999999
r5=0
g5=180
b5=0
ELSIF menordistancia5 = D4 THEN
TF5 = 4 //4-minute TF
D4 = 9999999
//———————————————————————
ELSIF menordistancia5 = D5 and c5 THEN
TF5 = 5 //5-minute TF
D5 = 9999999
r5=0
g5=180
b5=0
ELSIF menordistancia5 = D5 THEN
TF5 = 5 //5-minute TF
D5 = 9999999
//———————————————————————
ELSIF menordistancia5 = D6 and c5 THEN
TF5 = 6 //6-minute TF
D6 = 9999999
r5=0
g5=180
b5=0
ELSIF menordistancia5 = D6 THEN
TF5 = 6 //6-minute TF
D6 = 9999999
//———————————————————————
ELSIF menordistancia5 = D7 and c5 THEN
TF5 = 7 //7-minute TF
D7 = 9999999
r5=0
g5=180
b5=0
ELSIF menordistancia5 = D7 THEN
TF5 = 7 //7-minute TF
D7 = 9999999
//———————————————————————
ENDIF
//
menordistancia6 = min(D1,min(D2,min(D3,min(D4,min(D5,min(D6,D7))))))
IF menordistancia6 = D1 and c6 THEN
TF6 = 1 //1-minute TF
D1 = 9999999
r6=0
g6=180
b6=0
ELSIF menordistancia6 = D1 THEN
TF6 = 1 //1-minute TF
D1 = 9999999
//———————————————————————
ELSIF menordistancia6 = D2 and c6 THEN
TF6 = 2 //2-minute TF
D2 = 9999999
r6=0
g6=180
b6=0
ELSIF menordistancia6 = D2 THEN
TF6 = 2 //2-minute TF
D2 = 9999999
//———————————————————————
ELSIF menordistancia6 = D3 and c6 THEN
TF6 = 3 //3-minute TF
D3 = 9999999
r6=0
g6=180
b6=0
ELSIF menordistancia6 = D3 THEN
TF6 = 3 //3-minute TF
D3 = 9999999
//———————————————————————
ELSIF menordistancia6 = D4 and c6 THEN
TF6 = 4 //4-minute TF
D4 = 9999999
r6=0
g6=180
b6=0
ELSIF menordistancia6 = D4 THEN
TF6 = 4 //4-minute TF
D4 = 9999999
//———————————————————————
ELSIF menordistancia6 = D5 and c6 THEN
TF6 = 5 //5-minute TF
D5 = 9999999
r6=0
g6=180
b6=0
ELSIF menordistancia6 = D5 THEN
TF6 = 5 //5-minute TF
D5 = 9999999
//———————————————————————
ELSIF menordistancia6 = D6 and c6 THEN
TF6 = 6 //6-minute TF
D6 = 9999999
r6=0
g6=180
b6=0
ELSIF menordistancia6 = D6 THEN
TF6 = 6 //6-minute TF
D6 = 9999999
//———————————————————————
ELSIF menordistancia6 = D7 and c6 THEN
TF6 = 7 //7-minute TF
D7 = 9999999
r6=0
g6=180
b6=0
ELSIF menordistancia6 = D7 THEN
TF6 = 7 //7-minute TF
D7 = 9999999
//———————————————————————
ENDIF
//menordistancia7 = min(D1,min(D2,min(D3,min(D4,min(D5,min(D6,D7))))))
IF menordistancia7 = D1 and c7 THEN
TF7 = 1 //1-minute TF
D1 = 9999999
r7=0
g7=180
b7=0
ELSIF menordistancia7 = D1 THEN
TF7 = 1 //1-minute TF
D1 = 9999999
//———————————————————————
ELSIF menordistancia7 = D2 and c7 THEN
TF7 = 2 //2-minute TF
D2 = 9999999
r7=0
g7=180
b7=0
ELSIF menordistancia7 = D2 THEN
TF7 = 2 //2-minute TF
D2 = 9999999
//———————————————————————
ELSIF menordistancia7 = D3 and c7 THEN
TF7 = 3 //3-minute TF
D3 = 9999999
r7=0
g7=180
b7=0
ELSIF menordistancia7 = D3 THEN
TF7 = 3 //3-minute TF
D3 = 9999999
//———————————————————————
ELSIF menordistancia7 = D4 and c7 THEN
TF7 = 4 //4-minute TF
D4 = 9999999
r7=0
g7=180
b7=0
ELSIF menordistancia7 = D4 THEN
TF7 = 4 //4-minute TF
D4 = 9999999
//———————————————————————
ELSIF menordistancia7 = D5 and c7 THEN
TF7 = 5 //5-minute TF
D5 = 9999999
r7=0
g7=180
b7=0
ELSIF menordistancia7 = D5 THEN
TF7 = 5 //5-minute TF
D5 = 9999999
//———————————————————————
ELSIF menordistancia7 = D6 and c7 THEN
TF7 = 6 //6-minute TF
D6 = 9999999
r7=0
g7=180
b7=0
ELSIF menordistancia7 = D6 THEN
TF7 = 6 //6-minute TF
D6 = 9999999
//———————————————————————
ELSIF menordistancia7 = D7 and c7 THEN
TF7 = 7 //7-minute TF
D7 = 9999999
r7=0
g7=180
b7=0
ELSIF menordistancia7 = D7 THEN
TF7 = 7 //7-minute TF
D7 = 9999999
//———————————————————————
ENDIFDrawText(“#menordistancia1#”,BarIndex+ 2,7.0,Dialog,Bold,20)
DrawText(“#menordistancia2#”,BarIndex+ 2,5.75,Dialog,Bold,20)
DrawText(“#menordistancia3#”,BarIndex+ 2,4.60,Dialog,Bold,20)
DrawText(“#menordistancia4#”,BarIndex+ 2,3.45,Dialog,Bold,20)
DrawText(“#menordistancia5#”,BarIndex+ 2,2.30,Dialog,Bold,20)
DrawText(“#menordistancia6#”,BarIndex+ 2,1.15,Dialog,Bold,20)
DrawText(“#menordistancia7#”,BarIndex+ 2,0.0,Dialog,Bold,20)DRAWSEGMENT(barindex-1, 6.4, barindex+5,6.4) //linea hotizontal 1
DRAWSEGMENT(barindex-1, 5.25, barindex+5,5.25) //linea hotizontal 2
DRAWSEGMENT(barindex-1, 4.10, barindex+5,4.10) //linea hotizontal 3
DRAWSEGMENT(barindex-1, 2.95, barindex+5,2.95) //linea hotizontal 4
DRAWSEGMENT(barindex-1, 1.80, barindex+5,1.80) //linea hotizontal 5
DRAWSEGMENT(barindex-1, 0.71, barindex+5,0.71) //linea hotizontal 6DRAWSEGMENT(barindex+1, -0.5, barindex+1, 7.5) //primera linea vertical
DRAWSEGMENT(barindex+3, -0.5, barindex+3, 7.5) // segunda linea verticalDRAWRECTANGLE(barindex-1, 7.5, barindex+5,-0.5)//rectangulo
DrawText(“PRECIO”,BarIndex+4,7.0,Dialog,Bold,10)COLOURED(0,0,0)
DrawText(“PRECIO”,BarIndex+4,5.85,Dialog,Bold,10)COLOURED(0,0,0)
DrawText(“PRECIO”,BarIndex+4,4.66,Dialog,Bold,10)COLOURED(0,0,0)
DrawText(“PRECIO”,BarIndex+4,3.55,Dialog,Bold,10)COLOURED(0,0,0)
DrawText(“PRECIO”,BarIndex+4,2.39,Dialog,Bold,10)COLOURED(0,0,0)
DrawText(“PRECIO”,BarIndex+4,1.29,Dialog,Bold,10)COLOURED(0,0,0)
DrawText(“PRECIO”,BarIndex+4,0.12,Dialog,Bold,10)COLOURED(0,0,0)DrawText(“#TF1#”,BarIndex,7.0,Dialog,Bold,20)COLOURED(r,g,b)
DrawText(“#TF2#”,BarIndex,5.75,Dialog,Bold,20)COLOURED(r1,g1,b1)
DrawText(“#TF3#”,BarIndex,4.60,Dialog,Bold,20)COLOURED(r3,g3,b3)
DrawText(“#TF4#”,BarIndex,3.45,Dialog,Bold,20)COLOURED(r4,g4,b4)
DrawText(“#TF5#”,BarIndex,2.30,Dialog,Bold,20)COLOURED(r5,g5,b5)
DrawText(“#TF6#”,BarIndex,1.15,Dialog,Bold,20)COLOURED(r6,g6,b6)
DrawText(“#TF7#”,BarIndex,0.0,Dialog,Bold,20)COLOURED(r7,g7,b7)RETURN
06/15/2023 at 11:54 AM #21627606/15/2023 at 6:07 PM #216302Como resalté en la foto adjunta, D1 y C1 están bien, pero las siguientes líneas están mal, ya que D2 debe coincidir con C2, D3 con C3, etc.
Creo que el problema es este.
06/21/2023 at 12:22 PM #216537defparam drawonlastbaronly = true
TIMEFRAME(1mn)
ema201 = ExponentialAverage[20](close)
precio1 = close
distancia1 = abs((ema201/precio1)-1)*100
c1= ExponentialAverage[20](close) > close
TIMEFRAME(2mn)
ema202 = ExponentialAverage[20](close)
precio2 = close
distancia2 = abs((ema202/precio2)-1)*100
c2= ExponentialAverage[20](close) > close
TIMEFRAME(3mn)
ema203 = ExponentialAverage[20](close)
precio3 = close
distancia3 = abs((ema203/precio3)-1)*100
c3= ExponentialAverage[20](close) > close
TIMEFRAME(4mn)
ema204 = ExponentialAverage[20](close)
precio4 = close
distancia4 = abs((ema204/precio4)-1)*100
c4= ExponentialAverage[20](close) > close
TIMEFRAME(5mn)
ema205 = ExponentialAverage[20](close)
precio5 = close
distancia5 = abs((ema205/precio5)-1)*100
c5= ExponentialAverage[20](close) > close
TIMEFRAME(6mn)
ema206 = ExponentialAverage[20](close)
precio6 = close
distancia6 = abs((ema206/precio6)-1)*100
c6= ExponentialAverage[20](close) > close
TIMEFRAME(7mn)
ema207 = ExponentialAverage[20](close)
precio7 = close
distancia7 = abs((ema207/precio7)-1)*100
c7= ExponentialAverage[20](close) > closeTIMEFRAME(default)
menordistancia = min(distancia1,min(distancia2,min(distancia3,min(distancia4,min(distancia5,min(distancia6,distancia7))))))
TF1 = 0
TF2 = 0
TF3 = 0
TF4 = 0
TF5 = 0
TF6 = 0
TF7 = 0
//
D1 = distancia1
D2 = distancia2
D3 = distancia3
D4 = distancia4
D5 = distancia5
D6 = distancia6
D7 = distancia7//
menordistancia1 = min(D1,min(D2,min(D3,min(D4,min(D5,min(D6,D7))))))
IF menordistancia1 = D1 and c1 THEN
TF1 = 1 //1-minute TF
D1 = 9999999
DRAWPOINT(barindex+4, 7.29, 2) COLOURED(204,0,0)
ELSIF menordistancia1 = D1 THEN
TF1 = 1 //1-minute TF
D1 = 9999999
DRAWPOINT(barindex+4, 6.68, 2) COLOURED(204,0,0)
//———————————————————————ELSIF menordistancia1 = D2 and c2 THEN
TF1 = 2 //2-minute TF
D2 = 9999999
DRAWPOINT(barindex+4, 6.18, 2) COLOURED(204,0,0)
ELSIF menordistancia1 = D2 THEN
TF1 = 2 //2-minute TF
D2 = 9999999
DRAWPOINT(barindex+4, 5.52, 2) COLOURED(204,0,0)
//———————————————————————ELSIF menordistancia1 = D3 and c3 THEN
TF1 = 3 //3-minute TF
D3 = 9999999
DRAWPOINT(barindex+4, 4.94, 2) COLOURED(204,0,0)
ELSIF menordistancia1 = D3 THEN
TF1 = 3 //3-minute TF
D3 = 9999999
DRAWPOINT(barindex+4, 4.35, 2) COLOURED(204,0,0)
//———————————————————————ELSIF menordistancia1 = D4 and c4 THEN
TF1 = 4 //4-minute TF
D4 = 9999999
DRAWPOINT(barindex+4, 3.85, 2) COLOURED(204,0,0)
ELSIF menordistancia1 = D4 THEN
TF1 = 4 //4-minute TF
D4 = 9999999
DRAWPOINT(barindex+4, 3.20, 2) COLOURED(204,0,0)
//———————————————————————ELSIF menordistancia1 = D5 and c5 THEN
TF1 = 5 //5-minute TF
D5 = 9999999
DRAWPOINT(barindex+4, 2.70, 2) COLOURED(204,0,0)
ELSIF menordistancia1 = D5 THEN
TF1 = 5 //5-minute TF
D5 = 9999999
DRAWPOINT(barindex+4, 2.02, 2) COLOURED(204,0,0)
//———————————————————————ELSIF menordistancia1 = D6 and c6 THEN
TF1 = 6 //6-minute TF
D6 = 9999999
DRAWPOINT(barindex+4, 1.56, 2) COLOURED(204,0,0)
ELSIF menordistancia1 = D6 THEN
TF1 = 6 //6-minute TF
D6 = 9999999
DRAWPOINT(barindex+4, 0.94, 2) COLOURED(204,0,0)
//———————————————————————ELSIF menordistancia1 = D7 and c7 THEN
TF1 = 7 //7-minute TF
D7 = 9999999
DRAWPOINT(barindex+4, 0.45, 2) COLOURED(204,0,0)
ELSIF menordistancia1 = D7 THEN
TF1 = 7 //7-minute TF
D7 = 9999999
DRAWPOINT(barindex+4, -0.24, 2) COLOURED(204,0,0)
//———————————————————————ENDIF
//
menordistancia2 = min(D1,min(D2,min(D3,min(D4,min(D5,min(D6,D7))))))
IF menordistancia2 = D1 and c1 THEN
TF2 = 1 //1-minute TF
D1 = 9999999
DRAWPOINT(barindex+4, 7.29, 2) COLOURED(204,0,0)ELSIF menordistancia2 = D1 THEN
TF2 = 1 //1-minute TF
D1 = 9999999
DRAWPOINT(barindex+4, 6.68, 2) COLOURED(204,0,0)
//———————————————————————ELSIF menordistancia2 = D2 and c2 THEN
TF2 = 2 //2-minute TF
D2 = 9999999
DRAWPOINT(barindex+4, 6.18, 2) COLOURED(204,0,0)
ELSIF menordistancia2 = D2 THEN
TF2 = 2 //2-minute TF
D2 = 9999999
DRAWPOINT(barindex+4, 5.52, 2) COLOURED(204,0,0)
//———————————————————————ELSIF menordistancia2 = D3 and c3 THEN
TF2 = 3 //3-minute TF
D3 = 9999999
DRAWPOINT(barindex+4, 4.94, 2) COLOURED(204,0,0)ELSIF menordistancia2 = D3 THEN
TF2 = 3 //3-minute TF
D3 = 9999999
DRAWPOINT(barindex+4, 4.35, 2) COLOURED(204,0,0)
//———————————————————————ELSIF menordistancia2 = D4 and c4 THEN
TF2 = 4 //4-minute TF
D4 = 9999999
DRAWPOINT(barindex+4, 3.85, 2) COLOURED(204,0,0)
ELSIF menordistancia2 = D4 THEN
TF2 = 4 //4-minute TF
D4 = 9999999
DRAWPOINT(barindex+4, 3.20, 2) COLOURED(204,0,0)
//———————————————————————ELSIF menordistancia2 = D5 and c5 THEN
TF2 = 5 //5-minute TF
D5 = 9999999
DRAWPOINT(barindex+4, 2.70, 2) COLOURED(204,0,0)
ELSIF menordistancia2 = D5 THEN
TF2 = 5 //5-minute TF
D5 = 9999999
DRAWPOINT(barindex+4, 2.02, 2) COLOURED(204,0,0)
//———————————————————————ELSIF menordistancia2 = D6 and c6 THEN
TF2 = 6 //6-minute TF
D6 = 9999999
DRAWPOINT(barindex+4, 1.56, 2) COLOURED(204,0,0)
ELSIF menordistancia2 = D6 THEN
TF2 = 6 //6-minute TF
D6 = 9999999
DRAWPOINT(barindex+4, 0.94, 2) COLOURED(204,0,0)
//———————————————————————ELSIF menordistancia2 = D7 and c7 THEN
TF2 = 7 //7-minute TF
D7 = 9999999
DRAWPOINT(barindex+4, 0.45, 2) COLOURED(204,0,0)
ELSIF menordistancia2 = D7 THEN
TF2 = 7 //7-minute TF
D7 = 9999999
DRAWPOINT(barindex+4, -0.24, 2) COLOURED(204,0,0)
//———————————————————————ENDIF
//
menordistancia3 = min(D1,min(D2,min(D3,min(D4,min(D5,min(D6,D7))))))
IF menordistancia3 = D1 and c1 THEN
TF3 = 1 //1-minute TF
D1 = 9999999
DRAWPOINT(barindex+4, 7.29, 2) COLOURED(204,0,0)
ELSIF menordistancia3 = D1 THEN
TF3 = 1 //1-minute TF
D1 = 9999999
DRAWPOINT(barindex+4, 6.68, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia3 = D2 and c2 THEN
TF3 = 2 //2-minute TF
D2 = 9999999
DRAWPOINT(barindex+4, 6.18, 2) COLOURED(204,0,0)
ELSIF menordistancia3 = D2 THEN
TF3 = 2 //2-minute TF
D2 = 9999999
DRAWPOINT(barindex+4, 5.52, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia3 = D3 and c3 THEN
TF3 = 3 //3-minute TF
D3 = 9999999
DRAWPOINT(barindex+4, 4.94, 2) COLOURED(204,0,0)
ELSIF menordistancia3 = D3 THEN
TF3 = 3 //3-minute TF
D3 = 9999999
DRAWPOINT(barindex+4, 4.35, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia3 = D4 and c4 THEN
TF3 = 4 //4-minute TF
D4 = 9999999
DRAWPOINT(barindex+4, 3.85, 2) COLOURED(204,0,0)
ELSIF menordistancia3 = D4 THEN
TF3 = 4 //4-minute TF
D4 = 9999999
DRAWPOINT(barindex+4, 3.20, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia3 = D5 and c5 THEN
TF3 = 5 //5-minute TF
D5 = 9999999
DRAWPOINT(barindex+4, 2.70, 2) COLOURED(204,0,0)
ELSIF menordistancia3 = D5 THEN
TF3 = 5 //5-minute TF
D5 = 9999999
DRAWPOINT(barindex+4, 2.02, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia3 = D6 and c6 THEN
TF3 = 6 //6-minute TF
D6 = 9999999
DRAWPOINT(barindex+4, 1.56, 2) COLOURED(204,0,0)
ELSIF menordistancia3 = D6 THEN
TF3 = 6 //6-minute TF
D6 = 9999999
DRAWPOINT(barindex+4, 0.94, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia3 = D7 and c7 THEN
TF3 = 7 //7-minute TF
D7 = 9999999
DRAWPOINT(barindex+4, 0.45, 2) COLOURED(204,0,0)
ELSIF menordistancia3 = D7 THEN
TF3 = 7 //7-minute TF
D7 = 9999999
DRAWPOINT(barindex+4, -0.24, 2) COLOURED(204,0,0)
//———————————————————————
ENDIF
//
menordistancia4 = min(D1,min(D2,min(D3,min(D4,min(D5,min(D6,D7))))))
IF menordistancia4 = D1 and c1 THEN
TF4 = 1 //1-minute TF
D1 = 9999999
DRAWPOINT(barindex+4, 7.29, 2) COLOURED(204,0,0)
ELSIF menordistancia4 = D1 THEN
TF4 = 1 //1-minute TF
D1 = 9999999
DRAWPOINT(barindex+4, 6.68, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia4 = D2 and c2 THEN
TF4 = 2 //2-minute TF
D2 = 9999999
DRAWPOINT(barindex+4, 6.18, 2) COLOURED(204,0,0)
ELSIF menordistancia4 = D2 THEN
TF4 = 2 //2-minute TF
D2 = 9999999
DRAWPOINT(barindex+4, 5.52, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia4 = D3 and c3 THEN
TF4 = 3 //3-minute TF
D3 = 9999999
DRAWPOINT(barindex+4, 4.94, 2) COLOURED(204,0,0)
ELSIF menordistancia4 = D3 THEN
TF4 = 3 //3-minute TF
D3 = 9999999
DRAWPOINT(barindex+4, 4.35, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia4 = D4 and c4 THEN
TF4 = 4 //4-minute TF
D4 = 9999999
DRAWPOINT(barindex+4, 3.85, 2) COLOURED(204,0,0)
ELSIF menordistancia4 = D4 THEN
TF4 = 4 //4-minute TF
D4 = 9999999
DRAWPOINT(barindex+4, 3.20, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia4 = D5 and c5 THEN
TF4 = 5 //5-minute TF
D5 = 9999999
DRAWPOINT(barindex+4, 2.70, 2) COLOURED(204,0,0)
ELSIF menordistancia4 = D5 THEN
TF4 = 5 //5-minute TF
D5 = 9999999
DRAWPOINT(barindex+4, 2.02, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia4 = D6 and c6 THEN
TF4 = 6 //6-minute TF
D6 = 9999999
DRAWPOINT(barindex+4, 1.56, 2) COLOURED(204,0,0)
ELSIF menordistancia4 = D6 THEN
TF4 = 6 //6-minute TF
D6 = 9999999
DRAWPOINT(barindex+4, 0.94, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia4 = D7 and c7 THEN
TF4 = 7 //7-minute TF
D7 = 9999999
DRAWPOINT(barindex+4, 0.45, 2) COLOURED(204,0,0)
ELSIF menordistancia4 = D7 THEN
TF4 = 7 //7-minute TF
D7 = 9999999
DRAWPOINT(barindex+4, -0.24, 2) COLOURED(204,0,0)
//———————————————————————
ENDIF
//
menordistancia5 = min(D1,min(D2,min(D3,min(D4,min(D5,min(D6,D7))))))
IF menordistancia5 = D1 and c1 THEN
TF5 = 1 //1-minute TF
D1 = 9999999
DRAWPOINT(barindex+4, 7.29, 2) COLOURED(204,0,0)
ELSIF menordistancia5 = D1 THEN
TF5 = 1 //1-minute TF
D1 = 9999999
DRAWPOINT(barindex+4, 6.68, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia5 = D2 and c2 THEN
TF5 = 2 //2-minute TF
D2 = 9999999
DRAWPOINT(barindex+4, 6.18, 2) COLOURED(204,0,0)
ELSIF menordistancia5 = D2 THEN
TF5 = 2 //2-minute TF
D2 = 9999999
DRAWPOINT(barindex+4, 5.52, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia5 = D3 and c3 THEN
TF5 = 3 //3-minute TF
D3 = 9999999
DRAWPOINT(barindex+4, 4.94, 2) COLOURED(204,0,0)
ELSIF menordistancia5 = D3 THEN
TF5 = 3 //3-minute TF
D3 = 9999999
DRAWPOINT(barindex+4, 4.35, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia5 = D4 and c4 THEN
TF5 = 4 //4-minute TF
D4 = 9999999
DRAWPOINT(barindex+4, 3.85, 2) COLOURED(204,0,0)
ELSIF menordistancia5 = D4 THEN
TF5 = 4 //4-minute TF
D4 = 9999999
DRAWPOINT(barindex+4, 3.20, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia5 = D5 and c5 THEN
TF5 = 5 //5-minute TF
D5 = 9999999
DRAWPOINT(barindex+4, 2.70, 2) COLOURED(204,0,0)
ELSIF menordistancia5 = D5 THEN
TF5 = 5 //5-minute TF
D5 = 9999999
DRAWPOINT(barindex+4, 2.02, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia5 = D6 and c6 THEN
TF5 = 6 //6-minute TF
D6 = 9999999
DRAWPOINT(barindex+4, 1.56, 2) COLOURED(204,0,0)
ELSIF menordistancia5 = D6 THEN
TF5 = 6 //6-minute TF
D6 = 9999999
DRAWPOINT(barindex+4, 0.94, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia5 = D7 and c7 THEN
TF5 = 7 //7-minute TF
D7 = 9999999
DRAWPOINT(barindex+4, 0.45, 2) COLOURED(204,0,0)
ELSIF menordistancia5 = D7 THEN
TF5 = 7 //7-minute TF
D7 = 9999999
DRAWPOINT(barindex+4, -0.24, 2) COLOURED(204,0,0)
//———————————————————————
ENDIF
//
menordistancia6 = min(D1,min(D2,min(D3,min(D4,min(D5,min(D6,D7))))))
IF menordistancia6 = D1 and c1 THEN
TF6 = 1 //1-minute TF
D1 = 9999999
DRAWPOINT(barindex+4, 7.29, 2) COLOURED(204,0,0)
ELSIF menordistancia6 = D1 THEN
TF6 = 1 //1-minute TF
D1 = 9999999
DRAWPOINT(barindex+4, 6.68, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia6 = D2 and c2 THEN
TF6 = 2 //2-minute TF
D2 = 9999999
DRAWPOINT(barindex+4, 6.18, 2) COLOURED(204,0,0)
ELSIF menordistancia6 = D2 THEN
TF6 = 2 //2-minute TF
D2 = 9999999
DRAWPOINT(barindex+4, 5.52, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia6 = D3 and c3 THEN
TF6 = 3 //3-minute TF
D3 = 9999999
DRAWPOINT(barindex+4, 4.94, 2) COLOURED(204,0,0)
ELSIF menordistancia6 = D3 THEN
TF6 = 3 //3-minute TF
D3 = 9999999
DRAWPOINT(barindex+4, 4.35, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia6 = D4 and c4 THEN
TF6 = 4 //4-minute TF
D4 = 9999999
DRAWPOINT(barindex+4, 3.85, 2) COLOURED(204,0,0)
ELSIF menordistancia6 = D4 THEN
TF6 = 4 //4-minute TF
D4 = 9999999
DRAWPOINT(barindex+4, 3.20, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia6 = D5 and c5 THEN
TF6 = 5 //5-minute TF
D5 = 9999999
DRAWPOINT(barindex+4, 2.70, 2) COLOURED(204,0,0)
ELSIF menordistancia6 = D5 THEN
TF6 = 5 //5-minute TF
D5 = 9999999
DRAWPOINT(barindex+4, 2.02, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia6 = D6 and c6 THEN
TF6 = 6 //6-minute TF
D6 = 9999999
DRAWPOINT(barindex+4, 1.56, 2) COLOURED(204,0,0)
ELSIF menordistancia6 = D6 THEN
TF6 = 6 //6-minute TF
D6 = 9999999
DRAWPOINT(barindex+4, 0.94, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia6 = D7 and c7 THEN
TF6 = 7 //7-minute TF
D7 = 9999999
DRAWPOINT(barindex+4, 0.45, 2) COLOURED(204,0,0)
ELSIF menordistancia6 = D7 THEN
TF6 = 7 //7-minute TF
D7 = 9999999
DRAWPOINT(barindex+4, -0.24, 2) COLOURED(204,0,0)
//———————————————————————
ENDIF
//
menordistancia7 = min(D1,min(D2,min(D3,min(D4,min(D5,min(D6,D7))))))
IF menordistancia7 = D1 and c1 THEN
TF7 = 1 //1-minute TF
D1 = 9999999
DRAWPOINT(barindex+4, 7.29, 2) COLOURED(204,0,0)
ELSIF menordistancia7 = D1 THEN
TF7 = 1 //1-minute TF
D1 = 9999999
DRAWPOINT(barindex+4, 6.68, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia7 = D2 and c2 THEN
TF7 = 2 //2-minute TF
D2 = 9999999
DRAWPOINT(barindex+4, 6.18, 2) COLOURED(204,0,0)
ELSIF menordistancia7 = D2 THEN
TF7 = 2 //2-minute TF
D2 = 9999999
DRAWPOINT(barindex+4, 5.52, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia7 = D3 and c3 THEN
TF7 = 3 //3-minute TF
D3 = 9999999
DRAWPOINT(barindex+4, 4.94, 2) COLOURED(204,0,0)
ELSIF menordistancia7 = D3 THEN
TF7 = 3 //3-minute TF
D3 = 9999999
DRAWPOINT(barindex+4, 4.35, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia7 = D4 and c4 THEN
TF7 = 4 //4-minute TF
D4 = 9999999
DRAWPOINT(barindex+4, 3.85, 2) COLOURED(204,0,0)
ELSIF menordistancia7 = D4 THEN
TF7 = 4 //4-minute TF
D4 = 9999999
DRAWPOINT(barindex+4, 3.20, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia7 = D5 and c5 THEN
TF7 = 5 //5-minute TF
D5 = 9999999
DRAWPOINT(barindex+4, 2.70, 2) COLOURED(204,0,0)
ELSIF menordistancia7 = D5 THEN
TF7 = 5 //5-minute TF
D5 = 9999999
DRAWPOINT(barindex+4, 2.02, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia7 = D6 and c6 THEN
TF7 = 6 //6-minute TF
D6 = 9999999
DRAWPOINT(barindex+4, 1.56, 2) COLOURED(204,0,0)
ELSIF menordistancia7 = D6 THEN
TF7 = 6 //6-minute TF
D6 = 9999999
DRAWPOINT(barindex+4, 0.94, 2) COLOURED(204,0,0)
//———————————————————————
ELSIF menordistancia7 = D7 and c7 THEN
TF7 = 7 //7-minute TF
D7 = 9999999
DRAWPOINT(barindex+4, 0.45, 2) COLOURED(204,0,0)
ELSIF menordistancia3 = D7 THEN
TF7 = 7 //7-minute TF
D7 = 9999999
DRAWPOINT(barindex+4, -0.24, 2) COLOURED(204,0,0)
//———————————————————————
ENDIFDrawText(“#TF1#”,BarIndex,7.0,Dialog,Bold,20)
DrawText(“#TF2#”,BarIndex,5.75,Dialog,Bold,20)
DrawText(“#TF3#”,BarIndex,4.60,Dialog,Bold,20)
DrawText(“#TF4#”,BarIndex,3.45,Dialog,Bold,20)
DrawText(“#TF5#”,BarIndex,2.30,Dialog,Bold,20)
DrawText(“#TF6#”,BarIndex,1.15,Dialog,Bold,20)
DrawText(“#TF7#”,BarIndex,0.0,Dialog,Bold,20)DrawText(“#menordistancia1#”,BarIndex+ 2,7.0,Dialog,Bold,20)
DrawText(“#menordistancia2#”,BarIndex+ 2,5.75,Dialog,Bold,20)
DrawText(“#menordistancia3#”,BarIndex+ 2,4.60,Dialog,Bold,20)
DrawText(“#menordistancia4#”,BarIndex+ 2,3.45,Dialog,Bold,20)
DrawText(“#menordistancia5#”,BarIndex+ 2,2.30,Dialog,Bold,20)
DrawText(“#menordistancia6#”,BarIndex+ 2,1.15,Dialog,Bold,20)
DrawText(“#menordistancia7#”,BarIndex+ 2,0.0,Dialog,Bold,20)//——
DRAWSEGMENT(barindex-1, 6.4, barindex+5,6.4) //linea hotizontal 1
DRAWSEGMENT(barindex-1, 5.25, barindex+5,5.25) //linea hotizontal 2
DRAWSEGMENT(barindex-1, 4.10, barindex+5,4.10) //linea hotizontal 3
DRAWSEGMENT(barindex-1, 2.95, barindex+5,2.95) //linea hotizontal 4
DRAWSEGMENT(barindex-1, 1.80, barindex+5,1.80) //linea hotizontal 5
DRAWSEGMENT(barindex-1, 0.71, barindex+5,0.71) //linea hotizontal 6DRAWSEGMENT(barindex+1, -0.5, barindex+1, 7.5) //primera linea vertical
DRAWSEGMENT(barindex+3, -0.5, barindex+3, 7.5) // segunda linea verticalDRAWRECTANGLE(barindex-1, 7.5, barindex+5,-0.5)//rectangulo
DrawText(“PRECIO”,BarIndex+4,7.0,Dialog,Bold,10)COLOURED(0,0,0)
DrawText(“PRECIO”,BarIndex+4,5.85,Dialog,Bold,10)COLOURED(0,0,0)
DrawText(“PRECIO”,BarIndex+4,4.66,Dialog,Bold,10)COLOURED(0,0,0)
DrawText(“PRECIO”,BarIndex+4,3.55,Dialog,Bold,10)COLOURED(0,0,0)
DrawText(“PRECIO”,BarIndex+4,2.39,Dialog,Bold,10)COLOURED(0,0,0)
DrawText(“PRECIO”,BarIndex+4,1.29,Dialog,Bold,10)COLOURED(0,0,0)
DrawText(“PRECIO”,BarIndex+4,0.12,Dialog,Bold,10)COLOURED(0,0,0)return
Buenas ya he modificado esa parte, las distancias en porcentajes y la ordenacion me sale bien pero cuando añado las condiciones c1,c2,c3,c4,c5,c6 o c7 me hacen el drawpoint pero no me lo hace correcto ya que yo quiero que si por ejemplo esta la temporalidad de 4 la primera ya que es el porcentaje menor y ema20 esta debajo del precio me señalize con drawpoint por debajo de la palabra “precio” y asi correlativamente en las 7 temporalidades. Lo que pasa es que la colocacion del drawpoin y la condicion no me sale correctamente no se si es por un fallo del codigo mio o por que. Un saludo
06/21/2023 at 11:34 PM #216581¿Dónde quieres que se impriman los puntos rojos?
06/23/2023 at 7:33 AM #216644Buenos dias te adjunto la foto para que me entiendas dependiendo de cada temporalidad y donde este situado ema20 se colorea un punto encima o debajo de la palabra “precio” en la temporalidad que le corresponda, en la imagen esta 1mn la primera y ema20 por debajo del precio en el grafico de 1mn pues un punto rojo debajo de la palabra “precio”, la segunda temporalidad sale 7m y esta el precio por encima de ema20 pues el punto debajo de la palabra “precio” y asi correlativamente y que vayan con las temporalidades. Un saludo espero que lo entiendas ahora
06/29/2023 at 10:15 AM #216971Buenos días no se si alguien podría ayudarme con ente problema ya que no consigo solucionarlo. Un saludo
06/30/2023 at 1:00 AM #217018Agregue estas líneas después de la línea 56 (ver foto Pic1):
1234567p1 = ((c1 <> 0) * 1) + ((c1 = 0) * -1)p2 = ((c2 <> 0) * 1) + ((c2 = 0) * -1)p3 = ((c3 <> 0) * 1) + ((c3 = 0) * -1)p4 = ((c4 <> 0) * 1) + ((c4 = 0) * -1)pc = ((c5 <> 0) * 1) + ((c5 = 0) * -1)p6 = ((c6 <> 0) * 1) + ((c6 = 0) * -1)p7 = ((c7 <> 0) * 1) + ((c7 = 0) * -1)Luego hay que modificar todas las lineas donde hay DRAWPOINT, como hice yo (ver foto Pic2). Deberá experimentar para encontrar los valores correctos por encima o por debajo del PRECIO.
06/30/2023 at 4:01 PM #217088Buenas Roberto lo he probado y no hace la función correcta ya que no se organiza con las temporalidades te adjunto foto para que puedas comprobarlo. Un saludo
06/30/2023 at 4:59 PM #21709107/01/2023 at 6:27 PM #217135Publica el código que modificaste.
07/03/2023 at 9:02 AM #217163Buenos días Roberto, te agrego el código a ver si esta correcto con lo que me enviaste, ya que yo no logro encontrar el fallo ni la solución. Un saludo
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203defparam drawonlastbaronly = trueTIMEFRAME(1mn)ema201 = ExponentialAverage[20](close)precio1 = closedistancia1 = abs((ema202/precio2)-1)*100c1= ExponentialAverage[20](close) > closeTIMEFRAME(2mn)ema202 = ExponentialAverage[20](close)precio2 = closedistancia2 = abs((ema202/precio2)-1)*100c2= ExponentialAverage[20](close) > closeTIMEFRAME(3mn)ema203 = ExponentialAverage[20](close)precio3 = closedistancia3 = abs((ema203/precio3)-1)*100c3= ExponentialAverage[20](close) > closeTIMEFRAME(4mn)ema204 = ExponentialAverage[20](close)precio4 = closedistancia4 = abs((ema204/precio4)-1)*100c4= ExponentialAverage[20](close) > closeTIMEFRAME(5mn)ema205 = ExponentialAverage[20](close)precio5 = closedistancia5 = abs((ema205/precio5)-1)*100c5= ExponentialAverage[20](close) > closeTIMEFRAME(6mn)ema206 = ExponentialAverage[20](close)precio6 = closedistancia6 = abs((ema206/precio6)-1)*100c6= ExponentialAverage[20](close) > closeTIMEFRAME(7mn)ema207 = ExponentialAverage[20](close)precio7 = closedistancia7 = abs((ema207/precio7)-1)*100c7= ExponentialAverage[20](close) > closeTIMEFRAME(default)menordistancia = min(distancia1,min(distancia2,min(distancia3,min(distancia4,min(distancia5,min(distancia6,distancia7))))))TF1 = 0TF2 = 0TF3 = 0TF4 = 0TF5 = 0TF6 = 0TF7 = 0//D1 = distancia1D2 = distancia2D3 = distancia3D4 = distancia4D5 = distancia5D6 = distancia6D7 = distancia7p1 = ((c1 <> 0) * 1) + ((c1 = 0) * -1)p2 = ((c2 <> 0) * 1) + ((c2 = 0) * -1)p3 = ((c3 <> 0) * 1) + ((c3 = 0) * -1)p4 = ((c4 <> 0) * 1) + ((c4 = 0) * -1)pc = ((c5 <> 0) * 1) + ((c5 = 0) * -1)p6 = ((c6 <> 0) * 1) + ((c6 = 0) * -1)p7 = ((c7 <> 0) * 1) + ((c7 = 0) * -1)//menordistancia1 = min(D1,min(D2,min(D3,min(D4,min(D5,min(D6,D7))))))IF menordistancia1 = D1 and c1 THENTF1 = 1 //1-minute TFD1 = 9999999IF c1 = 1 thenDRAWPOINT(barindex+4, 7.29, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 6.64, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia1 = D1 THENTF1 = 1 //1-minute TFD1 = 9999999IF c1 = 1 thenDRAWPOINT(barindex+4, 7.29, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 6.64, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia1 = D2 and c2 THENTF1 = 2 //2-minute TFD2 = 9999999IF c2 = 1 THENDRAWPOINT(barindex+4, 6.14, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 5.47, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia1 = D2 THENTF1 = 2 //2-minute TFD2 = 9999999IF c2 = 1 THENDRAWPOINT(barindex+4, 6.14, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 5.47, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia1 = D3 and c3 THENTF1 = 3 //3-minute TFD3 = 9999999IF c3 = 1 THENDRAWPOINT(barindex+4, 4.94, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 4.35, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia1 = D3 THENTF1 = 3 //3-minute TFD3 = 9999999IF c3 = 1 THENDRAWPOINT(barindex+4, 4.94, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 4.35, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia1 = D4 and c4 THENTF1 = 4 //4-minute TFD4 = 9999999IF c4 = 1 THENDRAWPOINT(barindex+4, 3.85, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 3.20, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia1 = D4 THENTF1 = 4 //4-minute TFD4 = 9999999IF c4 = 1 THENDRAWPOINT(barindex+4, 3.85, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 3.20, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia1 = D5 and c5 THENTF1 = 5 //5-minute TFD5 = 9999999IF c5 = 1 THENDRAWPOINT(barindex+4, 2.70, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 2.02, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia1 = D5 THENTF1 = 5 //5-minute TFD5 = 9999999IF c5 = 1 THENDRAWPOINT(barindex+4, 2.70, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 2.02, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia1 = D6 and c6 THENTF1 = 6 //6-minute TFD6 = 9999999IF c6 = 1 THENDRAWPOINT(barindex+4, 1.56, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 0.94, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia1 = D6 THENTF1 = 6 //6-minute TFD6 = 9999999IF c6 = 1 THENDRAWPOINT(barindex+4, 1.56, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 0.94, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia1 = D7 and c7 THENTF1 = 7 //7-minute TFD7 = 9999999IF c7 = 1 THENDRAWPOINT(barindex+4, 0.45, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, -0.24, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia1 = D7 THENTF1 = 7 //7-minute TFD7 = 9999999IF c7 = 1 THENDRAWPOINT(barindex+4, 0.45, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, -0.24, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ENDIF////menordistancia2 = min(D1,min(D2,min(D3,min(D4,min(D5,min(D6,D7))))))IF menordistancia2 = D1 and c1 THENTF2 = 1 //1-minute TFD1 = 9999999IF c1 = 1 thenDRAWPOINT(barindex+4, 7.29, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 6.64, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia2 = D1 THENTF2 = 1 //1-minute TFD1 = 9999999IF c1 = 1 thenDRAWPOINT(barindex+4, 7.29, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 6.64, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia2 = D2 and c2 THENTF2 = 2 //2-minute TFD2 = 9999999IF c2 = 1 THENDRAWPOINT(barindex+4, 6.14, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 5.47, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia2 = D2 THENTF2 = 2 //2-minute TFD2 = 9999999IF c2 = 1 THENDRAWPOINT(barindex+4, 6.14, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 5.47, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia2 = D3 and c3 THENTF2 = 3 //3-minute TFD3 = 9999999IF c3 = 1 THENDRAWPOINT(barindex+4, 4.94, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 4.35, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia2 = D3 THENTF2 = 3 //3-minute TFD3 = 9999999IF c3 = 1 THENDRAWPOINT(barindex+4, 4.94, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 4.35, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia2 = D4 and c4 THENTF2 = 4 //4-minute TFD4 = 9999999IF c4 = 1 THENDRAWPOINT(barindex+4, 3.85, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 3.20, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia2 = D4 THENTF2 = 4 //4-minute TFD4 = 9999999IF c4 = 1 THENDRAWPOINT(barindex+4, 3.85, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 3.20, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia2 = D5 and c5 THENTF2 = 5 //5-minute TFD5 = 9999999IF c5 = 1 THENDRAWPOINT(barindex+4, 2.70, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 2.02, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia2 = D5 THENTF2 = 5 //5-minute TFD5 = 9999999IF c5 = 1 THENDRAWPOINT(barindex+4, 2.70, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 2.02, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia2 = D6 and c6 THENTF2 = 6 //6-minute TFD6 = 9999999IF c6 = 1 THENDRAWPOINT(barindex+4, 1.56, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 0.94, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia2 = D6 THENTF2 = 6 //6-minute TFD6 = 9999999IF c6 = 1 THENDRAWPOINT(barindex+4, 1.56, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 0.94, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia2 = D7 and c7 THENTF2 = 7 //7-minute TFD7 = 9999999IF c7 = 1 THENDRAWPOINT(barindex+4, 0.45, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, -0.24, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia2 = D7 THENTF2 = 7 //7-minute TFD7 = 9999999IF c7 = 1 THENDRAWPOINT(barindex+4, 0.45, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, -0.24, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ENDIF////menordistancia3 = min(D1,min(D2,min(D3,min(D4,min(D5,min(D6,D7))))))IF menordistancia3 = D1 and c1 THENTF3 = 1 //1-minute TFD1 = 9999999IF c1 = 1 thenDRAWPOINT(barindex+4, 7.29, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 6.64, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia3 = D1 THENTF3 = 1 //1-minute TFD1 = 9999999IF c1 = 1 thenDRAWPOINT(barindex+4, 7.29, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 6.64, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia3 = D2 and c2 THENTF3 = 2 //2-minute TFD2 = 9999999IF c2 = 1 THENDRAWPOINT(barindex+4, 6.14, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 5.47, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia3 = D2 THENTF3 = 2 //2-minute TFD2 = 9999999IF c2 = 1 THENDRAWPOINT(barindex+4, 6.14, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 5.47, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia3 = D3 and c3 THENTF3 = 3 //3-minute TFD3 = 9999999IF c3 = 1 THENDRAWPOINT(barindex+4, 4.94, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 4.35, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia3 = D3 THENTF3 = 3 //3-minute TFD3 = 9999999IF c3 = 1 THENDRAWPOINT(barindex+4, 4.94, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 4.35, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia3 = D4 and c4 THENTF3 = 4 //4-minute TFD4 = 9999999IF c4 = 1 THENDRAWPOINT(barindex+4, 3.85, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 3.20, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia3 = D4 THENTF3 = 4 //4-minute TFD4 = 9999999IF c4 = 1 THENDRAWPOINT(barindex+4, 3.85, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 3.20, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia3 = D5 and c5 THENTF3 = 5 //5-minute TFD5 = 9999999IF c5 = 1 THENDRAWPOINT(barindex+4, 2.70, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 2.02, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia3 = D5 THENTF3 = 5 //5-minute TFD5 = 9999999IF c5 = 1 THENDRAWPOINT(barindex+4, 2.70, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 2.02, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia3 = D6 and c6 THENTF3 = 6 //6-minute TFD6 = 9999999IF c6 = 1 THENDRAWPOINT(barindex+4, 1.56, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 0.94, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia3 = D6 THENTF3 = 6 //6-minute TFD6 = 9999999IF c6 = 1 THENDRAWPOINT(barindex+4, 1.56, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 0.94, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia3 = D7 and c7 THENTF3 = 7 //7-minute TFD7 = 9999999IF c7 = 1 THENDRAWPOINT(barindex+4, 0.45, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, -0.24, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia3 = D7 THENTF3 = 7 //7-minute TFD7 = 9999999IF c7 = 1 THENDRAWPOINT(barindex+4, 0.45, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, -0.24, 2) COLOURED(204,0,0)ENDIF//-----------------------------------------------------------------------------FINENDIF//----------------------------------------------------------------------------//menordistancia4 = min(D1,min(D2,min(D3,min(D4,min(D5,min(D6,D7))))))IF menordistancia4 = D1 and c1 THENTF4 = 1 //1-minute TFD1 = 9999999IF c1 = 1 thenDRAWPOINT(barindex+4, 7.29, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 6.64, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia4 = D1 THENTF4 = 1 //1-minute TFD1 = 9999999IF c1 = 1 thenDRAWPOINT(barindex+4, 7.29, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 6.64, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia4 = D2 and c2 THENTF4 = 2 //2-minute TFD2 = 9999999IF c2 = 1 THENDRAWPOINT(barindex+4, 6.14, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 5.47, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia4 = D2 THENTF4 = 2 //2-minute TFD2 = 9999999IF c2 = 1 THENDRAWPOINT(barindex+4, 6.14, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 5.47, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia4 = D3 and c3 THENTF4 = 3 //3-minute TFD3 = 9999999IF c3 = 1 THENDRAWPOINT(barindex+4, 4.94, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 4.35, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia4 = D3 THENTF4 = 3 //3-minute TFD3 = 9999999IF c3 = 1 THENDRAWPOINT(barindex+4, 4.94, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 4.35, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia4 = D4 and c4 THENTF4 = 4 //4-minute TFD4 = 9999999IF c4 = 1 THENDRAWPOINT(barindex+4, 3.85, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 3.20, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia4 = D4 THENTF4 = 4 //4-minute TFD4 = 9999999IF c4 = 1 THENDRAWPOINT(barindex+4, 3.85, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 3.20, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia4 = D5 and c5 THENTF4 = 5 //5-minute TFD5 = 9999999IF c5 = 1 THENDRAWPOINT(barindex+4, 2.70, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 2.02, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia4 = D5 THENTF4 = 5 //5-minute TFD5 = 9999999IF c5 = 1 THENDRAWPOINT(barindex+4, 2.70, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 2.02, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia4 = D6 and c6 THENTF4 = 6 //6-minute TFD6 = 9999999IF c6 = 1 THENDRAWPOINT(barindex+4, 1.56, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 0.94, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia4 = D6 THENTF4 = 6 //6-minute TFD6 = 9999999IF c6 = 1 THENDRAWPOINT(barindex+4, 1.56, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 0.94, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia4 = D7 and c7 THENTF4 = 7 //7-minute TFD7 = 9999999IF c7 = 1 THENDRAWPOINT(barindex+4, 0.45, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, -0.24, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia4 = D7 THENTF1 = 7 //7-minute TFD7 = 9999999IF c7 = 1 THENDRAWPOINT(barindex+4, 0.45, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, -0.24, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ENDIF//------------------------------------------------------------------------------FIN//menordistancia5 = min(D1,min(D2,min(D3,min(D4,min(D5,min(D6,D7))))))IF menordistancia5 = D1 and c1 THENTF5 = 1 //1-minute TFD1 = 9999999IF c1 = 1 thenDRAWPOINT(barindex+4, 7.29, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 6.64, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia5 = D1 THENTF5 = 1 //1-minute TFD1 = 9999999IF c1 = 1 thenDRAWPOINT(barindex+4, 7.29, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 6.64, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia5 = D2 and c2 THENTF5 = 2 //2-minute TFD2 = 9999999IF c2 = 1 THENDRAWPOINT(barindex+4, 6.14, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 5.47, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia5 = D2 THENTF5 = 2 //2-minute TFD2 = 9999999IF c2 = 1 THENDRAWPOINT(barindex+4, 6.14, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 5.47, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia5 = D3 and c3 THENTF5 = 3 //3-minute TFD3 = 9999999IF c3 = 1 THENDRAWPOINT(barindex+4, 4.94, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 4.35, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia5 = D3 THENTF5 = 3 //3-minute TFD3 = 9999999IF c3 = 1 THENDRAWPOINT(barindex+4, 4.94, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 4.35, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia5 = D4 and c4 THENTF5 = 4 //4-minute TFD4 = 9999999IF c4 = 1 THENDRAWPOINT(barindex+4, 3.85, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 3.20, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia5 = D4 THENTF5 = 4 //4-minute TFD4 = 9999999IF c4 = 1 THENDRAWPOINT(barindex+4, 3.85, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 3.20, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia5 = D5 and c5 THENTF5 = 5 //5-minute TFD5 = 9999999IF c5 = 1 THENDRAWPOINT(barindex+4, 2.70, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 2.02, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia5 = D5 THENTF5 = 5 //5-minute TFD5 = 9999999IF c5 = 1 THENDRAWPOINT(barindex+4, 2.70, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 2.02, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia5 = D6 and c6 THENTF5 = 6 //6-minute TFD6 = 9999999IF c6 = 1 THENDRAWPOINT(barindex+4, 1.56, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 0.94, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia5 = D6 THENTF5 = 6 //6-minute TFD6 = 9999999IF c6 = 1 THENDRAWPOINT(barindex+4, 1.56, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 0.94, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia5 = D7 and c7 THENTF5 = 7 //7-minute TFD7 = 9999999IF c7 = 1 THENDRAWPOINT(barindex+4, 0.45, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, -0.24, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia5 = D7 THENTF5 = 7 //7-minute TFD7 = 9999999IF c7 = 1 THENDRAWPOINT(barindex+4, 0.45, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, -0.24, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ENDIF//------------------------------------------------------------------------------FIN//menordistancia6 = min(D1,min(D2,min(D3,min(D4,min(D5,min(D6,D7))))))IF menordistancia6 = D1 and c1 THENTF6 = 1 //1-minute TFD1 = 9999999IF c1 = 1 thenDRAWPOINT(barindex+4, 7.29, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 6.64, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia6 = D1 THENTF6 = 1 //1-minute TFD1 = 9999999IF c1 = 1 thenDRAWPOINT(barindex+4, 7.29, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 6.64, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia6 = D2 and c2 THENTF6 = 2 //2-minute TFD2 = 9999999IF c2 = 1 THENDRAWPOINT(barindex+4, 6.14, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 5.47, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia6 = D2 THENTF6 = 2 //2-minute TFD2 = 9999999IF c2 = 1 THENDRAWPOINT(barindex+4, 6.14, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 5.47, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia6 = D3 and c3 THENTF6 = 3 //3-minute TFD3 = 9999999IF c3 = 1 THENDRAWPOINT(barindex+4, 4.94, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 4.35, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia6 = D3 THENTF6 = 3 //3-minute TFD3 = 9999999IF c3 = 1 THENDRAWPOINT(barindex+4, 4.94, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 4.35, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia6 = D4 and c4 THENTF6 = 4 //4-minute TFD4 = 9999999IF c4 = 1 THENDRAWPOINT(barindex+4, 3.85, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 3.20, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia6 = D4 THENTF6 = 4 //4-minute TFD4 = 9999999IF c4 = 1 THENDRAWPOINT(barindex+4, 3.85, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 3.20, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia6 = D5 and c5 THENTF6 = 5 //5-minute TFD5 = 9999999IF c5 = 1 THENDRAWPOINT(barindex+4, 2.70, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 2.02, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia6 = D5 THENTF6 = 5 //5-minute TFD5 = 9999999IF c5 = 1 THENDRAWPOINT(barindex+4, 2.70, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 2.02, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia6 = D6 and c6 THENTF6 = 6 //6-minute TFD6 = 9999999IF c6 = 1 THENDRAWPOINT(barindex+4, 1.56, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 0.94, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia6 = D6 THENTF6 = 6 //6-minute TFD6 = 9999999IF c6 = 1 THENDRAWPOINT(barindex+4, 1.56, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 0.94, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia6 = D7 and c7 THENTF6 = 7 //7-minute TFD7 = 9999999IF c7 = 1 THENDRAWPOINT(barindex+4, 0.45, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, -0.24, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia6 = D7 THENTF6 = 7 //7-minute TFD7 = 9999999IF c7 = 1 THENDRAWPOINT(barindex+4, 0.45, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, -0.24, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ENDIF//------------------------------------------------------------------------------FIN//menordistancia1 = min(D1,min(D2,min(D3,min(D4,min(D5,min(D6,D7))))))IF menordistancia1 = D1 and c1 THENTF1 = 1 //1-minute TFD1 = 9999999IF c1 = 1 thenDRAWPOINT(barindex+4, 7.29, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 6.64, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia1 = D1 THENTF1 = 1 //1-minute TFD1 = 9999999IF c1 = 1 thenDRAWPOINT(barindex+4, 7.29, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 6.64, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia1 = D2 and c2 THENTF1 = 2 //2-minute TFD2 = 9999999IF c2 = 1 THENDRAWPOINT(barindex+4, 6.14, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 5.47, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia1 = D2 THENTF1 = 2 //2-minute TFD2 = 9999999IF c2 = 1 THENDRAWPOINT(barindex+4, 6.14, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 5.47, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia1 = D3 and c3 THENTF1 = 3 //3-minute TFD3 = 9999999IF c3 = 1 THENDRAWPOINT(barindex+4, 4.94, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 4.35, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia1 = D3 THENTF1 = 3 //3-minute TFD3 = 9999999IF c3 = 1 THENDRAWPOINT(barindex+4, 4.94, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 4.35, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia1 = D4 and c4 THENTF1 = 4 //4-minute TFD4 = 9999999IF c4 = 1 THENDRAWPOINT(barindex+4, 3.85, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 3.20, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia1 = D4 THENTF1 = 4 //4-minute TFD4 = 9999999IF c4 = 1 THENDRAWPOINT(barindex+4, 3.85, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 3.20, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia1 = D5 and c5 THENTF1 = 5 //5-minute TFD5 = 9999999IF c5 = 1 THENDRAWPOINT(barindex+4, 2.70, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 2.02, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia1 = D5 THENTF1 = 5 //5-minute TFD5 = 9999999IF c5 = 1 THENDRAWPOINT(barindex+4, 2.70, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 2.02, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia1 = D6 and c6 THENTF1 = 6 //6-minute TFD6 = 9999999IF c6 = 1 THENDRAWPOINT(barindex+4, 1.56, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 0.94, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia1 = D6 THENTF1 = 6 //6-minute TFD6 = 9999999IF c6 = 1 THENDRAWPOINT(barindex+4, 1.56, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 0.94, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia1 = D7 and c7 THENTF1 = 7 //7-minute TFD7 = 9999999IF c7 = 1 THENDRAWPOINT(barindex+4, 0.45, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, -0.24, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia1 = D7 THENTF1 = 7 //7-minute TFD7 = 9999999IF c7 = 1 THENDRAWPOINT(barindex+4, 0.45, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, -0.24, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------//menordistancia7 = min(D1,min(D2,min(D3,min(D4,min(D5,min(D6,D7))))))IF menordistancia7 = D1 and c1 THENTF7 = 1 //1-minute TFD1 = 9999999IF c1 = 1 thenDRAWPOINT(barindex+4, 7.29, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 6.64, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia7 = D1 THENTF7 = 1 //1-minute TFD1 = 9999999IF c1 = 1 thenDRAWPOINT(barindex+4, 7.29, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 6.64, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia7 = D2 and c2 THENTF7 = 2 //2-minute TFD2 = 9999999IF c2 = 1 THENDRAWPOINT(barindex+4, 6.14, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 5.47, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia7 = D2 THENTF7 = 2 //2-minute TFD2 = 9999999IF c2 = 1 THENDRAWPOINT(barindex+4, 6.14, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 5.47, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia7 = D3 and c3 THENTF7 = 3 //3-minute TFD3 = 9999999IF c3 = 1 THENDRAWPOINT(barindex+4, 4.94, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 4.35, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia7 = D3 THENTF7 = 3 //3-minute TFD3 = 9999999IF c3 = 1 THENDRAWPOINT(barindex+4, 4.94, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 4.35, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia7 = D4 and c4 THENTF7 = 4 //4-minute TFD4 = 9999999IF c4 = 1 THENDRAWPOINT(barindex+4, 3.85, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 3.20, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia7 = D4 THENTF7 = 4 //4-minute TFD4 = 9999999IF c4 = 1 THENDRAWPOINT(barindex+4, 3.85, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 3.20, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia7 = D5 and c5 THENTF7 = 5 //5-minute TFD5 = 9999999IF c5 = 1 THENDRAWPOINT(barindex+4, 2.70, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 2.02, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia7 = D5 THENTF7 = 5 //5-minute TFD5 = 9999999IF c5 = 1 THENDRAWPOINT(barindex+4, 2.70, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 2.02, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia7 = D6 and c6 THENTF7 = 6 //6-minute TFD6 = 9999999IF c6 = 1 THENDRAWPOINT(barindex+4, 1.56, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 0.94, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia1 = D6 THENTF7 = 6 //6-minute TFD6 = 9999999IF c6 = 1 THENDRAWPOINT(barindex+4, 1.56, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, 0.94, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ELSIF menordistancia7 = D7 and c7 THENTF7 = 7 //7-minute TFD7 = 9999999IF c7 = 1 THENDRAWPOINT(barindex+4, 0.45, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, -0.24, 2) COLOURED(204,0,0)ENDIFELSIF menordistancia7 = D7 THENTF7 = 7 //7-minute TFD7 = 9999999IF c7 = 1 THENDRAWPOINT(barindex+4, 0.45, 2) COLOURED(204,0,0)ELSEDRAWPOINT(barindex+4, -0.24, 2) COLOURED(204,0,0)ENDIF//---------------------------------------------------------------------ENDIFENDIF//----------------------------------------------------------------------FINDrawText("#TF1#",BarIndex,7.0,Dialog,Bold,20)DrawText("#TF2#",BarIndex,5.75,Dialog,Bold,20)DrawText("#TF3#",BarIndex,4.60,Dialog,Bold,20)DrawText("#TF4#",BarIndex,3.45,Dialog,Bold,20)DrawText("#TF5#",BarIndex,2.30,Dialog,Bold,20)DrawText("#TF6#",BarIndex,1.15,Dialog,Bold,20)DrawText("#TF7#",BarIndex,0.0,Dialog,Bold,20)DrawText("#menordistancia1#",BarIndex+ 2,7.0,Dialog,Bold,20)DrawText("#menordistancia2#",BarIndex+ 2,5.75,Dialog,Bold,20)DrawText("#menordistancia3#",BarIndex+ 2,4.60,Dialog,Bold,20)DrawText("#menordistancia4#",BarIndex+ 2,3.45,Dialog,Bold,20)DrawText("#menordistancia5#",BarIndex+ 2,2.30,Dialog,Bold,20)DrawText("#menordistancia6#",BarIndex+ 2,1.15,Dialog,Bold,20)DrawText("#menordistancia7#",BarIndex+ 2,0.0,Dialog,Bold,20)//------DRAWSEGMENT(barindex-1, 6.4, barindex+5,6.4) //linea hotizontal 1DRAWSEGMENT(barindex-1, 5.25, barindex+5,5.25) //linea hotizontal 2DRAWSEGMENT(barindex-1, 4.10, barindex+5,4.10) //linea hotizontal 3DRAWSEGMENT(barindex-1, 2.95, barindex+5,2.95) //linea hotizontal 4DRAWSEGMENT(barindex-1, 1.80, barindex+5,1.80) //linea hotizontal 5DRAWSEGMENT(barindex-1, 0.71, barindex+5,0.71) //linea hotizontal 6DRAWSEGMENT(barindex+1, -0.5, barindex+1, 7.5) //primera linea verticalDRAWSEGMENT(barindex+3, -0.5, barindex+3, 7.5) // segunda linea verticalDRAWRECTANGLE(barindex-1, 7.5, barindex+5,-0.5)//rectanguloDrawText("PRECIO",BarIndex+4,7.0,Dialog,Bold,10)COLOURED(0,0,0)DrawText("PRECIO",BarIndex+4,5.85,Dialog,Bold,10)COLOURED(0,0,0)DrawText("PRECIO",BarIndex+4,4.66,Dialog,Bold,10)COLOURED(0,0,0)DrawText("PRECIO",BarIndex+4,3.55,Dialog,Bold,10)COLOURED(0,0,0)DrawText("PRECIO",BarIndex+4,2.39,Dialog,Bold,10)COLOURED(0,0,0)DrawText("PRECIO",BarIndex+4,1.29,Dialog,Bold,10)COLOURED(0,0,0)DrawText("PRECIO",BarIndex+4,0.12,Dialog,Bold,10)COLOURED(0,0,0)return07/03/2023 at 11:21 AM #217181Lo siento, en vez de C1, C2, etc… era necesario indicar P1, P2, etc…
Lo modifiqué y parece que funciona.
Publiqué el código solo como un archivo ITF; de lo contrario, ya no será posible cargar las páginas, ya que el texto es demasiado largo.
07/03/2023 at 3:57 PM #217199Buenas Roberto lo he modificado y probado pero no funciona es decir va el primer recuadro con la temporalidad 1, el segundo con la temporalidad 2… etc es decir van seguidas con las temporalidades no las siguen como el porcentaje que es lo que deberían hacer. Te mando captura y el código para que veas que no van correlativas con las temporalidades. Un saludo
07/03/2023 at 4:18 PM #217205El código es demasiado largo para editarlo y corregirlo. Es mejor reescribirlo completamente. Por favor, dígame en detalle lo que quiere lograr.
-
AuthorPosts
Find exclusive trading pro-tools on