//version=5 indicator(title="Elder Force Index Strategy", shorttitle="EFI", format=format.volume, timeframe="", timeframe_gaps=true)
// Input para o comprimento da EMA length = input.int(13, title="Length", minval=1)
// Cálculo do Elder Force Index (EFI) efi = ta.ema(ta.change(close) * volume, length)
// Plot do EFI plot(efi, color=#F44336, title="Elder Force Index")
// Sinal de Compra (Cruzamento acima de 0) buySignal = efi > 0 and efi[1] <= 0 // Sinal de Venda (Cruzamento abaixo de 0) sellSignal = efi < 0 and efi[1] >= 0
// Plot dos sinais de compra e venda no gráfico plotshape(series=buySignal, title="Buy Signal", color=color.green, style=shape.triangleup, location=location.belowbar, size=size.small) plotshape(series=sellSignal, title="Sell Signal", color=color.red, style=shape.triangledown, location=location.abovebar, size=size.small)