HedgingEA_CodersGuru

Author: Coders Guru
Profit factor:
0.00
Orders Execution
Checks for the total of open ordersIt automatically opens orders when conditions are reached
1 Views
0 Downloads
0 Favorites
HedgingEA_CodersGuru


//|                                                      Hedging.mq4 |
//|                                                      Coders Guru |
//|                                         http://www.forex-tsd.com |
//+------------------------------------------------------------------+
#property copyright "Coders Guru"
#property link      "http://www.forex-tsd.com"
extern string Sym_1 = "EURUSD";
extern string Sym_2 = "USDCHF";
extern double Lots = 1;
extern int Slippage = 5;
bool Sell = true; 
//+------------------------------------------------------------------+
int start(){   
int cnt,total;    
if(Bars<100) {Print("bars less than 100"); return(0);}    
total = OrdersTotal();     
if(total < 1)   {      
if(Sell==0)      {         
RefreshRates();         
OrderSend(Sym_1,OP_BUY,Lots,MarketInfo(Sym_1,MODE_ASK),Slippage,0,MarketInfo(Sym_1,MODE_ASK)+1000*Point,"Hedging",1234,0,Green);         
RefreshRates();         
OrderSend(Sym_2,OP_BUY,Lots,MarketInfo(Sym_2,MODE_ASK),Slippage,0,MarketInfo(Sym_2,MODE_ASK)+1000*Point,"Hedging",1234,0,Green);      
}      else      {         
RefreshRates();         
OrderSend(Sym_1,OP_SELL,Lots,MarketInfo(Sym_1,MODE_BID),Slippage,0,MarketInfo(Sym_1,MODE_BID)-1000*Point,"Hedging",1234,0,Red);         
RefreshRates();         
OrderSend(Sym_2,OP_SELL,Lots,MarketInfo(Sym_2,MODE_BID),Slippage,0,MarketInfo(Sym_2,MODE_BID)-1000*Point,"Hedging",1234,0,Red);      
}      return(0);   
}   return(0);
}

Profitability Reports

USD/CAD Oct 2024 - Jan 2025
0.00
Total Trades 0
Won Trades 0
Lost trades 0
Win Rate 0.0 %
Expected payoff 0.00
Gross Profit 0.00
Gross Loss 0.00
Total Net Profit 0.00
-100%
-50%
0%
50%
100%
NZD/USD Oct 2024 - Jan 2025
0.00
Total Trades 0
Won Trades 0
Lost trades 0
Win Rate 0.0 %
Expected payoff 0.00
Gross Profit 0.00
Gross Loss 0.00
Total Net Profit 0.00
-100%
-50%
0%
50%
100%
GBP/USD Oct 2024 - Jan 2025
0.00
Total Trades 0
Won Trades 0
Lost trades 0
Win Rate 0.0 %
Expected payoff 0.00
Gross Profit 0.00
Gross Loss 0.00
Total Net Profit 0.00
-100%
-50%
0%
50%
100%
AUD/USD Oct 2024 - Jan 2025
0.00
Total Trades 0
Won Trades 0
Lost trades 0
Win Rate 0.0 %
Expected payoff 0.00
Gross Profit 0.00
Gross Loss 0.00
Total Net Profit 0.00
-100%
-50%
0%
50%
100%

Comments