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

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

author EAcpu | 2 reads | 0 comments |

DRAW_LINE - indicator for MetaTrader 5

The indicator plots the bar's opening price as a line.

Line color, width, and style change randomly every N=5 ticks. Line width, color, and style can be determined using preprocessor directives or using the PlotIndexSetInteger() function. Dynamic changes in line properties allow the creation of "real-time" indicators that change based on the current status. Only one data buffer is required to draw the line style.

The initial properties of the plot1 graph are defined using the #property preprocessor directive, further these properties are randomly changed ( OnCalculate() function). The N variable is defined as an input parameter and can be changed using the Properties window.

See also: Drawing styles in MQL5 .

DRAW_LINE - indicator for MetaTrader 5


Attachment download

📎 draw_line.mq5 (4.38 KB)

Source: MQL5 #330

Verification code Refresh