Lot calculation by Vince - page 10

 

Roman.:

WAAAAAAAAA!!! :DD

Completely agree with the last highlighted phrase.

And we should add a variable to the code that will be responsible for the accuracy of the calculated lot. That would be more universal! ;)

 
Vinin:


We need to move from calculating later to calculating on the fly. And of course enter the minimum and maximum risk. The formula can change the lot size in predefined parameters. If you use lot 0, you have to make calculations based on virtual trading.

Here are the golden words, by the way (page 2). After lot calculation by Vince we start to use big lot, and it means big risks. As a result depo and strategy fail...
 
MaxZ:

...And we should add a variable to the code which will be responsible for the accuracy of the calculated lot. That would be more universal! ;)

It's not clear here...
 
Roman.:
It's not clear here...
lot = NormalizeDouble((FreeMarginRisk*AccountFreeMargin()/H)*Min_Lot, EXTERN DOUBLE);
 
MaxZ:


I understood that this variable must be used by FreeMarginRisk... :-))) To select the part of DEP...

But the question is different, if the type of account where, Step is, 0,1, then EXTERN DOUBLE = 1, if any, for example, micro (it all depends on the DC and its account types and trading conditions), then EXTERN DOUBLE = 2... Is that all?

 
Roman.:


I understood that this variable must be used by FreeMarginRisk... :-))) To select the part of DEP...

But the question is different, if the type of account where, Step is, 0,1, then EXTERN DOUBLE = 1, if any, for example, micro (it all depends on the DC and its account types and trading conditions), then EXTERN DOUBLE = 2... Is that all?


But why use extern for that? The Expert Advisor can find it all out anyway. And the calculations must be made with these parameters in mind.
 
Vinin:

But why use extern for this? The Expert Advisor can find all this out anyway. And the calculations must be made with these parameters in mind.

Thank you Victor, of course through MarketInfo()... :-)))
 
Yeah, well... I agree. I'm screwed! :))) And even if extern, why double...
 

There's a logical error somewhere... I took code from this thread, converted it to a script, ran it through account history. I've got 100k account (starting account), minimal trade volume was 0.01, I got the following results


2011.12.14 17:51:17 CADCHFFXF,M15: Closed Positions = 1982 Net Profit/Loss = 137037.4 Last 1982 closed position has a Profit/Loss = -106.31

2011.12.14 17:51:17 optimal_f CADCHFFXF,M15: Maximum Loss on position, D = -17730.00 Pow (1/Orders)= 0.00050454

2011.12.14 17:51:17 optimal_f CADCHFFXF,M15: G_Rez max = 1.00012448 with f = 0.25

2011.12.14 17:51:17 optimal_f CADCHFFXF,M15: H=D/(-f): 70920 lot = 0.02 Transaction_number = 1981

I.e., lot calculation system by Vince finds ideal for trading at this time interval - a lot size 0.02. With hundreds of thousands on the deposit - isn't it idiocy? :) If it is stupid - it means there is a misunderstanding somewhere. The first thing that comes to mind is the lot size should be calculated based on the stop loss for the next position knowing the share of deoption recommended by Vince's mathematics. This means that the calculated lot size used in testing of Expert Advisors in this branch is a bit wrong.

 
ph3onix:

1. There's a logical error somewhere... Took the code from this thread, converted it to a script, ran it through account history. I have 100k account (starting account), minimal trade volume was 0.01, I got the following results


2011.12.14 17:51:17 CADCHFFXF,M15: Closed Positions = 1982 Net Profit/Loss = 137037.4 Last 1982 closed position has a Profit/Loss = -106.31

2011.12.14 17:51:17 optimal_f CADCHFFXF,M15: Maximum Loss on position, D = -17730.00 Pow (1/Orders)= 0.00050454

2011.12.14 17:51:17 optimal_f CADCHFFXF,M15: G_Rez max = 1.00012448 with f = 0.25

2011.12.14 17:51:17 optimal_f CADCHFFXF,M15: H=D/(-f): 70920 lot = 0.02 Transaction_number = 1981

I.e., system of lot calculation according to Vince finds ideal for trading at this time interval - the lot size is 0.02.

2. At hundreds of thousands on the deposit - isn't it idiocy? :) If it is stupid - it means that there is a misunderstanding somewhere. The first thing that comes to mind is that the lot size should be calculated based on the stop loss for the next position knowing the share of deoption recommended by Vince's mathematics. This means that the calculated lot size used for testing of Expert Advisors in this branch is a bit wrong.

There are no errors. Read again the previous page in this branch, especially pay attention to the terminal formulas for lot calculation, namely

lot = NormalizeDouble((FreeMarginRisk*AccountFreeMargin()/H)*Min_Lot,2);

The value of f=0.25 you received is from its working range. Proceeding from H=D/(-f): 70920, we have that the value of the largest loss on the trade

D = H * (-f) = -17 730, note that this figure is obtained when trading with 0.01 lot. As a result, you and come out at calculated Vince lot = 0.02.

If at you the D-value at such trades on min. volume would be not -17,730, but for example - 730 and this value is received on min. lot not 0,01, but 0,1, here already will be following picture for calculation of the subsequent volume of lots: H = -730/-0,25 = 2920, lot = (137 037/2920) * 0,1 = 4,7 lots. Here I understand it is already more or less a figure for your starting 100 000 after a certain number of trades with 0.1 min. lot to gain some profits 37 037 for the possibility of lot calculation for optimum f.

2. Not a misunderstanding. There is no misunderstanding. This is how R Vince cares about preserving your dEp and its exponential growth!!!!!!! :-)))

And what do you want, when in your example, with a starting min volume of 0.01 lots you got a maximum losing trade of -17,730!!!! Six losses like that in a row and your account will be wiped out.

Here is the original source

Reason: