kolbas_EA





//+------------------------------------------------------------------+
//|                                                 kolbas by Maloma |
//+------------------------------------------------------------------+

#include <stdlib.mqh>
#include <stderror.mqh>

extern double Lots=0.1;
extern int    TralUp=0;
extern int    EnterFiltr=5;

       int    StopLev;
       int    Tral;
       double MA, MAP;
       double Hich, Loch;
       int    i, CurTot, StopTot;      
        
int OpenOrders()
{
  OrderSend(Symbol(),OP_BUYSTOP,Lots,Ask+EnterFiltr*Point,3,Bid-EnterFiltr*Point,0,NULL,159,0,CLR_NONE);
  OrderSend(Symbol(),OP_SELLSTOP,Lots,Bid-EnterFiltr*Point,3,Ask+EnterFiltr*Point,0,NULL,159,0,CLR_NONE);
//  OrderSend(Symbol(),OP_SELLLIMIT,Lots,Bid+EnterFiltr*Point,3,Ask+2*EnterFiltr*Point,0,NULL,159,0,CLR_NONE);
//  OrderSend(Symbol(),OP_BUYLIMIT,Lots,Ask-EnterFiltr*Point,3,Bid-2*EnterFiltr*Point,0,NULL,159,0,CLR_NONE);
  return(0);
}

int start()
{ 
  StopLev=MarketInfo(Symbol(),MODE_STOPLEVEL);
  Tral=StopLev+TralUp;
  CurTot=0;
  StopTot=0;      
  for (i=0;i<OrdersTotal();i++)
    {
     OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
     if ((Symbol()==OrderSymbol())&&(OrderMagicNumber()==159)&&((OrderType()==OP_BUY)||(OrderType()==OP_SELL)))
       {
        CurTot++;
        if (OrderType()==OP_BUY)
          {
//           if ((OrderOpenPrice()+Tral*Point)<Bid)
             {
              if (((OrderStopLoss()+(Tral+EnterFiltr)*Point)<Bid)||(OrderStopLoss()==0)) {OrderModify(OrderTicket(),OrderOpenPrice(),Bid-(Tral+EnterFiltr)*Point,Bid+Tral*Point,OrderExpiration(),CLR_NONE);}
             }
          }
        if (OrderType()==OP_SELL)
          {
//           if (Ask<(OrderOpenPrice()-Tral*Point))
             {
              if ((Ask<(OrderStopLoss()-(Tral+EnterFiltr)*Point)||(OrderStopLoss()==0))) {OrderModify(OrderTicket(),OrderOpenPrice(),Ask+(Tral+EnterFiltr)*Point,Ask-Tral*Point,OrderExpiration(),CLR_NONE);}
             }
          }
       }
     if ((Symbol()==OrderSymbol())&&(OrderMagicNumber()==159)&&(OrderType()>1)) {StopTot++;}
    }
  for (i=0;i<OrdersTotal();i++)
    {
     OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
     if ((CurTot>0)&&(Symbol()==OrderSymbol())&&(OrderMagicNumber()==159)&&(OrderType()>1)) {OrderDelete(OrderTicket());}
    }  
  if ((CurTot==0)&&(StopTot==0)) {OpenOrders();}
  return(0);
}



Sample





Analysis



Market Information Used:



Indicator Curves created:


Indicators Used:



Custom Indicators Used:

Order Management characteristics:
It automatically opens orders when conditions are reached
Checks for the total of open orders

It can change open orders parameters, due to possible stepping strategy

Other Features:

BackTest : EURUSD on H1

From 2009-08-01 to 2009-10-01 Profit Factor:0.00 Total Net Profit:0.00

BackTest : EURUSD on H1

From 2009-12-01 to 2010-01-17 Profit Factor:0.00 Total Net Profit:0.00

BackTest : EURUSD on H1

From 2010-04-01 to 2010-04-30 Profit Factor:0.00 Total Net Profit:0.00

BackTest : EURUSD on H1

From 2010-05-01 to 2010-05-31 Profit Factor:0.00 Total Net Profit:0.00

BackTest : EURUSD on H1

From 2010-06-01 to 2010-06-30 Profit Factor:0.00 Total Net Profit:0.00

BackTest : GBPUSD on H1

From 2010-01-01 to 2010-02-27 Profit Factor:0.00 Total Net Profit:0.00

BackTest : USDCAD on H1

From 2009-12-01 to 2010-01-01 Profit Factor:0.00 Total Net Profit:0.00

BackTest : USDJPY on H1

From 2009-11-01 to 2009-11-30 Profit Factor:0.00 Total Net Profit:0.00

Request Backtest for kolbas_EA


From : (yyyy/mm/dd) To: (yyyy/mm/dd)

Pair: Period: