Script EventsOfOrders
The description of actions:
The script generate an alert at event of order. The script to watch the following events: to open the new order, to execute the pending order, to delete the pending order, to close the order by the market, to close the order by stop-loss, to close the order by take-profit. At event of order, the script can to generate a pop-up window "Alerts", to play a sound file or to send e-mail.
Assignment:
The script allow to inform the trader about trading events.
Parameters:
Event_OpenOrder = event "to open the new order"; true - watch event, false - does not watch event.
Event_ExecutePendingOrder = event "to execute the pending order"; true - watch event, false - does not watch event.
Event_DeletePendingOrder = event "to delete the pending order"; true - watch event, false - does not watch event.
Event_CloseByMarket = event "to close the order by the market"; true - watch event, false - does not watch event.
Event_CloseByStopLoss = event "to close the order by stop-loss"; true - watch event, false - does not watch event.
Event_CloseByTakeProfit = event "to close the order by take-profit"; true - watch event, false - does not watch event.
MagicNumber = "magic" number of orders that manage by script; value "-1" - manage all orders, 0 - manage manual orders.
AllSymbols = the option "manage orders at all currency pairs"; true - manage orders at all currency pairs, false - manage orders, that have same currency pair as chart when script is run.
UseAlert_PopUpWindow = enable/disable to create Alert (popup-window) at event of order.
UseAlert_PlaySoundFile = enable/disable to play sound-file at event of order.
SoundFile = the name of sound-file, that will play at event of order.
UseAlert_SendEmail = enable/disable to send a e-mail at event of order.
ShowComment = the option "show settings at chart comment"; true - show comment at chart, false - not show comment at chart.
delay = frequency of a check up status of orders. It is set in milliseconds, for example value 5000 means periodicity of 5 seconds. It is necessary to remember, that too often periodicity can brake the terminal.
The status: Free-of-charge, it is possible to download the full version.
Platform: MetaTrader 4.
![To download the similar files](images/edla1.gif)
See also these scripts:
![OneCancelOther](images/o1.gif)
- the system of two pending orders: "one cancels other".
![OpenAfterExecute](images/oae1.gif)
- the system of two orders: "one opens other".
![SystemTwoOrders](images/st1.gif)
- the universal system of two orders: "one closes other".
Frequently asked questions:
How I can run a script ?
How I can determine that the script works ?
How I can assign "hot key" for start of a script ?
|