Author: Shevss
Orders Execution
Checks for the total of open orders
Indicators Used
Bill Williams Accelerator/Decelerator oscillator
0 Views
0 Downloads
0 Favorites

Profitability Reports

AUD/USD Oct 2024 - Jan 2025
49.00 %
Total Trades 90
Won Trades 0
Lost trades 0
Win Rate 0.00 %
Expected payoff -1.73
Gross Profit 151.20
Gross Loss -307.20
Total Net Profit -156.00
-100%
-50%
0%
50%
100%
GBP/USD Oct 2024 - Jan 2025
64.00 %
Total Trades 66
Won Trades 38
Lost trades 28
Win Rate 0.58 %
Expected payoff -1.04
Gross Profit 121.60
Gross Loss -190.40
Total Net Profit -68.80
-100%
-50%
0%
50%
100%
RAVI+AO

#property copyright "Shevss"
#property link      "http://www.metaquotes.net"


extern int       per1=12;
extern int       per2=72;
extern double       uroven=0.3;
extern int tp=50;
extern int sl=50;
extern double lot=0.1;

double q1,q2,slb,sls,tpb,tps,ac1,ac2,ac0;

bool New_Bar;
int kup, prod, order;

int start()
  {

if (OrdersTotal()==1)
return;


New_Bar=false ;
Fun_New_Bar();  //                                                
if (New_Bar==false) 
return;
//___________________________________________________________________

q1= iCustom (NULL,0,"Ravi",per1,per2,0,1) ; 
q2= iCustom (NULL,0,"Ravi",per1,per2,0,2) ; 
ac1=iAC(NULL, 0 ,1);
ac2 =iAC(NULL, 0 ,2);
ac0 =iAC(NULL, 0 ,0);




//____________________________________________________________________

slb=Bid-sl*Point ; sls=Ask+sl*Point; tpb= Bid+tp*Point; tps= Ask-tp*Point;

//____________________________________________________________________
if   (   ac1>ac2 && ac2>0 && q1>q2 && q1> uroven )                                    
   {
       order =  OrderSend ( Symbol(), 0, lot, Ask, 3,slb,tpb );
   }
if (  ac1<ac2 && ac2<0 &&  q1<q2 && q1< -uroven   )                                      
   {
       order =  OrderSend ( Symbol(), 1, lot, Bid, 3,sls,tps);
    
   }
   return(0);
  }
//+------------------------------------------------------------------+


void Fun_New_Bar()
{

 static datetime New_Time=0;
 New_Bar=false;
 if(New_Time!=Time[0])
       {
        New_Time=Time[0];
        New_Bar=true; 
       }
}
//______________________________________________________


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