Many people do not like to have the chart flooded with lines, drawings, indicators.

They prefer to see the price without much confusion.

Let’s take a simple example of a moving average from this link and see how to transform a moving average into a histogram.

how to transform tradestation indicator into histogram

Let’s Start!

First of all, we modify the Tradestation code in this way:

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

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

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 algorithm continues to calculate the moving average, but the command Plot1 instead of drawing the line with the value of the average price will draw the fixed amount “1”.
This happens because with this indicator we are interested only in seeing the color that changes when the average is descending or ascending (red and green).

Some indicator settings must also be changed in Tradestation:

 

Input  to transform tradestation indicator into histogram

Input  to transform tradestation indicator into histogram

This will be the final result:

tradestation histogram mode indicator

A very clean graph and the possibility of inserting infinite histogram indicators and even entry or exit signals.