The fnDrawText is used to draw a label containing text on a price chart. It is positioned by price and candle.


After the fnDrawText function has been added to a Drawing, it is configured by clicking the (+) button along the bottom of the Element.


The Function Configuration window allows you to select values for each parameter.


Each Chart Object function offers a number of parameters on the Configuration Tab, and also a number of parameters on the Advanced Tab.




Parameters on the Configuration Tab


Parameter Name


Data type

Description

name

String

The name of the object. Each object on a chart must have a unique name.

Note: String parameters require enclosing quotes. Objects names can viewed from the MetaTrader platform by going to:

Charts->Objects->Object List

text

String

The text to be written on the chart.

Note: String parameters require enclosing quotes

shift

Integer

The candle shift used to position the object's vertical location on the price chart.

price

Double

The price value used to position the object's horizontal location on the price chart.

fontColor

Color

The color of the font.








Parameters on the Advanced Tab


Parameter Name


Data type

Description

redraw

Integer

The interval when to redraw the object. The pull-down menu offers these choices:

REDRAW_ONCE: draw the object once only.

REDRAW_BAR: redraw the object on each new bar.

REDRAW_TICK: redraw the object on each new tick.

Note: The object function must be connected on the drawing so that it executes on each tick for the redraw options to work correctly.


Objects that use the shift parameter will move on the chart as new candles are formed.

fontSize

Integer

The size of the font.

font

String

The name of the font.

chartID

Integer

The chart identifier. Use 0 for the current chart.

windowID

Integer

The window identifier. Use 0 for the current window.





Related Topics:
What is VTS
System Requirements
Installing VTS
Main Menu
Toolbox FUNCTIONS Pane
Expert Advisor Facts
Configure
PLATFORM Function
Custom Indicators
TRADETIME Manager
COMMUNICATION Manager
Message
Logic
MetaTrader Platform Configuration
Compiler
Compiler Flags
Platform
Editor
EA Output Folder
Custom Indicator Folder
fnOpenOrder
fnModifyOrder
fnCloseOrder
MetaTrader Platform
Journal Tab
Experts Tab
Expert Menu
MQL Help
Trade Tab
ECN Brokers
Logic
Candlestick Function Parameters
Candlestick Drawing
Using Easy Email with the fnSendEzEmail Function
Testing the Easy Email Connection
Objects on the MetaTrader platform
Manually drawing a trend line
Removing a trend line
Building an Expert Advisor to draw and manage a trend line
Script & Multi-Platform Plug-in
Building a MetaTrader Script
Using the Multi-Platform Feature
Client-Side Stops Plug-in
Emergency Stops
Using Client-Side Stops
Objects on the MetaTrader Platform
Manually Drawing a Fibonacci Retracement
Removing a Fibonacci Retracement
Building an Expert Advisor to draw and manage a Fibonacci retracement
Signal Type: Element
Signal Type: Logic Condition
Using the Code Block Feature
EA-Indicator Price Chart
EA-Indicator Video
Chart Objects Plug-in
fnDrawHorizontalLine
fnDrawVerticalLine
fnDrawArrow
fnDrawThumb
fnDrawLabel
fnDrawCheckSign
fnDrawStopSign
Chart Objects on a MetaTrader Price chart
Adding Symbols
EA Secure Configuration
Chart Execute Plug-in
Chart Execute Configuration
Chart Execute on Price Chart
Using Chart Execute
Chart Execute Notes
Pivot Points on a MetaTrader Price Chart
fnFileRead
fnFileWrite
fnDeleteFile
Multi Trade on a MetaTrader Price Chart
Using the Debug Manager Plug-in
MQL Event Documentation