Indicators: Bullish and Bearish Candles

 

Bullish and Bearish Candles:

This Indicator will plot bullish and bearish candles in separate colors.

Bullish and Bearish Candles

Author: Satyam Shivam

 

Why would anyone use this when it's easy to make red and green candles using the chart properties in MT4?

They look a lot better as well...

 

You are very right that by changing properties you can get better looking candles. 

However, you need to do this manually every time. Using this code it can be done automatically every time. 

Also the colors and other setting can be easily changed in the code, so you can have even more beautiful candles.

The code demonstrating creating candles using histogram. 

in the snapshot, you can have the default candles as well and the histograms which are drawn on top of the candles with colour. Both are visible at the same time. 

So, basically there are multiple small small reason to use this approach. 

 


Another important reason is when you want to become a data provider and you have missing data points in your data set. At that point you can either manually enter the data in your data set, thereby making your data set dirty.

or simply plot the data on chart using histogram without dirtying the data. The user will be well informed in this case.  

 
Satyam Shivam #:

You are very right that by changing properties you can get better looking candles. 

However, you need to do this manually every time. Using this code it can be done automatically every time. 

Also the colors and other setting can be easily changed in the code, so you can have even more beautiful candles.

The code demonstrating creating candles using histogram. 

in the snapshot, you can have the default candles as well and the histograms which are drawn on top of the candles with colour. Both are visible at the same time. 

So, basically there are multiple small small reason to use this approach. 

If you save the template as "default.tpl", the chart will open with the settings you saved automatically.
 
Alexandre Borela #:
If you save the template as "default.tpl", the chart will open with the settings you saved automatically.

yes sir, you are absolutely right. Thank you for your input.

but that is a manual process, not an automated process.

The creation and saving of tpl and then attachment of tpl to a chart can also be done programatically, but that is a very lengthy coding. 

 
Satyam Shivam #:

yes sir, you are absolutely right. Thank you for your input.

but that is a manual process, not an automated process.

The creation and saving of tpl and then attachment of tpl to a chart can also be done programatically, but that is a very lengthy coding. 

But you only do it once, after that, every chart you open is already configured with the settings you saved
and it also saves any indicators added.

Your solution does not automate anything, since not only you would need to attach your indicator for each
new chart opened, it does not do anything to the background, foreground, bid, ask line colors... it is not
easier than just configure the chart and save the template as "default.tpl".

 
Whats the point of this? Why would anyone keep bullish and bearish candles in same color? Doesnt any of the default templates already plot the candle colors? white black? Or am i missing something here?