Lot calculation by Vince - page 3

 
MaxZ:

And where do you find the maximal_profit? Oh... You are deliberately setting it yourself.


No - the biggest loss is in the report after testing including forward

After that we run the test again on the same period with the entered value of variable D in the external variables and count f in the de-item,

Then, knowing f, we calculate lots and place it on the demo account.

 
Roman.:


No - the biggest loss is in the report after testing including forward

After that we run the test again on the same period with the entered value of variable D in the external variables and count f in the de-item,

then, knowing f, count volumes of lots and put it on the demo account.


It's just a regular fit. Do you need it?
 
Vinin:

It's just a regular fit. Do you need it?

I would like to see trades on the owl demo with MM according to R. Vince's recommendations
 
Roman.:

I'm looking for it. Look at p. 30-32 of the trailer - see my previous post, in de-ink - I'm looking for it programmatically... There's no other way.

I can't even see it... After all, the array

Mas_Outcome_of_transactions[]

contains the profit of Qnt trades?

And judging from the code:

for (f = 0.01; f<=1.0; f=f+0.01)//цикл перебора переменной f для поиска оптимального ее значения,при котором TWR-максимально
     {  
          
          for ( orderIndex = 1;orderIndex<Qnt; orderIndex++) //при заданной f проходим по всем закрытым ордерам
            {                                                // и считаем относительный конечный капитал (TWR)
             TWR = TWR*(1+f*(-Mas_Outcome_of_transactions[orderIndex]/(D))); // TWR - это произведение всех HPR                
            }
          if (TWR>TWR_Rez) {
              TWR_Rez = TWR;
              G=MathPow (TWR_Rez, 0.001988); // 1/503 сделки по данной торговой системе, как в книжке: в степени 1/N 
              Print(" TWR = ",TWR_Rez," G = ",G, " при f = ", f);} // если текущий TWR > результирующего, 
              else break;    // то результирующий делаем равным текущему, иначе переходим на след итерацию цикла по f                                  
      }      

You're looking for TWR as the product of (1+f*(-Deal)/(D))... Where's the largest_loss?

 
Roman.:


No - the biggest loss is in the report after testing including forward

After that we run the test again on the same period with the entered value of variable D in the external variables and count f in the de-item,

then, knowing f, calculate the volume of lots and put it on the demo account.

This is my suggestion: search for the Highest_loss programmatically. Why do the test, extract the value, insert it, let the program look for it.
 
MaxZ:

I can't even see it... After all, the array

contains the profit of Qnt trades?

And judging from the code:

You're looking for TWR as the product of (1+f*(-Transaction)/(D))... And where's the biggest_loss?


The array contains both profits and losses on completed transactions. I.e. both + and -. There is a loop through the history of transactions.

Everything is correct there.

Variable D is the value of the largest loss trade after the first test.

 
Roman.:


The array contains both profit and loss on completed transactions. I.e. both + and -.

This is correct there.

The D variable is the value of the largest losing trade after the first test.

Shit... That's how things work.
 
MaxZ:

I can't even see it... After all, the array

contains the profit of Qnt trades?

And judging from the code:

You're looking for TWR as the product of (1+f*(-Transaction)/(D))... And where's the largest_loss?


Filling the array in the loop with this

double lastProfit = OrderProfit() + OrderSwap(); 

And this is both positive and negative...i.e. both profit and loss.

 
Roman.:


The array contains both profit and loss on completed transactions. I.e. both + and -. It also cycles through the history of the trades.

This is correct there.

The D variable is the value of the largest losing trade after the first test.


Variable D is the value of the largest loss trade in the last N trades
 

That's what I'm trying to tell you:

   for (orderIndex = 0; orderIndex<OrdersHistoryTotal(); orderIndex++)
   {
      ...

      double lastProfit = OrderProfit() + OrderSwap(); 
      if (orderIndex == 0 || lastProfit < D)
         D = lastProfit;
      Mas_Outcome_of_transactions[Qnt] = lastProfit; // Заполняем массив профитом/лоссом по всем закрытым позициям 

      ...
   }