Buenos dí as, algunas maneras de “colorear el cruce”:
Con backgroundcolor:
ema50= ExponentialAverage [ 50 ] (close )
ema200= ExponentialAverage [ 200 ] (close )
if ema50 crosses over ema200 then
BACKGROUNDCOLOR (0 ,191 ,255 )
endif
return ema50, ema200
Con drawsegment para tambien cambiar grosor de las línea s al cruce:
ema50= ExponentialAverage [ 50 ] (close )
ema200= ExponentialAverage [ 200 ] (close )
if ema50 crosses over ema200 then
DRAWSEGMENT (barindex [ 1 ] , ema50[ 1 ] , barindex , ema50) coloured ("deepskyblue" ) style (line ,3 )
DRAWSEGMENT (barindex [ 1 ] , ema200[ 1 ] , barindex , ema200) coloured ("deepskyblue" ) style (line ,3 )
endif
return ema50, ema200
Con coloured(…) para cambiar directamente los colores de las ema:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
ema50= ExponentialAverage [ 50 ] (close )
ema200= ExponentialAverage [ 200 ] (close )
ema50R= 0
ema50G= 0
ema50B= 0
ema200R= 0
ema200G= 0
ema200B= 0
if ema50 crosses over ema200 then
ema50G= 191
ema50B= 255
ema200G= 191
ema200B= 255
endif
return ema50 coloured (ema50R,ema50G,ema50B), ema200 coloured (ema200R,ema200G,ema200B)
1 user thanked author for this post.