Candlestick Function Parameters


After a Candlestick 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.


All Candlestick functions have the parameters Symbol, Timeframe and Shift.


Parameter Name

Data type

Description

Symbol

String

The symbol of the currency to search for the pattern, such as EURUSD, USDJPY, etc.

Timeframe

Integer

The timeframe of the currency to search for the pattern. MetaTrader supports values from 1 minute (PERIOD_M1) to 1 month (PERIOD_MN1).

Shift

Integer

The candle index at which to start searching for the pattern.  Zero starts at the currently forming candle, one starts at one candle to the left, etc.


Candlestick functions that use the terms "long" or "short" have the additional parameters longbody and shortbody.


Parameter Name

Data type

Description

longbody

double

The minimum value of a candle body to be determined as long.

shortbody

double

The maximum value of a candle body to be determined as short.



If the value of longbody is left as 0 (the default value), the candle function will automatically calculate the minimum longbody value as 2 times the 4-period ATR (average true range) for the given symbol and timeframe:

2 * iATR( symbol, timeframe, shift )



If the value of shortbody is left as 0 (the default value), the candle function will automatically calculate the maximum shortbody value as the 4-period ATR (average true range) for the given symbol and timeframe:

iATR( symbol, timeframe, shift )


The longbody and shortbody parameters can be set to any value using any combination of arithmetic and/or MetaTrader platform functions.


This is the candle function configuration window for the Bearish Harami candlestick pattern:.






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