Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

DRAW_HISTOGRAM2 - MetaTrader 5 Script | Forex Indicator Download - MT4/MT5 Resources

author EAcpu | 5 reads | 0 comments |

DRAW_HISTOGRAM2 - indicator for MetaTrader 5

The indicator plots the vertical portion of each bar between the open and close prices.

The DRAW_HISTOGRAM2 drawing style can be used for drawing in separate windows and in the main chart window. It will not plot null values, null indicator values ​​must be specified explicitly. Two data buffers are required for DRAW_HISTOGRAM2 style.

The histogram's color, width, and style change randomly every N ticks. In the OnInit() function, which selects a day of the week (invisible_day), the indicator value of the bar of that week will be filled with empty values ​​(PLOT_EMPTY_VALUE=0):

 //--- define null value
Plot index setting double (plot_index_DRAW_SECTION, PLOT_EMPTY_VALUE , 0 );

The initial properties of the plot1 graph are defined using the #property preprocessor directive, further these properties are randomly changed ( OnCalculate() function).

DRAW_HISTOGRAM2 - indicator for MetaTrader 5


Attachment download

📎 draw_histogram2.mq5 (4.86 KB)

Source: MQL5 #333

Verification code Refresh