ALMA-Indicator with additional bands!
Forums › ProRealTime English forum › ProBuilder support › ALMA-Indicator with additional bands!
- This topic has 4 replies, 2 voices, and was last updated 6 years ago by micha2012.
Tagged: ALMA, floating levels
-
-
11/30/2018 at 11:44 AM #86070
Dear All,
I frequently use ALMA-indicator for signals; It is very relyable for me. BUT, I would like to “improve” by adding 3x lines (bands) to the original ALMA-indicator (see photos attached).
MY idea:LONG
– when [close] cross over ALMA –> open 1x position (+1)
– when [close] cross over “middle” band –> add 1x position (+2)
– if [close] cross over “highest” band –> close 1x position (+1)
– when [close] cross under ALMA –> close all positions (+/- 0)Please, who could help my coding these bands? I attached the code from MT5; hopefully it will be helpful!
Thank you very much in advance.
Micha11/30/2018 at 2:14 PM #8608911/30/2018 at 2:25 PM #86091Here we go:
123456789101112131415161718192021222324252627282930Window = 14Sigma = 6Offset = 0.25flPeriod = 25 // Floating levels look back periodflLevelUp = 90 // Floating levels up level %flLevelDown = 10 // Floating levels down level %Price = customclosem = (Offset * (Window - 1))s = Window/SigmaWtdSum = 0CumWt = 0for k = 0 to Window - 1 doWtd = Exp(-((k-m)*(k-m))/(2*s*s))WtdSum = WtdSum + Wtd * Price[Window - 1 - k]CumWt = CumWt + Wtdnextval = WtdSum / CumWtimin = lowest[FlPeriod](val)imax = highest[FlPeriod](val)rrange = imax-iminflup = imin+FlLevelUp *rrange/100.0fldn = imin+FlLevelDown*rrange/100.0flmi = imin+50 *rrange/100.0return val as "ALMA average", flup coloured(34,139,34) style(dottedline), fldn coloured(220,20,60) style(dottedline), flmi coloured(169,169,169) style(dottedline)There are different ways to color the ALMA (that I did not code), depending of its position compared to the bands or by its own slope, do you use one of them?
11/30/2018 at 3:20 PM #86100Dear Nicolas,
thank you very much for your support. Please find below my ALMA-indicator..The change of the ALMA-colour is very important; could you please code with the original colour change?
Merci beaucoup.
Micha
1234567891011121314151617181920212223// parametersDEFPARAM CalculateOnLastBars = 1000Window = 10Sigma = 6Offset = 0.55Price = Closem = (Offset * (Window - 1))s = Window/SigmaWtdSum = 0CumWt = 0for k = 0 to Window - 1 doWtd = Exp(-((k-m)*(k-m))/(2*s*s))WtdSum = WtdSum + Wtd * Price[Window - 1 - k]CumWt = CumWt + WtdnextALAverage = WtdSum / CumWtRETURN ALAverage11/30/2018 at 3:30 PM #86102Hello Nicolas,
I was able to add ALMA-colour myself:
123456789101112131415161718192021222324252627282930Window = 10Sigma = 6Offset = 0.55flPeriod = 25 // Floating levels look back periodflLevelUp = 90 // Floating levels up level %flLevelDown = 10 // Floating levels down level %Price = customclosem = (Offset * (Window - 1))s = Window/SigmaWtdSum = 0CumWt = 0for k = 0 to Window - 1 doWtd = Exp(-((k-m)*(k-m))/(2*s*s))WtdSum = WtdSum + Wtd * Price[Window - 1 - k]CumWt = CumWt + WtdnextALAverage = WtdSum / CumWtimin = lowest[FlPeriod](ALAverage)imax = highest[FlPeriod](ALAverage)rrange = imax-iminflup = imin+FlLevelUp *rrange/100.0fldn = imin+FlLevelDown*rrange/100.0flmi = imin+50 *rrange/100.0return ALAverage as "ALMA average", flup coloured(34,139,34) style(dottedline), fldn coloured(220,20,60) style(dottedline), flmi coloured(169,169,169) style(dottedline)Thank you very much.
All the best,
Micha
-
AuthorPosts