Author: Copyright � 2005, MetaQuotes Software Corp.
Feedback
Miscellaneous
It sends emails
0 Views
0 Downloads
0 Favorites
Feedback
/*-----------------------------+
|			       |
| Shared by www.Aptrafx.com    |
|			       |
+------------------------------*/

#property copyright "Copyright © 2005, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

extern int       Order;
extern int       Max;
extern int       Min;
int isMax,isMin;

int init(){return(0);}
int deinit(){return(0);}
int start() {

OrderSelect(Order, SELECT_BY_TICKET);
int p=OrderProfit();

  if(p>=Max && isMax==0) {
     isMax=1;
     SendMail(OrderSymbol()+" maximum reached: "+p,"");
   }
   
  if(p<=Min && isMin==0) {
     SendMail(OrderSymbol()+" minimum reached: "+p,"");
     isMin=1;
  }
}

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