How to transform any indicator in a histogram with TradeStation

In this EasyLanguage Tutorial, we’ll teach you how to use the TradeStation Histogram visual mode. Many traders dislike charts that are cluttered with lines, sketches, and indicators. They want to see the actual price action rather than a moving average. Let’s look at a simple example from this article.

We can only observe this information through a histogram because of the active slope function. Obviously, we may only see this data via a histogram. However, when looking for trend filtering, this data is very helpful.

Let’s get started by converting a moving average into a TradeStation histogram. First, we make these changes to the Tradestation EasyLanguage code:

Input: 
MA_length(20);

vars: 
MA(0), 
color(white), 
MA_histo(1);

MA=average(Close, MA_length);

If MA>MA[1] and MA[1]>MA[2] then

color=Green;

If MA<MA[1] and MA[1]<MA[2] then

color=Red;

Plot1( MA_histo, “MA”,color,0,3 );

The TradeStation Indicator continues to compute the moving average, but instead of drawing the line with the current average price, Plot1 will draw a fixed number “1.”

Because we are only interested in observing the color that changes when the average is declining or rising (red and green), this happens.

Tradestation has changed the settings of one or more of our indicators, so we’ll need to update them in Tradestation as well. We must also modify some indicator settings in Tradestation:

RELATED ARTICLES:

Now you just see the TradeStation Histogram in your chart. To show a large number of indicators, we may utilize the green-red histogram on TradeStation.

tradestation histogram EasyLanguage Indicator

Another histogram may also be generated to indicate when prices are below or above the moving average.

With a red and green histogram in this scenario, we will have the red color when prices are below the moving average, while the green color will be above.

Input: 
MA_length(20), 
MA_histo(1);

vars: 
MA(0), 
color(white);

MA = average(Close, MA_length);

If Close>MA
color=Green;

If Close<MA then
color=Red;

Plot1( MA_histo, “MA”,color,0,3 );

Do you want to learn EasyLanguage & PowerLanguage for TradeStation and MultiCharts? Start here:

You can find many Indicator in the TradeStation TradingApp Store

tradestation TradingApp Store