new indicator: GaussTrendChannels
Forums › ProRealTime English forum › ProBuilder support › new indicator: GaussTrendChannels
- This topic has 5 replies, 2 voices, and was last updated 1 month ago by
JS.
-
-
02/25/2025 at 2:37 PM #244343
Dear All,
today i would like to presend an interesting indicator, which I use frequently for Furures (5min.,1min.) gaining good result.
AS alqways, my coding skills are basic..I could not solve last 3x lines for PLOt / DRAWLINE..
{{
DEFPARAM CalculateonLastBars = 500
Length = 200 // Standardlänge
// Gaussian Kernel Berechnung ohne Funktion
currentWeight = 0
cumulativeWeight = 0
FOR i = 0 TO Length – 1 DO
weight = EXP(- (i * i) / (2 * ((Length / 3) * (Length / 3))))
currentWeight = currentWeight + close[i] * weight
cumulativeWeight = cumulativeWeight + weight
NEXT
Ghat = currentWeight / cumulativeWeight// Rolling Standard Deviation Berechnung ohne Funktion
sumVal = 0
sumSq = 0
FOR i = 0 TO Length – 1 DO
sumVal = sumVal + close[i]
sumSq = sumSq + (close[i] * close[i])
NEXT
mean = sumVal / Length
variance = (sumSq / Length) – (mean * mean)
Deviation = SQRT(MAX(variance, 0))// Berechnungen
Upper = Ghat + Deviation
Lower = Ghat – Deviation// Plots (Linien)
DRAWHLINE(Upper, RGB(0, 120, 255)) // Zeichnet die Linie für Upper
DRAWHLINE(Lower, RGB(0, 120, 255)) // Zeichnet die Linie für Lower
DRAWHLINE(Ghat, RGB(0, 255, 0)) // Zeichnet die Linie für GhatRETURN}}
Please, could you support me in solving graphical problems?
Below, please find a screenshot on trading ideas with this indicator.
(5min. channel= blue, yellow / 1min. channel=pink, green) / 1h channel= orange dotted line)
Thank you very much.
Regards to all!
02/25/2025 at 9:37 PM #244359Here is the adjusted indicator:
Gaussische Kernel12345678910111213141516171819202122232425262728293031DEFPARAM CalculateonLastBars = 500Length = 200 // Standardlänge// Gaussian Kernel Berechnung ohne FunktionCurrentWeight = 0CumulativeWeight = 0FOR i = 0 TO Length - 1 DOWeight = EXP(- (i * i) / (2 * ((Length / 3) * (Length / 3))))currentWeight = currentWeight + close[i] * weightcumulativeWeight = cumulativeWeight + weightNEXTGhat = currentWeight / cumulativeWeight// Rolling Standard Deviation Berechnung ohne FunktionsumVal = 0sumSq = 0FOR i = 0 TO Length - 1 DOsumVal = sumVal + close[i]sumSq = sumSq + (close[i] * close[i])NEXTmean = sumVal / Lengthvariance = (sumSq / Length) - (mean * mean)Deviation = SQRT(MAX(variance, 0))// BerechnungenUpper = Ghat + DeviationLower = Ghat - DeviationRETURN Ghat as "Ghat" Coloured(0,255,0), Upper as "Upper" Coloured(0,120,255),Lower as "Lower" Coloured(0,120,255)3 users thanked author for this post.
02/27/2025 at 4:11 PM #24441702/27/2025 at 4:43 PM #244423When you use this indicator, based on a 5-minute timeframe, you can display it in a graph with a 1-minute timeframe…
Gaussian Kernel TF5min1234567891011121314151617181920212223242526272829303132333435DEFPARAM CalculateonLastBars = 500TimeFrame(5 minutes,UpdateOnClose)Length = 200 // Standard Period// Gaussian Kernel CalculationCurrentWeight = 0CumulativeWeight = 0FOR i = 0 TO Length - 1 DOWeight = EXP(- (i * i) / (2 * ((Length / 3) * (Length / 3))))currentWeight = currentWeight + close[i] * weightcumulativeWeight = cumulativeWeight + weightNEXTGhat = currentWeight / cumulativeWeight// Rolling Standard Deviation CalculationsumVal = 0sumSq = 0FOR i = 0 TO Length - 1 DOsumVal = sumVal + close[i]sumSq = sumSq + (close[i] * close[i])NEXTmean = sumVal / Lengthvariance = (sumSq / Length) - (mean * mean)Deviation = SQRT(MAX(variance, 0))// Band CalculationsUpper = Ghat + DeviationLower = Ghat - DeviationTimeFrame(Default)//PlottingRETURN Ghat as "Ghat" Coloured(0,255,0), Upper as "Upper" Coloured(0,120,255),Lower as "Lower" Coloured(0,120,255)1 user thanked author for this post.
02/27/2025 at 5:18 PM #24442802/27/2025 at 5:37 PM #244431 -
AuthorPosts
Find exclusive trading pro-tools on