How To Erase a Plot

Fig. 1. Chart showing unwanted portion of indicator plot in yellow
Plot1(TypicalPrice, “Price”, cyan, default, 1);
Plot1[PriceLength](TypicalPrice, “Price”, black, default, 1);

Fig. 2. Unwanted portion of plot overplotted in black to hide original plot
A convenient function to use to produce the desired shift is the fast calculation version of the Lowest Low function, LowestFC:
Plot1(TypicalPrice, “Price”, Cyan, default, 1);
Plot1[PriceLength]( LowestFC(Low, DisplaceLength), “Price”, Yellow, default, 0);

Fig. 3. Chart with unwanted portion of plot displayed entirely below the bar lows

Fig. 4. Displayed unwanted portion of plot is now overplotted in black, producing final desired hidden result
Steps To Erase a Plot (TS versions prior to 9.0)
- Plot the desired function (Typical Price, in this example).
- Overplot this function with an offset of PriceLength bars, changing the color of the overplot to match the background color of the chart, and setting the width of this overplotted indicator to the narrowest width possible (width = 0).
- Shift the overplot away from the symbol candlestick bars so that the overplotted function line (now in the background color: black) does not cross any of the body or tails of the candlesticks. This may be accomplished with the Lowest Low function using a length somewhat greater than the length of the indicator portion to remain visible on the chart.
Steps to Erase a Plot (TS versions 9.0 and later)
The reserved word transparent was introduced to Easylanguage in version 9.0 providing an simpler method to erase a plot:
Plot1(TypicalPrice, “Price”, Cyan, default, 1);
Plot1[PriceLength]( Plot1, “Price”, transparent);
The final code may be visualized by clicking the PlotErase Indicator link below.
Downloads
Initial posted version: 01/02/08
Latest Update: 01/31/10
*.ELD files are compiled for TS 8.7
All ELD and code text files packaged here:
Users of earlier versions of Tradestation may compile the code
from the text files included in the above *.zip file.
The code may be visualized here: