Author: Copyright 2011, Alexander Piechotta
0 Views
0 Downloads
0 Favorites
Example_1
//+------------------------------------------------------------------+
//|                                                    Example 1.mq5 |
//|                              Copyright 2011, Alexander Piechotta |
//|                                        http://www.metatraders.de |
//+------------------------------------------------------------------+
#property copyright "Copyright 2011, Alexander Piechotta"
#property link      "http://www.metatraders.de"
#property version   "1.00"

#include <MyComment.mqh>

MyComment AddComment;
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- create timer

   EventSetTimer(2);
   AddComment.Add_MyComment("initialization...");
//---
   return(0);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//--- destroy timer
   EventKillTimer();

  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---

  }
//+------------------------------------------------------------------+
//| Timer function                                                   |
//+------------------------------------------------------------------+
void OnTimer()
  {

   AddComment.chartID=ChartID();           // use current chart
   AddComment.SHOW_CurrentLocalTime=false; // show CurrentLocalTime OFF
   AddComment.SHOW_MQL5ProgramName=false;  // show MQL5ProgramName OFF

   AddComment.Add_MyComment("Greetings from Germany.");
  }
//+------------------------------------------------------------------+

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 ---