Using the Event Manager Plug-in


The Event Manager Plug-in allows any VTS function to be executed when an event occurs. Events include when an EA starts, when an EA stops, when a timer expires and many Chart events, such as mouse clicks and object creation.

Event Manager configuration is found on the "Event" tab of all Functions.


All VTS Elements are configured by clicking the (+) on the bottom of the Element.


Clicking the (+) opens the Function configuration window. Note the "Event" tab.



Clicking the"Event" tab opens the Event Configuration:




The Event configuration window options are:


Event


Description

OnInit

When OnInit is checked, the function will execute when the EA is attached to a chart and whenever the EA's input parameters are reconfigured.


OnDeInit

When OnDeInit is checked, the function will execute when the EA is removed from a chart.


OnTimer

When OnTimer is checked, the function will execute every N seconds Note, the seconds value is global and is the same for functions of the EA.


OnChartEvent

When OnChartEvent is checked, the function will execute when certain Chart Events occur. The Chart Events are listed below.




Chart Events supported by the VTS EA-Builder



Event


Description

CHARTEVENT_KEYDOWN

event of a keystroke, when the chart window is focused;


CHARTEVENT_MOUSE_MOVE

mouse move events and mouse click events (if CHART_EVENT_MOUSE_MOVE=true is set for the chart);


CHARTEVENT_OBJECT_CREATE

event of graphical object creation (if CHART_EVENT_OBJECT_CREATE=true is set for the chart);


CHARTEVENT_OBJECT_CHANGE

event of change of an object property via the properties dialog;


CHARTEVENT_OBJECT_DELETE

event of graphical object deletion (if CHART_EVENT_OBJECT_DELETE=true is set for the chart);


CHARTEVENT_CLICK

event of a mouse click on the chart;


CHARTEVENT_OBJECT_CLICK

event of a mouse click in a graphical object belonging to the chart;


CHARTEVENT_OBJECT_DRAG

event of a graphical object move using the mouse;


CHARTEVENT_OBJECT_ENDEDIT

event of the finished text editing in the entry box of the LabelEdit graphical object;


CHARTEVENT_CHART_CHANGE

event of chart changes;




Related Topics:
Property Window
Welcome Screen
Assignment
Condition
TRADESIGNAL Manager
COMMUNICATION Manager
Message
Logic
MetaTrader Platform Configuration
Compiler
Compiler Flags
Platform
Editor
EA Output Folder
Custom Indicator Folder
License
fnOpenOrder
init and deinit
Journal Tab
Experts Tab
Step 1
Step 2
Step 4
Logic
Using Easy Email from the Communication Manager
Using Easy Email from any Element
Testing the Easy Email Connection
Using FX PowerGrid
Using the Exit Plug-in
Using the Profit Manager
Using Client-Side Stops
Using an Offset Value
Using an Absolute Price Value
Building an Expert Advisor to draw and manage a Fibonacci retracement
Configuring the Weight and Threshold
EA-Indicator Plug-in
Enable the EA-Indicator Plug-in
Using the EA-Indicator Plug-in
Custom Indicators in the Toolbox
EA-Indicator Price Chart
EA-Indicator Video
EA Secure Plug-in
Enbale the EA Secure Plug-in
EA Secure Plug-in System Manager
EA Secure Configuration
EA Secure on Price Charts
Chart Execute Plug-in
Chart Execute on Price Chart
Using Chart Execute
Chart Execute Notes
Money Manager Plug-in
Money Management Table
Package Plug-in
Load a Package
fnRemoveAllPivots
Using the Multi Trade Plug-in
Using the Debug Manager Plug-in
Debug Manager Plug-in on a VTS Drawing
Event Manager Plug-in
MQL Event Documentation