Candlestick Drawing


The Candlestick functions were created as Drawing functions.


To open the drawing of any Candlestick function, drag the function from the Toolbox onto the Drawing Pad and double-click the Element in the caption area.


Each candlestick drawing contains the same Elements:


The first row of Elements contains the Parameter Variables.  These are the values that appear when you select the (+) button on the Candlestick function Element.  These values are referenced through the rest of the drawing.  For example, the Symbol and Timeframe values are used in the Price functions.


The second row of Elements contains the price functions that are used in the Logic Element to identify the candlestick pattern.  The number of price functions will vary depending on the pattern. In general, the open, close, high and low price values will be need for a number of different candles consecutive candles, where the index of the candle is determined by the shift value.


The Logic Element is connected after the price functions. The Logic Element will contain many logical conditions. These conditions represent the definition of the candle pattern.  For example, a Bear candle is defined as a candle that closed lower than it opened. (A bear candle is usually colored black or red on a price chart).  This definition is logically expressed as Close < Open  (The Close is less-then the open).  The conditions with the logic will use price values that already considered the Symbol, Timeframe and Shift.


The drawing terminates with a True or False Element.  If the Logic Element resolves to True, meaning the pattern has been recognized, then the drawing will terminate with a value of True.  Otherwise the drawing will terminate with a value of False.


Note: Candlestick patterns that use the phrase long or short define two additional Parameters and two MQL Elements to calculate the values of long or short named getlongbody and getshortbody, respectively.  The MQL Elements are found on the first line, connected after the parameter Elements.







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
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
fnDrawText
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