Re: MT4 Indicator requests and ideas

15812
mrtools wrote: Wed Jun 22, 2022 4:45 pm It has arrows already.
it has arrows on current bar and , but arrows will disappear when the current bar price goes reversal to the arrow direction ...
after close bar, if the price is reversal arrow can't seen on chart.
i need to stay on the bar even its reversal price /false signal arrow.
"There is NO GOD higher than TRUTH" - Mahatma Gandhi


Re: MT4 Indicator requests and ideas

15816
Forecast Oscillator

The Forecast Oscillator is a technical indicator that compares a security close price to its time series forecast. The time series forecast function name is "tsf" and it calculates the projection of the price trend for the next bar.

The Forecast Oscillator and therefore the time series forecast are based on linear regression . The time series forecast indicator is equal to the sum of two other indicators: the linear regression (LinearReg) and the linear regression slope (LinearReg_Slope).

Code: Select all

study("Forecast Oscillator", overlay=false)
src = input(close)
len = input(defval=14, minval=1, title="Length")
lrc = linreg(src, len, 0)
lrc1 = linreg(src,len,1)
lrs = (lrc-lrc1)
TSF = linreg(src, len, 0)+lrs
fosc=100*(src-TSF[1])/src
col12 = fosc > fosc[1]
col32 = fosc < fosc[1]
color2 = col12 ? #21C400 : col32 ? #960012 : color.blue
plot(fosc, color = color2,linewidth=2, title = "TSF")
hline(0, linestyle=2, color=color.blue)
PS: I know we also have a forecast Oscillator on this website, but its different (as far I can tell, also not a histo version)
These users thanked the author PumbaPLS for the post (total 3):
TraderX, Jedidiah, Jimmy
You cannot solve a problem from the same consciousness that created it. You must learn to see the world anew

Re: MT4 Indicator requests and ideas

15820
PumbaPLS wrote: Thu Jun 23, 2022 6:07 am Forecast Oscillator

The Forecast Oscillator is a technical indicator that compares a security close price to its time series forecast. The time series forecast function name is "tsf" and it calculates the projection of the price trend for the next bar.

The Forecast Oscillator and therefore the time series forecast are based on linear regression . The time series forecast indicator is equal to the sum of two other indicators: the linear regression (LinearReg) and the linear regression slope (LinearReg_Slope).

Code: Select all

study("Forecast Oscillator", overlay=false)
src = input(close)
len = input(defval=14, minval=1, title="Length")
lrc = linreg(src, len, 0)
lrc1 = linreg(src,len,1)
lrs = (lrc-lrc1)
TSF = linreg(src, len, 0)+lrs
fosc=100*(src-TSF[1])/src
col12 = fosc > fosc[1]
col32 = fosc < fosc[1]
color2 = col12 ? #21C400 : col32 ? #960012 : color.blue
plot(fosc, color = color2,linewidth=2, title = "TSF")
hline(0, linestyle=2, color=color.blue)
Image


PS: I know we also have a forecast Oscillator on this website, but its different (as far I can tell, also not a histo version)
Will see if I can translate it.
These users thanked the author mrtools for the post (total 2):
PumbaPLS, Chickenspicy