Author: Crazy Alex � 2006, Crazy Alex Software Corp.
Profit factor:
0.52
Price Data Components
Series array that contains open prices of each barSeries array that contains close prices for each barSeries array that contains the highest prices of each barSeries array that contains the lowest prices of each bar
Orders Execution
Checks for the total of open ordersIt can change open orders parameters, due to possible stepping strategyIt Closes Orders by itself It automatically opens orders when conditions are reached
Indicators Used
Ichimoku Kinko HyoMovement directional index
7 Views
0 Downloads
0 Favorites
Tolik1
/*-----------------------------+
|			       |
| Shared by www.Aptrafx.com    |
|			       |
+------------------------------*/

//+------------------------------------------------------------------+
//|                                                        Tolik.mq4 |
//|                    Crazy Alex © 2006, Crazy Alex  Software Corp. |
//|                                          http://www.CrazyAlex.ru |
//+------------------------------------------------------------------+
#property copyright "Crazy Alex © 2006, Crazy Alex  Software Corp."
#property link      "http://www.CrazyAlex.ru"


//---- input parameters
extern double TakeProfit = 50;
extern double Lots = 0.1;
extern double StopLoss = 50;
extern double TralingStop = 35;
extern double FirstStop = 24;

extern double ten_sen = 9;
extern double kij_sen = 26;
extern double sen_span_b = 52;


extern string mail_users =" ";

extern double FreeMargin = 500;
extern double MathLots = 300;



//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
  
int cnt, ticket, total,TotalOpenOrders,Commentary;
int napr;
 
  
//----
double tenkan_sen    = iIchimoku(NULL, 0, ten_sen, kij_sen, sen_span_b, MODE_TENKANSEN, 0);
double Kijun_sen     = iIchimoku(NULL, 0, ten_sen, kij_sen, sen_span_b, MODE_KIJUNSEN, 0);
double Senkou_Span_A = iIchimoku(NULL, 0, ten_sen, kij_sen, sen_span_b, MODE_SENKOUSPANA, 0);
double Senkou_Span_B = iIchimoku(NULL, 0, ten_sen, kij_sen, sen_span_b, MODE_SENKOUSPANB, 0);
double Chinkou_Span  = iIchimoku(NULL, 0, ten_sen, kij_sen, sen_span_b, MODE_CHINKOUSPAN, kij_sen);
//***********************************************************************
double tenkan_sen_1    = iIchimoku(NULL, 0, ten_sen, kij_sen, sen_span_b, MODE_TENKANSEN, 1);
double Kijun_sen_1     = iIchimoku(NULL, 0, ten_sen, kij_sen, sen_span_b, MODE_KIJUNSEN, 1);
double Senkou_Span_A_1 = iIchimoku(NULL, 0, ten_sen, kij_sen, sen_span_b, MODE_SENKOUSPANA, 1);
double Senkou_Span_B_1 = iIchimoku(NULL, 0, ten_sen, kij_sen, sen_span_b, MODE_SENKOUSPANB, 1);
double Chinkou_Span_1  = iIchimoku(NULL, 0, ten_sen, kij_sen, sen_span_b, MODE_CHINKOUSPAN, kij_sen+1);


double Adx_Main = iADX(NULL,0,14,PRICE_HIGH,MODE_MAIN,0);
double Adx_PlusDi = iADX(NULL,0,14,PRICE_HIGH,MODE_PLUSDI,0);
double Adx_MinusDi = iADX(NULL,0,14,PRICE_HIGH,MODE_MINUSDI,0);

double open   =  iOpen(NULL,0,0);
double close  =  iClose(NULL,0,0);
double higt   =  iHigh(NULL,0,0);
double low    =  iLow(NULL,0,0);

//Comment("Chinkou_Span ",Chinkou_Span,"\n","tenkan_sen ",tenkan_sen_1,"\n","Kijun_sen ",Kijun_sen_1,"\n","Adx_PlusDi ",Adx_PlusDi,"\n","Adx_MinusDi ",Adx_MinusDi);

   // ñ÷èòàåì êîëâî îòêðûòûõ îðäåðîâ    

total=OrdersTotal();
TotalOpenOrders = 0;
for(cnt=0;cnt<total;cnt++)
{
   if (OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES) == true) 
      {
      if (OrderSymbol()==Symbol())
         {
         if (OrderStopLoss()!=0)
         
         if (OrderType( ) == OP_BUY)
              { 
              //Comment("Ñòîèò Áàé");
              //Comment(OrderTakeProfit(),"|",Bid,"|", Bid-OrderStopLoss()," ",TralingStop*Point);
                if (Bid-OrderStopLoss()>TralingStop*Point)
                {
                         OrderModify(OrderTicket(),OrderOpenPrice(),Bid-TralingStop*Point,Bid+TakeProfit*Point,0,CLR_NONE);
                 return(0);
                 }
                 }
         if (OrderType( ) == OP_SELL)
                 {
             
            // Comment(OrderTakeProfit(),"|",Ask,"|", Ask-OrderTakeProfit());

            if (OrderStopLoss()-Ask>TralingStop*Point) 
                    {
                           OrderModify(OrderTicket(),OrderOpenPrice(),Ask+TralingStop*Point,Ask-TakeProfit*Point,0,CLR_NONE);
                     return(0);
                     //Comment("Èçìåíèòü");
                    //  Comment("Ñòîèò Ñåëë");
                       }
                   }       
                   
         if (OrderStopLoss()==0)

            {
           if (OrderType( ) == OP_BUY)
           {
           if (Bid-OrderOpenPrice()>FirstStop*Point)
               {
                OrderModify(OrderTicket(),OrderOpenPrice(),Bid-StopLoss*Point,Bid+TakeProfit*Point,0,CLR_NONE);
               return(0);
            
                }  
           }
           if (OrderType( ) == OP_SELL)
           {
           if (OrderOpenPrice()-Ask>FirstStop*Point)
               {
                OrderModify(OrderTicket(),OrderOpenPrice(),Ask+StopLoss*Point,Ask-TakeProfit*Point,0,CLR_NONE);
                return(0);
               }
           }

            
            
            
            }
                   
         }//ÊîíåöÅñëè ýòîò ñèìâîë
     }//ÊîíåöÅñëè âûáðàí
    
}//ÊîíåöÖèêëà


total=OrdersTotal();
TotalOpenOrders = 0;
for(cnt=0;cnt<total;cnt++)
{
   if (OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES) == true) 
      {
      if (OrderSymbol()==Symbol())
         {
         TotalOpenOrders = TotalOpenOrders+1;
         }
       }
}         



  total=OrdersTotal();
   for(cnt=0;cnt<total;cnt++)
      {
      if (OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES) == true) 
         {
         if (OrderSymbol()==Symbol())
               {
                  if (OrderType()==OP_BUY&&higt>Senkou_Span_B&&Ask<Senkou_Span_B&&tenkan_sen<Kijun_sen) OrderClose(OrderTicket(),OrderLots(),Bid,3,CLR_NONE);
                  if (OrderType()==OP_SELL&&low<Senkou_Span_B&&Bid>Senkou_Span_B&&tenkan_sen>Kijun_sen) OrderClose(OrderTicket(),OrderLots(),Ask,3,CLR_NONE);

               }
          }
      }         




if (TotalOpenOrders < 1)
{

  if (AccountEquity()< FreeMargin)
{
Lots = 0.1;
}
else  Lots = (MathRound( AccountEquity()/MathLots)/ 10);

   
    if (higt>Senkou_Span_B&&Ask<Senkou_Span_B&&tenkan_sen<Kijun_sen)//(Chinkou_Span>tenkan_sen&&Chinkou_Span>Kijun_sen&&Chinkou_Span>Senkou_Span_B&&Chinkou_Span>Senkou_Span_A&&Adx_PlusDi>Adx_MinusDi)    //&&iOpen(NULL,0,0)>tenkan_sen&&Bid<tenkan_sen)//<Adx_MinusDi&&tenkan_sen_1!=Kijun_sen_1)//Óñëîâèÿ îòêðûòèÿ îðäåðà íà ïðîäàæó
    {
    
      
      OrderSend(Symbol(), OP_SELL,Lots,Bid,3,Bid+StopLoss*Point,Bid-TakeProfit*Point,NULL,0,0,CLR_NONE);
      
      
    }
    
    if (low<Senkou_Span_B&&Bid>Senkou_Span_B&&tenkan_sen>Kijun_sen)//(Chinkou_Span<tenkan_sen&&Chinkou_Span<Kijun_sen&&Chinkou_Span<Senkou_Span_B&&Chinkou_Span<Senkou_Span_A&&Adx_PlusDi<Adx_MinusDi)//Óñëîâèÿ îòêðûòèÿ îðäåðà íà ïîêóïêó
    {
        
      OrderSend(Symbol(), OP_BUY,Lots,Ask,3,Ask-StopLoss*Point,Ask+TakeProfit*Point,NULL,0,0,CLR_NONE);
      
      
    }
}






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

Profitability Reports

USD/JPY Jul 2025 - Sep 2025
0.58
Total Trades 543
Won Trades 121
Lost trades 422
Win Rate 22.28 %
Expected payoff -15.79
Gross Profit 11631.92
Gross Loss -20206.06
Total Net Profit -8574.14
-100%
-50%
0%
50%
100%
USD/CHF Jul 2025 - Sep 2025
0.43
Total Trades 216
Won Trades 63
Lost trades 153
Win Rate 29.17 %
Expected payoff -35.39
Gross Profit 5687.03
Gross Loss -13330.93
Total Net Profit -7643.90
-100%
-50%
0%
50%
100%
USD/CAD Jul 2025 - Sep 2025
0.82
Total Trades 170
Won Trades 63
Lost trades 107
Win Rate 37.06 %
Expected payoff -8.52
Gross Profit 6541.95
Gross Loss -7990.19
Total Net Profit -1448.24
-100%
-50%
0%
50%
100%
NZD/USD Jul 2025 - Sep 2025
0.76
Total Trades 229
Won Trades 77
Lost trades 152
Win Rate 33.62 %
Expected payoff -15.16
Gross Profit 10957.90
Gross Loss -14429.40
Total Net Profit -3471.50
-100%
-50%
0%
50%
100%
GBP/USD Jul 2025 - Sep 2025
0.85
Total Trades 273
Won Trades 97
Lost trades 176
Win Rate 35.53 %
Expected payoff -9.32
Gross Profit 14664.50
Gross Loss -17208.60
Total Net Profit -2544.10
-100%
-50%
0%
50%
100%
GBP/CAD Jul 2025 - Sep 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/AUD Jul 2025 - Sep 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%
EUR/USD Jul 2025 - Sep 2025
0.32
Total Trades 343
Won Trades 24
Lost trades 319
Win Rate 7.00 %
Expected payoff -29.07
Gross Profit 4740.80
Gross Loss -14712.20
Total Net Profit -9971.40
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
0.93
Total Trades 166
Won Trades 69
Lost trades 97
Win Rate 41.57 %
Expected payoff -4.43
Gross Profit 9708.00
Gross Loss -10443.20
Total Net Profit -735.20
-100%
-50%
0%
50%
100%
USD/CAD Oct 2024 - Jan 2025
0.33
Total Trades 397
Won Trades 105
Lost trades 292
Win Rate 26.45 %
Expected payoff -19.16
Gross Profit 3694.07
Gross Loss -11302.26
Total Net Profit -7608.19
-100%
-50%
0%
50%
100%

Comments