Question: how do i fix this error in my code plotetesel II Botlinger bands and Estinated Moving Average strategy II The strategy is based on the
plotetesel II Botlinger bands and Estinated Moving Average strategy II The strategy is based on the idea that then the price breaks out of the Boltinger bands, II it is ukely to continue in that direction. II The strategy also uses the Estimated Moving Average to contirn the trend. If The strategy witl go lom then the price breaks above the upper Boltinger band and the Estinated Moving Average is trending up. II The strategy will go short shen the price breaks below the tower Boltinger band and the Estinated Moving Average is trending doin. If the strategy will use fibonacel retracesents to set stop loss and take profit levels. strategyt "Dotunger bundi and Estinated Moving Average", evertoyetrue) II Botunger bands lenpth = inpot(20, atnval-1) Upper = essethigh, length) + evit stdeviclese, length) If Estieated Moving Averoge enteripth - ingut tia) If Go short when the price breaks belon the lover botunger band and the Estiasted Moving Average is trending deom stocksereener Fandecitof strategy Tester Trading Panal A EMA, BOLIMEER, FBO. " 0 * Q 1.0 17 If The strategy will use fibonacci retracenents to set stop loss and take profit levels. 20 strategy("Bollinger bands and Estinated Moving Average", overtayetrue) 22 II Botlinger bands 23 length = ingut (20, ainval-1) 24 eutt a input (2.0, elnval=0.001, esxvates0) 25 upper = ens ( high, length) + autt stdev(close, Length) 27 Lover = ema(low, length) nutt = stdev(close, tength) 29 I/ Estinated Moving Average 30 enatength = Input(14) estinatedlovinghuerage = ena(close, enatength) If 6 long when the price breaks above the upper Bollinger band and the Estimated Moving Average is trending up If (close > upper) and (estinateditovingAverage > estinotedovingAverage(11)) stroteabucatry("Long", strategy, long) II Go short when the price breaks below the lower Boltinger band and the Estinated Moving Average is trending down if (close \& lower) and (estinatedlovingAverage \& estinatedtovingAverage(11)) strategy, entry ("short", strategy, short) 11 Use 11bonacei retracements to set stop loss and take profit levels stopLoss = lover + (upper lower) 0.382 takeProfit = Lower + (upper lower) =0.618 If Set the stop loss and take profit levels strategy,exte("Stop Loss", "Long", stopestopLoss, nark=stopLoss) strategy,exit ("Take Profit", "Long", Linit-takeProfit, aarkntakeprofit) strategy.exit("Stop Loss", "short", , stop-stopLoss, narkestoploss) strategy,exit("Take Profit", "Short", UnitatakeProfit, nark-takeProfit)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
