Break 1mn[1]modified

Author: Copyright � 2008 Gryb Alexander
Profit factor:
0.02
Orders Execution
Checks for the total of open ordersIt automatically opens orders when conditions are reached
2 Views
0 Downloads
0 Favorites
Break 1mn[1]modified
//+------------------------------------------------------------------+
//|                                                    neroTrade.mq4 |
//|                                  Copyright © 2008 Gryb Alexander |
//|           last modified: 19 november 2008. Totom (totom@nsk.com) |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2008 Gryb Alexander"
#property link      ""

extern double TP = 15;
extern double SL = 15; //add this (stoploss value)
extern double lots = 1;

int slippage = 3;

datetime curTime;
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
//----
//   if((Time[0]!=curTime))
//     {   
//      curTime=Time[0];
   
   if(OrdersTotal()==0)
   {
     if(Close[0]>High[1])  OrderSend(Symbol(),OP_BUY,lots,Ask,slippage,Ask-SL*Point,Ask+TP*Point,NULL,123,0,Red); //add SL in order send function  
     if(Close[0]<Low[1])   OrderSend(Symbol(),OP_SELL,lots,Bid,slippage,Bid+SL*Point,Bid-TP*Point,NULL, 123,0,Blue); //add SL in ordersend function and fix code of TP
   }
  

//----
   return(0);
  }
//+------------------------------------------------------------------+

Profitability Reports

GBP/USD Oct 2024 - Jan 2025
0.02
Total Trades 664
Won Trades 0
Lost trades 0
Win Rate 0.00 %
Expected payoff -14.50
Gross Profit 165.00
Gross Loss -9794.00
Total Net Profit -9629.00
-100%
-50%
0%
50%
100%

Comments