Author: Copyright � 2006, Renato P. dos Santos
Orders Execution
It automatically opens orders when conditions are reached
0 Views
0 Downloads
0 Favorites
FXAnt
//+------------------------------------------------------------------+
//|                                                        FXAnt.mq4 |
//|                           Copyright © 2006, Renato P. dos Santos |
//|                                            http://www.reniza.com |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, Renato P. dos Santos"
#property link      "http://www.reniza.com"

void deinit() {
   Comment("");
}

int start()
  {
   if (Period() < 30) {Comment("change to M30 or higher pls"); return(0); }
   if (MathMod(Minute(),Period()) >= 0.5*Period()) return(0);

   if ((High[0]-Low[0])>10*Point && Open[0]<(High[0]+Low[0])/2 && Ask < Open[0])
   OrderSend(Symbol(),OP_BUY,0.1,Ask,2,Ask-30*Point,Ask+20*Point,"FXAnt",0,0,Blue); 
   if ((High[0]-Low[0])>10*Point && Open[0]>(High[0]+Low[0])/2 && Bid > Open[0])
   OrderSend(Symbol(),OP_SELL,0.1,Bid,2,Bid+30*Point,Bid-20*Point,"FXAnt",0,0,Red); 
   return(0);
  }

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