1. Home
  2. Ofir Notify
  3. Customization

Customization

Ofir Notify enables to customize the alerts sent to Chats or Channel.
This is based on using text files as templates.

TemplateEventResult
Notify.txtOrder opened
Order modified
Order closed
Channel.txtOrder opened

By default, we provide basic templates that you can change with any text editor.

Example of a customization

\x2714 TRADE CLOSED ID=#ticket#
#itype# #type#: #symbol#
\xF4CF Lots: #lots#
\xF4B2 Entry price: #price#
-------------------
\x2705 Close price: #closedprice#
\xF3C6 WIN: #profit%#
\xF4B0 Profit: #profit# (#profitpips# pips)
-------------------
\x2764\xF4B5CONGRATULATION \xF4B5\x2764
\xF64F [Web Site](www.autotrade-gold.fr)

Provided templates

  • Notify.txt, for alerts sent to Chats
  • Channel.txt for alerts sent to Channels
  • Icons.json, default set of icons used in alerts.

Those files should be placed on the directory : MQL4\Files\Ofir\docs\ (or MQL5 if using MT5). Directory can be found by selecting File\Open data folder in Metatrader menu.
You can change those files.
You can also create new templates for specific events.

For ChatsNotify.txt is the template by default.

  • Create NotifyOpen.txt to be used when a trade is opened
  • Create NotifyClosed.txt to be used when a trade is closed
    • If you need a specific template for profit trades, create NotifyClosedWin.txt
    • If you need a specific template for loss trades, create NotifyClosedLoss.txt
  • Create NotifyModifed.txt to be used when a trade is modified (StopLoss, TakeProfit or Entry price)

For ChannelsChannel.txt is the template by default.

  • Create ChannelOpen.txt to be used when a trade is opened
  • Create ChannelClosed.txt to be used when a trade is closed
    • If you need a specific template for profit trades, create ChannelClosedWin.txt
    • If you need a specific template for loss trades, create ChannelClosedLoss.txt
  • Create ChannelModifed.txt to be used when a trade is modified (StopLoss, TakeProfit or Entry price)

How to modify a template

For example, Notify.txt

#ievent# #flag##symbol# /#ticket# #itype##type# #lots# lots *#profit#* (#profit%#)
*_#event#_*
SL=#sl# TP=#tp#
Risk=*#risk#* Reward=*#reward#*
List of keywords to be used in template files
KeywordDescriptionExample
#ticket#Order ticket numer123456789
#symbol#Order symbolEURUSD
#comment#Order commentOfir UEA (created by Ofir Universal EA)
#flag#Order symbol flag
#type#Order typeBUY
#itype#icon for Order typel
#lots#Order Lots0.55
#profit#Order profit10.23 €
#profit%#Order profit in % of equity0.5%
#profitpips#Order profit in pips10
#price#Order open price1.19805
#closedprice#Order closed price1.19850
#opentime#Order open time2021.12.24 11:10
#closetime#Order close time2021.12.24 11:30
#sl#Order Stop Loss1.19750
#tp#Order Take Profit1.19805
#slpips#Order Stop Loss in pips10
#tppips#Order Take Profit in pips20
#risk#Order Risk-15€
#risk%#Order Risk in percentage of equity-1.2%
#reward#Order Reward30.00€
#event#Event which send the alert (Open, Closed, Modified)Open
#ievent#Event’s Icon
#equity#Account equity1023 €
#period#TimeFrameM5

In addition, to these keywords, you can use emojis in template.

You can access the site Full Emoji List to find the icon your are looking for. Once you find the icon (for example a Dog Face, which code is “1F431”), put in template \xAAAA where AAAA are the last four digits of the icon’s code.

Articles

How can we help?