TradeNotifications_Example

Author: No Copyright 2024
0 Views
0 Downloads
0 Favorites
TradeNotifications_Example
//+------------------------------------------------------------------+
//|                                           TradeNotifications.mq5 |
//|                                                No Copyright 2024 |
//|                                               mstrkidd@proton.me |
//+------------------------------------------------------------------+
#property copyright "No Copyright 2024"
#property link      "mstrkidd@proton.me"
#property version   "1.00"

#include <TradeNotifications.mqh>

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---
   
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---
   
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//--- Send notifications for trades opening and closing
   SendPushNotification(true,true);

//--- Send notifications for trades opening, not closing
   SendPushNotification(true,false);
   
//--- Send notifications for trades closing, not opening
   SendPushNotification(false,true);
   
//--- Send notifications for neither opening or closing trades
   SendPushNotification(false,false);
  }
//+------------------------------------------------------------------+

Comments

Markdown supported. Formatting help

Markdown Formatting Guide

Element Markdown Syntax
Heading # H1
## H2
### H3
Bold **bold text**
Italic *italicized text*
Link [title](https://www.example.com)
Image ![alt text](image.jpg)
Code `code`
Code Block ```
code block
```
Quote > blockquote
Unordered List - Item 1
- Item 2
Ordered List 1. First item
2. Second item
Horizontal Rule ---