rsiPeriod = input(11, minval = 1, title = "RSI Period") bandLength = input(31, minval = 1, title = "Band Length") lengthrsipl = input(1, minval = 0, title = "Fast MA on RSI") lengthtradesl = input(9, minval = 1, title = "Slow MA on RSI")
src = close // Source of Calculations (Close of Bar) r = rsi(src, rsiPeriod) // RSI of Close ma = sma(r, bandLength) // Moving Average of RSI [current] offs = (1.6185 * stdev(r, bandLength)) // Offset up = ma + offs // Upper Bands dn = ma - offs // Lower Bands mid = (up + dn) / 2 // Average of Upper and Lower Bands fastMA = sma(r, lengthrsipl) // Moving Average of RSI 2 bars back slowMA = sma(r, lengthtradesl) // Moving Average of RSI 7 bars back
Seria bueno que hicieras una descripción sobre ¿qué Hare tu indicador? ¿Cuáles son las señales de compra o venta si las tiene? O si es tendencial ¿Cuándo hay una tendencia bajista o alcista? Supongo que lo que colocaste en la descripción es el código para que se copie y pegue.