Correct calculation of the lot from the % of the deposit - page 7

 
zoritch:

what does it have to do with platforms... he's really not trading at night... all are asleep ... :-)))

trading is possible in Metatrader on SMS, although the spread increases, but it is possible.

 
gochu:

here is a function for TICKSIZE and POINT mismatch

only on the alpari 53 pairs demo, I never saw a single pair that had a different TICKSIZE


find a broker with futures and play there
 
On the MT5 forum a guy gives a way to calculate the MM, see if you can get his idea to work http://ruforum.mt5.com/threads/55052-raschet-mm
 

I think the subject is not covered.

MODE_TICKVALUE and MODE_MARGINREQUIRED should both be involved in correct calculation of the lot for a multi-currency EA, considering the task of the branch.

The parameter "TICKVALUE" will give us equal comparability of the instruments in the trade

and "MARGINREQUIRED" parameter will limit the margin in % of the deposit

The calculation algorithm should consist of 2 cycles. The first one uses "TICKVALUE", and the second one uses "MARGINREQUIRED".

 
_new-rena:

I think the subject is not covered.

MODE_TICKVALUE and MODE_MARGINREQUIRED should both be involved in correct calculation of the lot for a multi-currency EA, considering the task of the branch.

The parameter "TICKVALUE" will give us equal comparability of the instruments in the trade

and "MARGINREQUIRED" parameter will limit the margin in % of the deposit

The calculation algorithm should consist of 2 cycles. The first uses "TICKVALUE", the second "MARGINREQUIRED".



clarify what we are talking about here - what do multicurrency and cycles have to do with it?

The fact that both of the above values should be present is not in doubt.

 
keekkenen:


explain what we are talking about here - what do multicurrency and cycles have to do with it ?

The fact that both of the above values should be present is not in doubt...


Based on the highlighted, it is already clear that the topic is not implemented in the published codes.

When the implementation starts, the answer to the first question will appear automatically.

 
_new-rena:


Based on the highlighting, it is already clear that the topic is not implemented in the published codes.

Once implementation starts, the answer to the first question will appear automatically.


is this a support/I fantasise/guess-it-yourself (underline as appropriate) ?
 
keekkenen:

is this a theme/I'm fantasizing/guess-it-yourself (underline) kind of thing?

That was the right answer. I thought it was on topic. If not, I'll post it.
 

Yes, no... I don't need a code, I have my own, it's simple - we get the amount available to open a position (taking into account % risk, optionally minus possible losses on non-losing orders),

and then from that amount we get a lot, taking into account stoploss size, MODE_TICKVALUE and MODE_MARGINREQUIRED with an upper limit of possible lot in the account (the only thing missing is a multiple of TICKSIZE for futures, but I'm not trading them yet) ...

 
keekkenen:

Yes, no... I don't need a code, I have my own, it's simple - we get the amount available to open a position (taking into account % risk, optionally minus possible losses on non-losing orders),

and then from this amount we obtain a lot, taking into account the stop loss size, MODE_TICKVALUE and MODE_MARGINREQUIRED with an upper limit of possible lots in the account (the only thing missing is the adjustment of multiplicity of calculations by TICKSIZE for futures, but I don't trade them yet) .


I see.

I've read above and still don't understand - why do I need stop loss in calculation?

I thought the logic is as follows:

1. we have a percentage of the deposit in terms of money

2. we calculate the price movements of currency pairs by one pip for each - find the amount

3. calculate the number of points - for how many of the money from point 1 is enough

4. Calculate the lot for each currency pair

5. calculate the margin involved by calculating the margin for each pair, taking into account the calculated lot

6. compare the result with the point 1 and find the conversion factor

7. recalculate the lot size taking into account the coefficient and at the same time add up the lot*the deposit

8. check the equality of the lot * pledge == point 1 (?)

9. leave if everything worked (if not - search for an error in the calculation).