Price spike histogram bars showing multiple of ATR
Forums › ProRealTime English forum › ProBuilder support › Price spike histogram bars showing multiple of ATR
- This topic has 7 replies, 2 voices, and was last updated 2 years ago by jwh145.
Viewing 8 posts - 1 through 8 (of 8 total)
-
-
08/27/2022 at 4:24 AM #199698
Hi,
I am looking for an histogram indicator which provides bars when price moves by a multiple of its average true range over a certain number of days ie if the average true range is 5c and there is a current price range of 10c in the last 10 days then a spike bar will appear.
Any assistance would be appreciated.
Jonathan
08/27/2022 at 9:28 AM #199701xSpike123456789ATR = AverageTrueRange[n](Close)xSpike = (Range / ATR)//If xSpike < 2 then//xSpike = 0//EndIfReturn xSpike style (Histogram) as "xSpike"Hi @jwh145
I used the “Range” here divided by the “ATR”.
You can have this drawn in a histogram and if you only want to have a ratio greater than, for example, two than:
xSpike = Range / ATR
If Range/ATR < 2 then
xSpike = 0
EndIf
08/28/2022 at 11:39 AM #19973208/28/2022 at 1:40 PM #199749xSpike Coloured123456789101112131415161718192021ONCE n = 10ATR = AverageTrueRange[n](Close)xSpike = (Range / ATR)If xSpike < 2 thenxSpike = 0EndIfIf Close < Open thenR=255G=0B=0elseR=0G=255B=0EndIfReturn xSpike Coloured (R,G,B) style (Histogram) as "xSpike"08/29/2022 at 11:25 AM #19978409/06/2022 at 9:34 AM #20022709/06/2022 at 3:58 PM #20024709/07/2022 at 4:37 AM #200255 -
AuthorPosts
Viewing 8 posts - 1 through 8 (of 8 total)
Find exclusive trading pro-tools on
Similar topics: