1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
defparam drawonlastbaronly = true
//fractals
cp = lookback
if high [ cp] >= highest [ (cp)* 2 + 1 ] (high ) then
LLH = 1
else
LLH = 0
endif
if low [ cp] <= lowest [ (cp)* 2 + 1 ] (low ) then
LLL = - 1
else
LLL = 0
endif
if LLH = 1 then
oldLTOPy = LTOPy[ 1 ]
oldLTOPx = LTOPx[ 1 ]
LTOPy = high [ cp]
LTOPx = barindex [ cp]
endif
if LLL = - 1 then
oldLBOTy = LBOTy[ 1 ]
oldLBOTx = LBOTx[ 1 ]
LBOTy = low [ cp]
LBOTx = barindex [ cp]
endif
//trend line
DRAWLINE (oldLTOPx,oldLTOPy,LTOPx,LTOPy)coloured (0 ,0 ,255 )
DRAWLINE (oldLBOTx,oldLBOTy,LBOTx,LBOTy)coloured (211 ,78 ,36 )
/////////////condition of arrow//////////////////////////////////////
if close > LTOPy then
drawarrowup (barindex ,lowest [ 5 ] (LTOPy)) coloured (0 ,51 ,255 )
endif
////////////////////////////////////////////////////////////////////////
RETURN
Hola,me gustarìa añadir una flecha hacia arriba cada vez que el precio cruza por encima de la lìnea de color azul como muestro en la imagen.
La condiciòn serìa esta:
close crosses over (DRAWLINE(oldLTOPx,oldLTOPy,LTOPx,LTOPy)coloured(0,0,255))
No sè cómo codificarlo……Lo he intentado al final del código pero la flecha sale muy arriba….
¿Alguien me puede ayudar?
Gracias.