Lot calculation by Vince - page 7

 
MaxZ:

I'm completely confused. I meant Mas_Qutcome_of_transactions[] array. You see, the loop fails to add one element to it...

I don't believe in miracles! :D

You'll have to believe it!!! :-)))

Counting elements of an array (its index is "0"), i.e. everything is correct here - it turns out that the first element was not counted - the loop must count from "0", i.e. so

for ( orderIndex = 0;orderIndex<Qnt; orderIndex++) //при заданной f проходим по всем закрытым ордерам
            {                                                // и считаем относительный конечный капитал (TWR)
             TWR = MathPow(TWR*(1+f*(-Mas_Outcome_of_transactions[orderIndex]/(D))),0.33); // TWR - это произведение всех HPR                    
            // TWR = TWR*(1+f*(-Mas_Outcome_of_transactions[orderIndex]/(D))); // TWR - это произведение всех HPR                    
           
            }
 

What do you mean with "0"? When with "1"...

Roman.:
   int Qnt=0;
   ...
   for (orderIndex = 0; orderIndex<OrdersHistoryTotal(); orderIndex++)
   {   
      ...
      Qnt++;                               // увеличиваем счетчик закрытых ордеров
      ...
      Mas_Outcome_of_transactions[Qnt] = lastProfit; // Заполняем массив профитом/лоссом по всем закрытым позициям 
      ...
   }          
 
MaxZ:

How is it from scratch? When from 1...


I got the information here...
 
MaxZ:

How's that from scratch? When from 1...


Yes, yes, yes - now moved in...

Just like that, from scratch:

  int Qnt=0;
   ...
   for (orderIndex = 0; orderIndex<OrdersHistoryTotal(); orderIndex++)
   {   
      ...
      Mas_Outcome_of_transactions[Qnt] = lastProfit; // Заполняем массив профитом/лоссом по всем закрытым позициям 
      Qnt++;                               // увеличиваем счетчик закрытых ордеров
      ...
   }          
 
You can now continue on your arduous journey of calculating the Vince lot! :)))
 
MaxZ:
You can now continue on your arduous journey of calculating the Vince lot! :)))

Yes. As soon as I'm done, I'll wrap it up in a f-u and post it here with a description... :-)))
 
MaxZ:
You can now continue your hard way of calculating the lot by Vince! :)))


You there also try to check the formulas yourself...

I can't yet find an owl with the input parameters, so that the resulting f would be 0.25 or 0.40... etc. - i.e. to reach such average working values.

I get either 0.01 or 0.99 - on the 2 owls with different parameters tried so far... :-)))

Although, all formulas are written in the code correctly. Digging further.

 
Roman.:


You try to check the formulas yourself too...

I can't yet find an owl with the input parameters, so that the resulting f would be 0.25 or 0.40... etc. - i.e. to reach such average working values.

I get either 0.01 or 0.99 - on the 2 owls with different parameters tried so far... :-)))

Although, all formulas are written in the code correctly. Digging further.

I can't do what I'm not interested in... I got into this thread by accident. I wanted to help and I got hung up! :)))

It's also a matter of faith. I don't believe in such things...

 
MaxZ:

I can't do things I'm not interested in... I got into this thread by accident. I wanted to help and I've been sitting around! :)))

It's also a matter of faith. I don't believe in such things...


I see.
 

For those who are interested - it was possible to reach working (average) values of the variable optimal f, by the method of geometric mean according to R. Vince in the EA included in the standard delivery of MA-based MT (see screenshot). Based on the conditions and order of calculation of optimum f by the book, its value is 0.36. After finishing the code, I will post the function here with the description and the order of using it to calculate the volumes of lots opened in future trades according to R. Vince's book.

Reason: