Custom Indicators




       







Custom Indicators





Using a Custom Indicator The ZigZag Example










The Indicator Configuration window for the ZigZag indicator shows three input variables: ExtDepth, ExtDeviation and ExtBackstep.

The data type of all three variables is Integer, as identified by the 123 symbol to the far left.

The default value for ExtDepth is 12.

The default value for ExtDeviation is 5.

The default value for ExtBackstep is 3.

To add an input variable, select the Add Input Variable button.

Return to the Custom Indicator Definition window and select the Add Input Variable button. The Custom Indicator Input Definition window will be shown.







Note: If a mistake was made when entering any of the values, select the (i) button from the bottom of the ZigZag element to return to the Custom Indicator Definition window.


Appendix: The iCustom MQL Function


The information for the iCustom function is in the following table.

double iCustom(string symbol, int timeframe, string name, ..., int mode, int shift)

Calculates the specified custom indicator and returns its value. The custom indicator must be compiled (*.EX4 file) and be in the

terminal_directory\experts\indicators directory.

Parameters:

symbol - Symbol the data of which should be used to calculate indicator. NULL means current symbol.

timeframe - Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

name - Custom indicator compiled program name.

... - Parameters set (if necessary). The passed parameters and their order must correspond with the

desclaration order and the type of extern variables of the custom indicator.

mode - Line index. Can be from 0 to 7 and must correspond with the index used by one of SetIndexBuffer

functions.

shift - Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of

periods ago).

Sample:

double val=iCustom(NULL, 0, "SampleInd",13,1,0);








Related Topics:
What is VTS
Why use VTS
System Requirements
Installing VTS
Main Menu
Toolbox FUNCTIONS Pane
Everything You Need To Know About VTS
Expert Advisor Facts
Configure
Configure
PLATFORM Function
MQL Function
TEXT Element
INPUT Manager
TRADETIME Manager
TRADESIGNAL Manager
COMMUNICATION Manager
OPENTRADE Manager
Message
Logic
Options
MetaTrader Platform Configuration
Compiler
Compiler Flags
Platform
Editor
EA Output Folder
Custom Indicator Folder
Package
Special Functions
fnOpenOrder
fnModifyOrder
fnCloseOrder
init and deinit
Getting Started
MetaTrader Platform
Journal Tab
Experts Tab
Expert Menu
MQL Help
Trade Tab
ECN Brokers
Step 2
Function and Logic Power Plug-in
Logic
Candlestick Plug-in
Candlestick Function Parameters
Candlestick Drawing
Using a Candlestick Function in a Logic Element
Easy Email Plug-in
Configure Easy Email Settings
Using Easy Email from the Communication Manager
Using Easy Email from any Element
Using Easy Email with the fnSendEzEmail Function
Testing the Easy Email Connection
TrendLine Plug-in
Objects on the MetaTrader platform
Manually drawing a trend line
Removing a trend line
Building an Expert Advisor to manage a manually drawn trend line
Building an Expert Advisor to draw and manage a trend line
Grid Plug-in
FX PowerGrid Functions
Grid Main Settings
fnRemoveLines
Using FX PowerGrid
Script & Multi-Platform Plug-in
Building a MetaTrader Script
Using the Multi-Platform Feature
Profit Exits Plug-in
Profit Manager Plug-in
Target
Action
Price Chart
Client-Side Stops Plug-in
Emergency Stops
Using Client-Side Stops
Fibonacci Trader Plug-in
Objects on the MetaTrader Platform
Manually Drawing a Fibonacci Retracement
Removing a Fibonacci Retracement
Building an Expert Advisor to manage a manually drawn Fibonacci retracement
Building an Expert Advisor to draw and manage a Fibonacci retracement
Signal Aggregator Plug-in
Signal Type: Element
Signal Type: MQL
Signal Type: Logic Condition
MQL-Mentor Plug-in
Using the Code Block Feature
Partial-Close Plug-in
Partial-Close Price Chart
EA-Indicator Plug-in
Using the EA-Indicator Plug-in
Custom Indicators in the Toolbox
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
Market Score Plug-in
Adding Symbols
Order History Plug-in
EA Secure Plug-in
EA Secure Configuration
Chart Execute Plug-in
Chart Execute Configuration
Chart Execute on Price Chart
Using Chart Execute
Chart Execute Notes
Money Manager Plug-in
Money Manager Configuration
Money Management Table
Package Plug-in
Pivot Points Plug-in
Using the Pivot Point Plug-in
Pivot Points on a MetaTrader Price Chart
File IO Plug-in
fnFileRead
fnFileWrite
fnDeleteFile
Multi Trade Plug-in
Multi Trade on a MetaTrader Price Chart
Debug Manager Plug-in
Using the Debug Manager Plug-in
Event Manager Plug-in
MQL Event Documentation