Orders Execution
It automatically opens orders when conditions are reached
Indicators Used
Moving average indicator
0 Views
0 Downloads
0 Favorites
MA Reverse

int count;
//--------------------------------------------------------------------
int start()                        
  {
   double MA;                        
//--------------------------------------------------------------------
                                     
   MA=iMA(NULL,0,14,0,MODE_SMA,PRICE_CLOSE,0); 
//--------------------------------------------------------------------

 
 if (Bid==MA)
count=0;  
 if (Bid-MA>0)             
 count+=1;       
if (count==150 && Bid-MA>0.004)    

OrderSend(Symbol(),OP_SELL,1.0,Bid,3,0,Bid-30*Point); 
if (count>0 && Bid-MA<0)
count=0;

if (count<0 && Bid-MA>0)
count=0;


if (Bid-MA<0)
count-=1;
if (count==-150 && Bid-MA<-0.004)
 OrderSend(Symbol(),OP_BUY,1.0,Ask,3,0,Bid+30*Point);


 

  
   
  
   return;                           
  }

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