VR---SETKA=3=M

Author: Copyright � 2012, WWW.TRADING-GO.RU .
Profit factor:
0.84
Price Data Components
Series array that contains the highest prices of each barSeries array that contains open prices of each barSeries array that contains close prices for each bar
Orders Execution
Checks for the total of open ordersIt automatically opens orders when conditions are reachedIt can change open orders parameters, due to possible stepping strategy
2 Views
1 Downloads
0 Favorites
VR---SETKA=3=M
//===========================================================================================================================//
// Author VOLDEMAR227 site WWW.TRADING-GO.RU      SKYPE: TRADING-GO          e-mail: TRADING-GO@List.ru
//===========================================================================================================================//
#property copyright "Copyright © 2012, WWW.TRADING-GO.RU ."
#property link      "http://WWW.TRADING-GO.RU"
//WWW.TRADING-GO.RU  full version free
//===========================================================================================================================//
extern string  Comment_1 = "settings";
extern int     Plus= 50;
extern int     TakeProfit = 300;
extern int     Distanciya = 300;
extern double  Lots    = 0.00;
extern double  Percent    = 1;

extern bool    Martin     = true;

extern string  Comment_2 = "signalMA";
extern bool     SignalMA = false;
extern int     PeriodMA1 = 8 ;
extern int     PeriodMA2 = 14 ;

extern string  Comment_3 = "signalRSI";
extern bool    SignalRSI = false;
extern int     PeriodRSI = 14 ;
extern int     up= 50;
extern int     dw= 50;

extern string  Comment_4 = "signalProc";
extern bool    Proc    =true;
extern double  Procent    =1.3;

