Unprofitable trades 0!!!!!! - page 10

 
granit77 >> :

And the bazaar in this thread is only supported in the expectation that a forester will come along and show us the way to the nearest highway...

Yeah... Well, the results are not so bad, I got at 40% slippage 100% increase of deposit for a week... I used OsMa perverted... There's a lot of levers, you can do a lot. If you understand me, the original signal Low High filter Stochastic and Osma in the same, ie IF stochastic and Osma ... In principle, if you don't cheat (you can just raise 12000 of 1000 for 2 weeks with a drawdown of 78%), then the normal result ... Now, I'll try to conjure more ...

 

A who can tell you how to withdraw an autolot that would be the size was not 0.1, and with 0.01, because mine from the KIM does not want to calculate a percentage of the deposit below 200 grivnas.

Here is my code-

string _Parameters_b_Lots = "Параметры модуля расчёта лота"; 
int LotsWayChoice = 1;     // Способ выбора рабочего лота: 
                                  //  0-фиксированный, 
                                  //  1-процент от депозита, 
                                  //  2-фракционно-пропорциональный, 
                                  //  3-фракционно-фиксированный, 
extern int LotsPercent    = 40;    // Процент от депозита (Оптимизация проведена для 1000$)
int LotsDeltaDepo  = 20;   // Коэффициент приращения депозита 
int LotsDepoForOne = 20;   // Размер депозита для одного минилота 
int LotsMax        = 10000; // Максимальное количество лотов 
( и в конце)
if( ik == 0)
     {
       Balance0 = AccountBalance();
       ik = 1;
     } 
//----
   if( ReInvest == 1)
       lotsi = Lots*AccountBalance() / Balance0; 
   else 
       lotsi = Lots; 
//----
   if( lotsi < 0.1)
     {
       lotsi = 0.01;
     } 
