actua como experto en programacion de scripts para iqoption, revisa este script:…
- User
actua como experto en programacion de scripts para iqoption, revisa este script: instrument { name = 'PROXIMA VELA ROGER', short_name = '', overlay = true -- Choose true or false for overlay behavior }
-- Parámetros de entrada MaFast_period = input(1, "Ma Fast period", input.integer, 1, 1000, 1) MaSlow_period = input(34, "Ma Slow period", input.integer, 1, 1000, 1) Signal_period = input(8, "Signal period", input.integer, 1, 1000, 1) CCI_period = input(34, "CCI period", input.integer, 1, 1000, 1) -- Added CCI period input cci_buy_threshold = input(-100, "CCI Buy Threshold", input.integer, -200, 0, 1) -- Added CCI buy threshold cci_sell_threshold = input(100, "CCI Sell Threshold", input.integer, 0, 200, 1) -- Added CCI sell threshold
input_group { "Compra", colorBuy = input { default = "green", type = input.color }, visibleBuy = input { default = true, type = input.plot_visibility } }
input_group { "Venda", colorSell = input { default = "red", type = input.color }, visibleSell = input { default = true, type = input.plot_visibility } }
-- Media móvil rápida smaFast = sma(close, MaFast_period)
-- Media móvil lenta smaSlow = sma(close, MaSlow_period)
-- Cálculo diferencial buffer1 = smaFast - smaSlow
-- Media móvil ponderada del diferencial buffer2 = wma(buffer1, Signal_period)
-- Cálculo del CCI cci = cci(close, CCI_period)
-- Condiciones de Compra y Venta buyCondition = buffer1 > buffer2 and buffer1[1] < buffer2[1] and cci > cci_buy_threshold and cci <= 0 sellCondition = buffer1 < buffer2 and buffer1[1] > buffer2[1] and cci < cci_sell_threshold and cci >= 0
-- Trazado de señales en el gráfico plot_shape( buyCondition, "Compra", shape_style.arrowup, shape_size.large, colorBuy, -- Use colorBuy for consistency shape_location.belowbar, 0, "PROX VELA", colorBuy -- Use colorBuy for consistency )
plot_shape( sellCondition, "Venda", shape_style.arrowdown, shape_size.large, colorSell, -- Use colorSell for consistency shape_location.abovebar, 0, "PROX VELA", "RED" )
- Assistant
- User
revisa este porque no aparecen las senales en la pantalla: instrument { name = 'PROXIMA VELA ROGER', short_name = '', overlay = true,false }
MaFast_period = input(1, "Ma Fast period", input.integer, 1, 1000, 1) MaValue = input(5, "Ma Value", input.string_selection, inputs.titles) MaSlow_period = input(34, "Ma Slow period", input.integer, 1, 1000, 1) Signal_period = input(8, "Signal period", input.integer, 1, 1000, 1)
input_group { "Compra", colorBuy = input { default = "green", type = input.color }, visibleBuy = input { default = true, type = input.plot_visibility } }
input_group { "Venda", colorSell = input { default = "red", type = input.color }, visibleSell = input { default = true, type = input.plot_visibility } }
local titleValue = inputs[MaValue]
-- Media móvil rápida smaFast = sma(titleValue, MaFast_period)
-- Media móvil lenta smaSlow = sma(titleValue, MaSlow_period)
-- Cálculo diferencial buffer1 = smaFast - smaSlow
-- Media móvil ponderada del diferencial buffer2 = wma(buffer1, Signal_period)
- Assistant
- User
verifica que estes usando sintaxis de Quadcode Script y corrige el script
- Assistant