A Trend indicator
Forums › ProRealTime English forum › ProBuilder support › A Trend indicator
- This topic has 8 replies, 3 voices, and was last updated 10 months ago by Bryggare.
-
-
12/28/2023 at 6:00 AM #225746
Hi I wonder if you could help me create an indicator that I use for determine if a stock goes sideways.
1234<span class="Y2IQFc" lang="en">I would like to have an indicator that shows how many times the closing price has been touched in the last 30 bars before the current bar.For example, if the closing price has touched five bars out of the last 30 bars, the indicator should show 5. The result could be shown in a histogram.Thankful if you could help me</span>12/28/2023 at 9:45 AM #22574812/28/2023 at 3:11 PM #22576312/28/2023 at 3:42 PM #225765Hi again. It seems like the indicator compares to days range with previous close for the last 30 days. Can you change so that the close of the current bar compares with the hole range from high to low of the previous bars. For example the to days close compares if it has touched any of the last 30 days bars (from high to low).
12/28/2023 at 5:09 PM #225772Hi,
This indicator compares whether the current Close falls between the High and the Low (Range) of the previous 30 candles…
Close between previous range1234567Touched=0For i=1 to 30If Close<High[i] and Close>Low[i] thenTouched=Touched+1EndIfNextReturn Touched as "Touched" Coloured("Green")Style(Histogram)1 user thanked author for this post.
12/28/2023 at 5:57 PM #22577812/29/2023 at 12:00 PM #225800An other upgrade/version… Try with total price instead of close
Ranging Index12345678910111213141516171819202122src = customcloseTouched=0For i=1 to 30If src<High[i] and src>Low[i] thenTouched=Touched+1EndIfNextFiltre = Average[5](Touched)If Filtre < 5 thenColR = 0ColG = 128ColB = 0ElseColR = 128ColG = 128ColB = 128EndifReturn 1 as "Ranging Index" Coloured(ColR,ColG,ColB)Style(Histogram)1 user thanked author for this post.
12/29/2023 at 12:35 PM #225807Little upgrade… The idea is not bad, but still not accurate as my main range detector.
Ranging Index12345678910111213141516171819202122src = customcloseTouched=0For i=0 to 28If src<High[i] and src>Low[i] thenTouched=Touched+1EndIfNextFiltre = ExponentialAverage[2](Touched)If Filtre < 5 thenColR = 0ColG = 128ColB = 0ElseColR = 128ColG = 128ColB = 128EndifReturn 1 as "Ranging Index" Coloured(ColR,ColG,ColB)Style(Histogram)1 user thanked author for this post.
12/29/2023 at 3:41 PM #225814 -
AuthorPosts
Find exclusive trading pro-tools on