//----
   if( lotsi >= 0.1 && lotsi < 0.2)
       lotsi = 0.1; 
   else 
    {
     if( lotsi >= 0.2 && lotsi < 0.5)
       lotsi = 0.2; 
     else 
      { 
       if( lotsi >= 0.5 && lotsi < 1)
         lotsi = 0.5; 
       else 
        {
         if( lotsi >= 1 && lotsi < 2)
           lotsi = 1; 
         else 
          { 
           if( lotsi >= 2 && lotsi < 3)
             lotsi = 2; 
           else 
            {
             if( lotsi >= 3 && lotsi < 4)
               lotsi = 3; 
             else 
              { 
               if( lotsi >= 4 && lotsi < 5)
                 lotsi = 4; 
               else 
                {
                 if( lotsi >= 5 && lotsi <6 )
                   lotsi = 5; 
                 else 
                  { 
                   if( lotsi >= 6 && lotsi < 7)
                     lotsi = 6; 
                   else 
                    {
                     if( lotsi >= 7 && lotsi < 8)
                       lotsi=7; 
                     else 
                      { 
                       if( lotsi >= 8 && lotsi < 9)
                         lotsi = 8; 
                       else 
                        {
                         if( lotsi >= 9 && lotsi < 15)
                           lotsi = 9; 
                         else 
                          { 
                           if( lotsi >= 15 && lotsi < 20)
                             lotsi = 15; 
                           else 
                            {
                             if( lotsi >= 20 && lotsi < 25)
                               lotsi = 20; 
                             else 
                              { 
                               if( lotsi >= 25 && lotsi < 30)
                                 lotsi = 25; 
                               else 
                                {
                                 if( lotsi >= 30 && lotsi < 35)
                                   lotsi = 30; 
                                 else 
                                  { 
                                   if( lotsi >= 35 && lotsi < 40)
                                     lotsi = 35; 
                                   else 
                                    {
                                     if( lotsi >= 40 && lotsi < 45)
                                       lotsi = 40; 
                                     else 
                                      { 
                                       if( lotsi >= 45 && lotsi < 50)
                                         lotsi = 45; 
                                       else 
                                        {
                                         if( lotsi >= 50 && lotsi < 55)
                                           lotsi = 50; 
                                         else 
                                          { 
                                           if( lotsi >= 55 && lotsi < 60)
                                             lotsi = 55; 
                                           else 
                                            {
                                             if( lotsi >= 60 && lotsi < 65)
                                               lotsi = 60; 
                                             else 
                                              { 
                                               if( lotsi >= 65 && lotsi < 70)
                                                 lotsi = 65; 
                                               else 
                                                {
                                                 if( lotsi >= 70 && lotsi < 75)
                                                   lotsi = 70; 
                                                 else 
                                                  { 
                                                   if( lotsi >= 75 && lotsi < 80)
                                                     lotsi = 75; 
                                                   else 
                                                    {
                                                     if( lotsi >= 80 && lotsi < 85)
                                                       lotsi = 80; 
                                                     else 
                                                      { 
                                                       if( lotsi >= 85 && lotsi < 90)
                                                         lotsi = 85; 
                                                       else 
                                                        {
                                                         if( lotsi >= 90 && lotsi < 95)
                                                           lotsi = 90; 
                                                         else 
                                                          { 
                                                           if( lotsi >= 95 && lotsi < 100)
                                                             lotsi = 95; 
                                                           else 
                                                            {
                                                             if( lotsi >= 100)
                                                               lotsi= lotsi;/*100*/ 
                                                            }
                                                          }
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    } 
   MidLot = GetSizeLot(); 
   lotsi = NormalizeDouble( MidLot, 1); 
   total=OrdersTotal();                                        
   cbars=Bars;
   return(0);
   } 
double GetSizeLot() 
  { 
   double dLot; 
   if( LotsWayChoice == 0) 
     dLot = lotsi; 
// фиксированный процент от депозита 
   if( LotsWayChoice == 1) 
     { 
       dLot = MathCeil(AccountFreeMargin() / 10000* LotsPercent)/10; 
     } 
// фракционно-пропорциональный 
   if( LotsWayChoice == 2) 
     { 
       int k = LotsDepoForOne; 
       //----
       for(double i = 2; i <= LotsMax; i++) 
         { 
           k = k + i* LotsDeltaDepo; 
           //----
           if( k > AccountFreeMargin()) 
             { 
               dLot = ( i - 1) / 10; 
               break; 
             } 
         } 
     } 
// фракционно-фиксированный 
   if( LotsWayChoice == 3) 
     { 
       dLot = MathCeil((AccountFreeMargin() - LotsDepoForOne) / LotsDeltaDepo)/10; 
     } 
//----
   if( dLot < 0.1)  
       dLot = 0.1; 
//----
   if( dLot > LotsMax) 
       dLot = LotsMax;   
   return( dLot);  
  } 
 

my version

//+------------------------------------------------------------------+
//| Расчет лота соотв риску и балансу                                |
//+------------------------------------------------------------------+
double CalcLotsAuto(double Risk)
{

   double LotOpt, Zalog;
   RefreshRates();
   double Marga=AccountFreeMargin();
   double Balans=AccountBalance();
   double LotMin=MarketInfo(Symbol(),MODE_MINLOT);
   double LotMax=MarketInfo(Symbol(),MODE_MAXLOT);
   double StepLot=MarketInfo(Symbol(),MODE_LOTSTEP);
   double StopLv=AccountStopoutLevel();
   int PrsMinLot=1000* LotMin;
   if( Risk<0) Risk=0;
   if( Risk>100) Risk=100; 
   if( StepLot==0.01){int step=2;}else{ step=1;}  
//---------------------------     
   Zalog=( Balans*( Risk/100));
   LotOpt=NormalizeDouble(( Zalog/1000), step);
   if( LotOpt> LotMax) LotOpt= LotMax;
   if( LotOpt< LotMin) LotOpt= LotMin;
   //if(Marga<Sredstva/2){return(0);}
   return( LotOpt);
}
 

Hoper23

Minor improvement gave such results: from 01.05.08 to 01.12.08 net profit 6772 with LotsPercent=2. Initial deposit = 1000, relative drawdown = 26.38%. Loss = 72, only from unfinished trade. A total of 186 trades.


 
A rework in the studio!
 
I will only give the finalisation to the author of the expert if he is interested.
 
khorosh >> :
I will only give the rework to the author of the expert if he shows interest.

You don't need a code. Share the principles.

 
granit77 >> :

You don't need a code. Share the principles.

As an active forum member, I can send you the code as well, just give me the address.
 

Brothers, I've been messing around at night, and I'm shocked. Anyway, with stochastic filtering and OsMoy, you can make a lot of money. I have a starting 1000 quid from 10 to 28 comes out 21000 with a drawdown of 60.66%!!!!

But 2% of my deposit to trade...that's kinda waaapche... What about the refinement, we could do a swap. Granite and KHorosh, give us your soaps. Mine is bghoper@mail.ru

 
xrust >> :

my version

I don't understand how you apply it at all...

Reason: