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 Formatting Guide
# H1
## H2
### H3
**bold text**
*italicized text*
[title](https://www.example.com)

`code`
```
code block
```
> blockquote
- Item 1
- Item 2
1. First item
2. Second item
---