StockFetcher Forums · General Discussion · Can this indicator be coded for Stockfetcher<< >>Post Follow-up
schaballa
7 posts
msg #161509
Ignore schaballa
12/22/2024 5:36:39 PM

I have had good entry success with call options using this Leading Indicator on Tradingview. Wondering if anyone can possibly code this indicator.

/@version=5
indicator("Leading Indicator Example", overlay=false)

// Input parameters for indicator sensitivity
length = input(14, title="Regression Period Length")
rocLength = input(9, title="ROC Period Length")
rocThreshold = input(5, title="ROC Threshold")

// Linear Regression for Trend Prediction
lrc = ta.linreg(close, length, 0)

// Rate of Change (ROC) for momentum prediction
roc = ta.roc(close, rocLength)

// Leading Indicator Logic
leadingIndicator = (close - lrc) / ta.stdev(close, length) // Standardized difference from regression line

// Define possible buy and sell signals based on ROC and Leading Indicator
buySignal = roc > rocThreshold and leadingIndicator > 0 // Predicting upward momentum
sellSignal = roc < -rocThreshold and leadingIndicator < 0 // Predicting downward momentum

// Plot the leading indicator as an oscillator
plot(leadingIndicator, color=color.blue, title="Leading Indicator", linewidth=2)

// Highlight buy and sell signals on the chart
bgcolor(buySignal ? color.new(color.green, 90) : na)
bgcolor(sellSignal ? color.new(color.red, 90) : na)

// Plotting ROC to visualize momentum as well
hline(rocThreshold, "ROC Threshold", color=color.gray)
plot(roc, color=color.purple, title="ROC Momentum", linewidth=2)

Thanks in Advance

nibor100
1,045 posts
msg #161510
Ignore nibor100
modified
12/23/2024 3:45:33 PM

what is the TradingView name for this indicator, do you have a chart image to share? or the author's name?
thanks,
Ed S.

schaballa
7 posts
msg #161512
Ignore schaballa
12/23/2024 6:57:06 PM

Hey Ed, The indicator is called Leading Indicator by Parag Raut on Tradingview.

This is the only way I can get an image of his indicator working on my Tradingview account on this forum - https://ibb.co/chW1bgp


schaballa
7 posts
msg #161513
Ignore schaballa
12/23/2024 7:05:00 PM

The indicator is at the bottom of my chart. I was entering just after the solid red bar off a higher low or lower low starting an uptrend and exiting into the first green bar.

StockFetcher Forums · General Discussion · Can this indicator be coded for Stockfetcher<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.