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