Professional Documents
Culture Documents
2
2
//@author Alorse
//@version=4
//strategy("MACD + BB + RSI [Alorse]", shorttitle="BB + MACD + RSI [Alorse]",
overlay=true, pyramiding=0, currency=currency.USD,
default_qty_type=strategy.percent_of_equity, initial_capital=1000,
default_qty_value=20, commission_type=strategy.commission.percent,
commission_value=0.01)
strategy("Media movil",overlay=true)
me1=ema(close,5)
me2=ema(close,7)
me3=ema(close,20)
me4=ema(close,55)
plot(me1,color=#cd966c, linewidth=2,transp=0)
plot(me2,color=#cd966c, linewidth=2,transp=0)
plot(me3,color=#cd966c, linewidth=2,transp=0)
plot(me4,color= #cd966c , linewidth=2,transp=0)
cup=crossover(me1,me2)
cdown=crossunder(me1,me2)
plotshape(cup, style=shape.arrowup,color=#cd966c,
location=location.belowbar,size=size.huge)
plotshape(cdown, style=shape.arrowdown,color=#cd966c,
location=location.abovebar,size=size.huge)
Inicio=timestamp(2021,10,1,0,0)
fin=timestamp(2021,10,14,0,0)
strategy.close("cup", when=cdown)
strategy.close("cdown", when=cup)