[Archive] Learn how to make money villagers! - page 660

 
Roman.:


I see. I'm not going to check it right now in the EA (it even has the same function by name) - just replace it (that one) with this one (yours)... I will have a closer look later...

Write in a line the approximate lots for the averaging orders for a starting date, e.g. 10,000 units of currency, i.e.: 10,000 units of currency. 10.000 currency units, i.e:

0. starting volume = 0.01 lot.

1st averaging market = 0.02 lot.

3rd averaging market = 0.03 lot.

4th = 0.05 lot.

5th = 0.09 lot

6

7

8

9

And the next averaging order should be placed after 900 seconds after the opening of the previous one, if all previous one-directional start and averaging orders were losing?

Not really, my orders are placed until there is a confirmation signal from the indicator, but not more often than every 900 seconds (I chose at random), I can not determine what will be the lot, I do not know where the market will take me, if the profit is higher lot, if the loss is less (no martingale for pulling loss-making orders), the attached report shows the lots, there is a mess
Files:
 
BeerGod:
Not really, my orders are placed until there is a confirmation signal from the indicator, but not more often than every 900 seconds (I chose at random), I cannot say what will be the lot, I do not know where the market will take me, if I'm on the plus side, the lot is larger, if I'm down then smaller (no martingale for taking out losing orders), the attached report shows the lots, it is a mess

I see. Swarm go on! :-)
 
Roman.:

Asked the question in the relevant thread - see this thread. I don't know myself, it was a long time ago... :-)
Correct please, X is a constant of degree value
 
new-rena:
Please correct, X is a constant of degree value

Corrected.
 
Roman.:

Fixed.

Well, when this equation is solved, it will be ready (probably page 666). You can run it in the tester and make a prediction of the annual interest. I have no parameters - I just want to know the result.

I have placed the indicator right in the Expert Advisor. I will change only [i-1]-->1

 
new-rena:
When we solve this equation, we will be ready. We may run it in the tester and make a forecast by annual interest. No parameters - just an interesting result


I'm trying different variants too, in particular I'm trying to determine the step of max. no-backup by dickf's script by max. history depth...

My point is that if we take the range m/o max and min over a certain period of time, wouldn't this be over-insurance... and, as a consequence, a decrease in profit as the interval of averaging orders would be increased relative to the value obtained by dividing the max failures by the max possible number of averaging orders...?

And I have checked that if we do the averaging using an arithmetic progression, we need a harder rollback to open the orders than, for example, if we double the previous order... I have such a design - see it in the tester and optimizer using different symbols:

Three types of averaging:

 
Roman.:


I'm trying different variants too, in particular the determination of step by max. no return according to dickfx's script by max. depth of history...

My point is that if we take the range m/o max and min over a certain period of time, wouldn't this be over-insurance... and, as a consequence, a decrease in profit as the interval of averaging orders would be increased relative to the value obtained by dividing the max failures by the max possible number of averaging orders...?

And I have checked that if we do the averaging using an arithmetic progression, we need a harder rollback to open the orders than, for example, if we double the previous order... I have such a design - see it in the tester and optimizer using different symbols:

Three types of averaging:

Well yes, arithmetic averaging is the fact of the guarantee of a drain. I meant about the one in whom PAMM was watched.

