Hello, is there any way to overlay Williams Accumulation Distribution Indicator on actual price instead of below it? ProRealTime does not seem to allow it to overlay it on Price instead of plotting it below. Is there a code to do it? Thank you.
Default indicator of the platform can’t be applied on price when they are not intended to be used this way. Particulary for Williams Accumulation Distribution, which doesnt share the same scale (volume) vs price ..
A workaround is to create a normalized indicator:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Williams Accumulation Distribution Calculation
WAD=WilliamsAccumDistr
// Find the highest and lowest prices on the visible chart
visiblebars=max(1,barindex)
HighestPrice=highest[visiblebars](high)
LowestPrice=lowest[visiblebars](low)
// Calculate the range of the price
PriceRange=HighestPrice-LowestPrice
// Find the highest and lowest values of WAD for normalization
This code snippet normalizes the Williams Accumulation Distribution Indicator values to the scale of the highest to lowest prices on the visible part of the chart, making it possible to overlay it directly on the price chart. The visiblebars (all barindex loaded) variable is used to dynamically adjust to the visible part of the chart, ensuring that the normalization is relevant to the current view.
Keep in mind that the effectiveness of this normalization approach can vary depending on the volatility and the range of the Williams Accumulation Distribution values compared to the price range. This method is meant to visually assist in analysis rather than serve as a direct trading signal.
Thank you, but I have another question. Is there any way to plot this Normalized WAD right over the price instead of running it parallel and at a distance? I would love to actually overlay straight on Price rather then run it parallel. Please see picture below to see how it appears now and Normalized WAD is a blue line.
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue