0% found this document useful (0 votes)
8 views1 page

Custom Indicator for Trading Analysis

The document outlines a custom indicator script for trading analysis, incorporating various technical indicators such as SMA, EMA, RSI, MACD, and others. It calculates a custom value by averaging the results of these indicators. The final custom indicator is plotted in blue for visualization purposes.

Uploaded by

Erick Marques
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views1 page

Custom Indicator for Trading Analysis

The document outlines a custom indicator script for trading analysis, incorporating various technical indicators such as SMA, EMA, RSI, MACD, and others. It calculates a custom value by averaging the results of these indicators. The final custom indicator is plotted in blue for visualization purposes.

Uploaded by

Erick Marques
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

instrument { name = "Custom Indicator", short_name = "CI", overlay = false }

-- Inputs
period_sma = input(14, "SMA Period", [Link], 1)
period_ema = input(14, "EMA Period", [Link], 1)

-- Sub-indicators
sma_val = sma(close, period_sma)
ema_val = ema(close, period_ema)
rsi_val = rsi(close, 14)
macd_line, signal_line = macd(close, 12, 26, 9)
stoch_k, stoch_d = stoch(close, 14, 3, 3)
roc_val = roc(close, 14)
cci_val = cci(close, 20)
atr_val = atr(14)
adx_val = adx(14)
williams_r = willr(14)

-- Custom Indicator Calculation (Example logic: summing normalized values)


custom_value = (sma_val + ema_val + rsi_val + macd_line + signal_line + stoch_k +
stoch_d + roc_val + cci_val + atr_val + adx_val + williams_r) / 12

-- Plotting
plot(custom_value, "Custom Indicator", [Link])

You might also like