extern string  Comment_5 = "Monitor";
extern bool    Monitor =  true;
extern int     CORNER = 0;
extern int     Slip=2;
extern int     Magic=1;
int start() 
  {
double Lots_New=0;
 string Symb   =Symbol();               
   double One_Lot=MarketInfo(Symb,MODE_MARGINREQUIRED);
   double Min_Lot=MarketInfo(Symb,MODE_MINLOT);
   double Step   =MarketInfo(Symb,MODE_LOTSTEP);
   double Free   =AccountFreeMargin();        
//--------------------------------------------------------------- 3 --
   if (Lots>0)                               
     {                                        
      double Money=Lots*One_Lot;          
      if(Money<=AccountFreeMargin())         
         Lots_New=Lots;                   
      else                                
         Lots_New=MathFloor(Free/One_Lot/Step)*Step;
     }
//--------------------------------------------------------------- 4 --
   else                                    
     {                                       
      if (Percent > 100)                  
         Percent=100;                    
      if (Percent==0)                
         Lots_New=Min_Lot;                  
      else                      
         Lots_New=MathFloor(Free*Percent/100/One_Lot/Step)*Step;//Ðàñ÷
     }
//--------------------------------------------------------------- 5 --
   if (Lots_New < Min_Lot)                  
      Lots_New=Min_Lot;                  
   if (Lots_New*One_Lot > AccountFreeMargin())
     {                                         
      return(false);                        
     }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
   ObjectCreate("R",OBJ_LABEL,0,0,0);
   ObjectSet("R",OBJPROP_CORNER,2);
   ObjectSet("R",OBJPROP_XDISTANCE,10);
   ObjectSet("R",OBJPROP_YDISTANCE,10);
   ObjectSetText("R","WWW.TRADING-GO.RU  full version free",15,"Arial Black",Red);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
   double opB=2000; double opS=0; double orderProfitbuy=0; double Sum_Profitbuy=0; double orderProfitsel;  double Sum_Profitsel; int orderType;
   double LotB=Lots_New;
   double LotS=Lots_New;
   int total=OrdersTotal();
   int b=0,s=0,n=0;
   for(int i=total-1; i>=0; i--)
     {
      if(OrderSelect(i, SELECT_BY_POS))
        {
         if(OrderSymbol()==Symbol()      )
           {
            n++;
            if(OrderType()==OP_BUY && OrderMagicNumber()==Magic)
              {
               b++;
               LotB=OrderLots();
               double ProfitB=OrderTakeProfit(); double openB=OrderOpenPrice();
               if(openB<opB)
                 {opB=openB;}
              }
            //---------------------------------      
            if(OrderType()==OP_SELL && OrderMagicNumber()==Magic)
              {
               s++;
               LotS=OrderLots();
              double ProfitS=OrderTakeProfit(); double openS=OrderOpenPrice();
               if(openS>opS)
                 {opS=openS;}
              }
           }
        }
     }
   double max = NormalizeDouble(iHigh(Symbol(),1440,0),Digits);
   double min = NormalizeDouble(iLow (Symbol(),1440,0),Digits);
   double opp=NormalizeDouble(iOpen(Symbol(),1440,0),Digits);
   double cl=NormalizeDouble(iClose(Symbol(),1440,0),Digits);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
   double dis   =NormalizeDouble(Distanciya*Point,Digits);
   double spred =NormalizeDouble(MarketInfo(Symbol(),MODE_SPREAD)*Point,Digits);
   double  CORR=NormalizeDouble(Plus            *Point,Digits);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//   
int sigup=0;
int sigdw=0;
//WWW.TRADING-GO.RU  full version free
if (SignalMA == true)
{ 
//WWW.TRADING-GO.RU  full version free
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
if (SignalRSI == true)
{
//WWW.TRADING-GO.RU  full version  free
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
if (Proc    ==true)
{
   if(cl>min) { double x=NormalizeDouble(cl*100/min-100,2); }
   if(cl<max) { double y=NormalizeDouble(cl*100/max-100,2); }
   
if (Procent*(-1)<=y&&Close[1]>Open[1]){ sigup=1; sigdw=0; }
if (Procent     >=x&&Close[1]<Open[1]){ sigup=0; sigdw=1; }  
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
   int f=0;
   if(Martin==true)
     {
        if (total==0){f=1    ;}
        if (total>=1){f=total;}
         LotB=Lots_New*f;
         LotS=Lots_New*f;
     }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
if(Martin==false)
  {
LotB=LotS;
LotS=LotB;
  }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//  
if((b==0&&sigup==1&&s==0)||(Ask<opB-dis+spred&&b>=1&&s==0)) { OrderSend(Symbol(),OP_BUY ,LotB,Ask,Slip,0,0,"Buy ",Magic,0,Green); }
if((s==0&&sigdw==1&&b==0)||(Bid>opS+dis+spred&&s>=1&&b==0)) { OrderSend(Symbol(),OP_SELL,LotS,Bid,Slip,0,0,"Sell",Magic,0,Green); }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
double TP= NormalizeDouble (spred+TakeProfit*Point,Digits);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
   for (int iq=total-1; iq>=0; iq--)
   {
    if(OrderSelect(iq, SELECT_BY_POS))
     {
      if(OrderSymbol()==Symbol()&&OrderMagicNumber()==Magic)
       {   
        if (OrderType()==OP_BUY  &&  OrderTakeProfit()==0 && b==1) 
         {
          OrderModify(OrderTicket(),OrderOpenPrice(),OrderStopLoss(),NormalizeDouble(OrderOpenPrice()+TP,Digits),0,Blue);  
         }     
        if (OrderType()==OP_SELL && OrderTakeProfit()==0 && s==1) 
         {
          OrderModify(OrderTicket(),OrderOpenPrice(),OrderStopLoss(),NormalizeDouble(OrderOpenPrice()-TP,Digits),0,Blue);  
         }
}}}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
double nn=0,bb=0;
for(int ui=total-1; ui>=0; ui--)
  {
   if(OrderSelect(ui,SELECT_BY_POS))
     {
      if(OrderSymbol()==Symbol())
        {
         if(OrderType()==OP_BUY && OrderMagicNumber()==Magic)
           {
            double op=OrderOpenPrice();
            double llot=OrderLots();
            double itog=op*llot;
            bb=bb+itog;
            nn=nn+llot;
            double factb=bb/nn;
           }
        }
     }
  }
double nnn=0,bbb=0;
for(int usi=total-1; usi>=0; usi--)
  {
   if(OrderSelect(usi,SELECT_BY_POS))
     {
      if(OrderSymbol()==Symbol())
        {
         if(OrderType()==OP_SELL && OrderMagicNumber()==Magic)
           {
            double ops=OrderOpenPrice();
            double llots=OrderLots();
            double itogs=ops*llots;
            bbb=bbb+itogs;
            nnn=nnn+llots;
            double facts=bbb/nnn;
           }
        }
     }
  }

for(int uui=total-1; uui>=0; uui--)
  {
   if(OrderSelect(uui,SELECT_BY_POS))
     {
      if(OrderSymbol()==Symbol())
        {
         if(b>=2 && OrderType()==OP_BUY && OrderMagicNumber()==Magic)
           {
            OrderModify(OrderTicket(),OrderOpenPrice(),OrderStopLoss(),factb+CORR,0,Blue);
           }
         if(s>=2 && OrderType()==OP_SELL && OrderMagicNumber()==Magic)
           {
            OrderModify(OrderTicket(),OrderOpenPrice(),OrderStopLoss(),facts-CORR,0,Blue);
           }
        }
     }
  }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
if ( Monitor == true )
{
//WWW.TRADING-GO.RU  full version free
}
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//

Profitability Reports

AUD/USD Jul 2025 - Sep 2025
2.27
Total Trades 76
Won Trades 41
Lost trades 35
Win Rate 53.95 %
Expected payoff 26.12
Gross Profit 3548.46
Gross Loss -1563.17
Total Net Profit 1985.29
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
2.23
Total Trades 64
Won Trades 38
Lost trades 26
Win Rate 59.38 %
Expected payoff 80.54
Gross Profit 9360.02
Gross Loss -4205.23
Total Net Profit 5154.79
-100%
-50%
0%
50%
100%
GBP/CAD Oct 2024 - Jan 2025
2.00
Total Trades 296
Won Trades 0
Lost trades 0
Win Rate 0.00 %
Expected payoff 10.67
Gross Profit 6328.45
Gross Loss -3169.14
Total Net Profit 3159.31
-100%
-50%
0%
50%
100%
USD/CAD Jul 2025 - Sep 2025
1.98
Total Trades 90
Won Trades 52
Lost trades 38
Win Rate 57.78 %
Expected payoff 48.86
Gross Profit 8871.21
Gross Loss -4474.07
Total Net Profit 4397.14
-100%
-50%
0%
50%
100%
USD/CAD Jul 2025 - Sep 2025
1.87
Total Trades 77
Won Trades 42
Lost trades 35
Win Rate 54.55 %
Expected payoff 42.20
Gross Profit 6999.71
Gross Loss -3750.67
Total Net Profit 3249.04
-100%
-50%
0%
50%
100%
USD/CHF Jul 2025 - Sep 2025
1.87
Total Trades 78
Won Trades 42
Lost trades 36
Win Rate 53.85 %
Expected payoff 31.46
Gross Profit 5276.83
Gross Loss -2822.80
Total Net Profit 2454.03
-100%
-50%
0%
50%
100%
NZD/USD Jul 2025 - Sep 2025
1.66
Total Trades 67
Won Trades 36
Lost trades 31
Win Rate 53.73 %
Expected payoff 48.04
Gross Profit 8126.04
Gross Loss -4907.13
Total Net Profit 3218.91
-100%
-50%
0%
50%
100%
USD/CHF Jul 2025 - Sep 2025
1.61
Total Trades 77
Won Trades 36
Lost trades 41
Win Rate 46.75 %
Expected payoff 24.99
Gross Profit 5061.32
Gross Loss -3137.40
Total Net Profit 1923.92
-100%
-50%
0%
50%
100%
NZD/USD Jul 2025 - Sep 2025
1.33
Total Trades 71
Won Trades 39
Lost trades 32
Win Rate 54.93 %
Expected payoff 36.91
Gross Profit 10514.00
Gross Loss -7893.27
Total Net Profit 2620.73
-100%
-50%
0%
50%
100%
USD/JPY Jul 2025 - Sep 2025
1.31
Total Trades 339
Won Trades 196
Lost trades 143
Win Rate 57.82 %
Expected payoff 32.35
Gross Profit 46255.38
Gross Loss -35290.38
Total Net Profit 10965.00
-100%
-50%
0%
50%
100%
USD/JPY Jan 2025 - Jul 2025
0.96
Total Trades 397
Won Trades 217
Lost trades 180
Win Rate 54.66 %
Expected payoff -5.69
Gross Profit 52609.13
Gross Loss -54868.24
Total Net Profit -2259.11
-100%
-50%
0%
50%
100%
USD/CAD Jan 2025 - Jul 2025
0.77
Total Trades 186
Won Trades 95
Lost trades 91
Win Rate 51.08 %
Expected payoff -33.97
Gross Profit 21648.31
Gross Loss -27966.62
Total Net Profit -6318.31
-100%
-50%
0%
50%
100%
NZD/USD Jan 2025 - Jul 2025
0.75
Total Trades 108
Won Trades 65
Lost trades 43
Win Rate 60.19 %
Expected payoff -63.32
Gross Profit 20449.48
Gross Loss -27288.51
Total Net Profit -6839.03
-100%
-50%
0%
50%
100%
GBP/USD Jan 2025 - Jul 2025
0.74
Total Trades 200
Won Trades 108
Lost trades 92
Win Rate 54.00 %
Expected payoff -31.40
Gross Profit 18211.37
Gross Loss -24491.04
Total Net Profit -6279.67
-100%
-50%
0%
50%
100%
AUD/USD Jan 2025 - Jul 2025
0.72
Total Trades 112
Won Trades 59
Lost trades 53
Win Rate 52.68 %
Expected payoff -64.27
Gross Profit 18951.46
Gross Loss -26149.76
Total Net Profit -7198.30
-100%
-50%
0%
50%
100%
GBP/AUD Jul 2025 - Sep 2025
0.51
Total Trades 169
Won Trades 85
Lost trades 84
Win Rate 50.30 %
Expected payoff -26.95
Gross Profit 4743.13
Gross Loss -9297.07
Total Net Profit -4553.94
-100%
-50%
0%
50%
100%
GBP/USD Oct 2024 - Jan 2025
0.49
Total Trades 91
Won Trades 44
Lost trades 47
Win Rate 48.35 %
Expected payoff -77.22
Gross Profit 6629.50
Gross Loss -13656.61
Total Net Profit -7027.11
-100%
-50%
0%
50%
100%
USD/CHF Jan 2025 - Jul 2025
0.46
Total Trades 125
Won Trades 68
Lost trades 57
Win Rate 54.40 %
Expected payoff -54.75
Gross Profit 5945.88
Gross Loss -12789.50
Total Net Profit -6843.62
-100%
-50%
0%
50%
100%
GBP/CAD Jul 2025 - Sep 2025
0.44
Total Trades 126
Won Trades 62
Lost trades 64
Win Rate 49.21 %
Expected payoff -56.16
Gross Profit 5581.28
Gross Loss -12657.65
Total Net Profit -7076.37
-100%
-50%
0%
50%
100%
GBP/AUD Jul 2025 - Sep 2025
0.41
Total Trades 100
Won Trades 48
Lost trades 52
Win Rate 48.00 %
Expected payoff -74.67
Gross Profit 5113.22
Gross Loss -12580.04
Total Net Profit -7466.82
-100%
-50%
0%
50%
100%
GBP/USD Jul 2025 - Sep 2025
0.39
Total Trades 72
Won Trades 36
Lost trades 36
Win Rate 50.00 %
Expected payoff -100.48
Gross Profit 4620.21
Gross Loss -11854.56
Total Net Profit -7234.35
-100%
-50%
0%
50%
100%
GBP/USD Jul 2025 - Sep 2025
0.34
Total Trades 71
Won Trades 39
Lost trades 32
Win Rate 54.93 %
Expected payoff -102.20
Gross Profit 3751.91
Gross Loss -11008.22
Total Net Profit -7256.31
-100%
-50%
0%
50%
100%
NZD/USD Oct 2024 - Jan 2025
0.32
Total Trades 24
Won Trades 9
Lost trades 15
Win Rate 37.50 %
Expected payoff -350.09
Gross Profit 3869.57
Gross Loss -12271.76
Total Net Profit -8402.19
-100%
-50%
0%
50%
100%
USD/JPY Jul 2025 - Sep 2025
0.22
Total Trades 41
Won Trades 17
Lost trades 24
Win Rate 41.46 %
Expected payoff -191.11
Gross Profit 2199.17
Gross Loss -10034.81
Total Net Profit -7835.64
-100%
-50%
0%
50%
100%
GBP/CAD Jan 2025 - Jul 2025
0.20
Total Trades 33
Won Trades 11
Lost trades 22
Win Rate 33.33 %
Expected payoff -209.09
Gross Profit 1751.81
Gross Loss -8651.77
Total Net Profit -6899.96
-100%
-50%
0%
50%
100%
GBP/CAD Jul 2025 - Sep 2025
0.10
Total Trades 34
Won Trades 12
Lost trades 22
Win Rate 35.29 %
Expected payoff -196.01
Gross Profit 774.78
Gross Loss -7439.22
Total Net Profit -6664.44
-100%
-50%
0%
50%
100%
GBP/AUD Jan 2025 - Jul 2025
0.08
Total Trades 29
Won Trades 4
Lost trades 25
Win Rate 13.79 %
Expected payoff -127.51
Gross Profit 338.62
Gross Loss -4036.39
Total Net Profit -3697.77
-100%
-50%
0%
50%
100%
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%
EUR/USD Jan 2025 - Jul 2025
0.00
Total Trades 135
Won Trades 70
Lost trades 65
Win Rate 51.85 %
Expected payoff -64508.43
Gross Profit 13890.34
Gross Loss -8722528.07
Total Net Profit -8708637.73
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
0.00
Total Trades 19
Won Trades 11
Lost trades 8
Win Rate 57.89 %
Expected payoff -18288.71
Gross Profit 1180.37
Gross Loss -348665.85
Total Net Profit -347485.48
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
0.00
Total Trades 18
Won Trades 9
Lost trades 9
Win Rate 50.00 %
Expected payoff -18727.20
Gross Profit 850.27
Gross Loss -337939.94
Total Net Profit -337089.67
-100%
-50%
0%
50%
100%

Comments