Also, when doubling up, it is not certain that there will be enough money. Therefore, a variant of my formula for building up the lot size - an anti-slip guarantee, according to the story

 
extern int Max_Iteration = 36;// Максимальное количество усреднений (ордеров) в нетто-илане 
extern int VAR_MM = 0; // используемый вариант усреднения в соотв-ии: множитель с числами ФИБО = 0 / множитель по арифметической прогрессии = 1
                      // 2 - классический мартин - удвоение предыдущего объема с 3-его усреднения   

 // Ордер закрылся с убытком - считаем количество усреднений, новый lots, усредняем цену открытия  в ТОМ ЖЕ направлении
            // при условии, что общее количество усреднений не выше максимального по соответствующему варианту усреднения                               
        
          if (Iteration <= Max_Iteration && VAR_MM == 0)                  
              // Последующие лоты открываются по множителю в соответствие с числами ФИБО           
               switch(Iteration)                                  // Заголовок switch 
                   {                                              // Начало тела switch                  
                     case 1 : Lots_New = lastLots * 1; lots = lastLots; Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );break; //расчет нового объема       
                     case 2 : Lots_New = lots * 2;    Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;   
                     case 3 : Lots_New = lots * 3;    Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;      
                     case 4 : Lots_New = lots * 5;    Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;  
                     case 5 : Lots_New = lots * 8;    Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;     
                     case 6 : Lots_New = lots * 13;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;      
                     case 7 : Lots_New = lots * 21;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;     
                     case 8 : Lots_New = lots * 34;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;         
                     case 9 : Lots_New = lots * 55;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;           
                     case 10: Lots_New = lots * 89;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break; 
                     case 11: Lots_New = lots * 144;  Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;               
                     case 12: Lots_New = lots * 233;  Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;               
                     case 13: Lots_New = lots * 377;  Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;               
                     case 14: Lots_New = lots * 610;  Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;  
                     case 15: Lots_New = lots * 987;  Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;               
                     case 16: Lots_New = lots * 1597; Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;                            
                     default: Lots_New = lots * 2584; Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );   
                   }                                    // Конец тела switch      
                    
           if (Iteration <= Max_Iteration && VAR_MM == 1)//Последующие лоты открываются в соответствие с членами арифметической прогрессии  
               switch(Iteration)                        // Заголовок switch 
                   {                                    // Начало тела switch    
                     case 1 : Lots_New = lastLots * 1; lots = lastLots; Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );break; //расчет нового объема            
                     case 2 : Lots_New = lots * 3;    Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;   
                     case 3 : Lots_New = lots * 5;    Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;      
                     case 4 : Lots_New = lots * 7;    Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;  
                     case 5 : Lots_New = lots * 9;    Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;     
                     case 6 : Lots_New = lots * 11;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;      
                     case 7 : Lots_New = lots * 13;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;     
                     case 8 : Lots_New = lots * 15;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;         
                     case 9 : Lots_New = lots * 17;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;           
                     case 10: Lots_New = lots * 19;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break; 
                     case 11: Lots_New = lots * 21;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;               
                     case 12: Lots_New = lots * 23;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;               
                     case 13: Lots_New = lots * 25;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;               
                     case 14: Lots_New = lots * 27;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;       
                     case 15: Lots_New = lots * 29;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;       
                     case 16: Lots_New = lots * 31;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;   
                     case 17: Lots_New = lots * 33;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;      
                     case 18: Lots_New = lots * 35;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;  
                     case 19: Lots_New = lots * 37;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;     
                     case 20: Lots_New = lots * 39;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;      
                     case 21: Lots_New = lots * 41;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;     
                     case 22: Lots_New = lots * 43;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;         
                     case 23: Lots_New = lots * 45;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;           
                     case 24: Lots_New = lots * 47;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break; 
                     case 25: Lots_New = lots * 49;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;               
                     case 26: Lots_New = lots * 51;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;               
                     case 27: Lots_New = lots * 53;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;               
                     case 28: Lots_New = lots * 55;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break; 
                     case 29: Lots_New = lots * 57;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;               
                     case 30: Lots_New = lots * 59;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;               
                     case 31: Lots_New = lots * 61;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break; 
                     case 32: Lots_New = lots * 63;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break; 
                     case 33: Lots_New = lots * 65;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;               
                     case 34: Lots_New = lots * 67;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;               
                     case 35: Lots_New = lots * 69;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;                               
                     default: Lots_New = lots * 71;  {Iteration = 0; Print("Iteration = ", Iteration, " Lots_New = ", Lots_New ); }                       
                   }                                   // Конец тела switch  
          
 

That's the design - it didn't all fit at once:

if (Iteration <= Max_Iteration && VAR_MM == 2)// Последующие лоты открываются в соответствие с классическим мартином - удвоение           
               switch(Iteration)                       // Заголовок switch 
                   {                                   // Начало тела switch                       
                     case 1 : Lots_New = lastLots * 1; lots = lastLots; Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );break; //расчет нового объема       
                     case 2 : Lots_New = lots * 1;    Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;   
                     case 3 : Lots_New = lots * 2;    Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;      
                     case 4 : Lots_New = lots * 4;    Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;  
                     case 5 : Lots_New = lots * 8;    Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;     
                     case 6 : Lots_New = lots * 16;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;      
                     case 7 : Lots_New = lots * 32;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;     
                     case 8 : Lots_New = lots * 64;   Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;         
                     case 9 : Lots_New = lots * 128;  Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;           
                     case 10: Lots_New = lots * 256;  Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break; 
                     case 11: Lots_New = lots * 512;  Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;               
                     case 12: Lots_New = lots * 1024; Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;               
                     case 13: Lots_New = lots * 2048; Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;                                      
                     case 14: Lots_New = lots * 4096; Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );  break;                                                               
                     default: Lots_New = lots * 8192; Print("Iteration = ", Iteration, " Lots_New = ", Lots_New );   
                   }                                   // Конец тела switch          
                   
// ---------НОРМАЛИЗЦИЯ НОВЫХ РАСЧЕТНЫХ ЛОТОВ И ОТКРЫТИЕ ОЧЕРЕДНОЙ ПОЗИЦИИ...            
                    Lots_New = NormalizeLots(Lots_New);
                    if (lastType == OP_SELL) WmOrderSend(Symbol(), OP_SELL, Lots_New, Bid, 0, 0, "усреднение" , MagicNumber);
                    if (lastType == OP_BUY)  WmOrderSend(Symbol(), OP_BUY, Lots_New, Ask, 0, 0, "усреднение" ,  MagicNumber);                            
                      
                 
       

 
Roman.:

Where does 36 come from? And that's a steep coefficient. Think of the deposit - add up all the lots and multiply by the margin

Reason: