Changing bars to show distribution of price

Fernando Carreiro  
EbrahimiKhoy: Is it possible to write code to show the distribution of price in each bar by changing its candle? I am not interested in candle start and candle close, rather in 2sigma of distribution. Therefore, I want to redraw the candles and replace the bar high and low with 2 sigmas

Yes, you can make an indicator to show different bar/candle representations.

The most well known example of such would be the Heikin Ashi.

Have a look at the following source code, for an ideia of how to do it ...

Code Base

Dōteki Heikin Ashi (Dynamic Average Foot/Bar)

Fernando Carreiro, 2018.10.15 17:33

A dynamic version of the standard Heikin Ashi indicator (code compatible with both MQL4 or MQL5).
Reason: