How to control pane scaling
Author: SunriseMan
Creation Date: 11/29/2010 3:09 PM
profile picture

SunriseMan

#1
I am creating code for an envelope, somewhat similar to Bollinger Bands. I'm using PlotSeriesFillBand() to draw the envelope on the price pane. While it works fine most of the time, there can be unusual price patterns that cause the lower band to come close to zero. Because I'm plotting the price on a log scale, this can result in the pane being scaled such that the price bars get scrunched up at the top.

Is there a way to force Wealth-Lab to plot a series but ignore it for scaling purposes (e.g. just truncate it if it goes beyond the values used by other indicators)? If not, is there are way to plot the band discontinuously - i.e., not plot the values that go below a certain level? (I know there's a KB article on plotting discontinuously, but the workaround of using a transparent brush won't fix the problem with scaling.)

I'd appreciate any suggestions.
profile picture

Cone

#2
Method 1. Clip your indicator such that it doesn't go near zero. In other words, determine a min and/or max level and adjust the values to them.

Method 2. Don't use PlotSeries
Instead, draw your indicator manually (bar by bar) using DrawLine.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).