Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 57

 
Movlat Baghiyev:
I'm sorry, I need a choice of risk percentages. I just want to open the biggest possible lot in increments of up to 0.01

Well, that's the percentages.

void OnTick()
{
  Comment( cLot(100) ); // 100%
}

At least read the code a little bit, the variables are in normal language.

double cLot(double Percent=0) {
 
Vitaly Muzichenko:

Well, that's the percentage

void OnTick()
{
  Comment( cLot(100) ); // 100%
}
M)))))I don't need any interest at all. I need to enter the market as much as possible.
 
Movlat Baghiyev:
M)))))I don't need any % at all. I need to enter the market at the maximum possible
Isn't 100% the maximum?
 
Vitaly Muzichenko:
Isn't 100% the maximum?
Please do the following to open a tester and check on a 3000 account on Euro NZD with a leverage of 1:50 what will be the lot with your formula ...very much please
 
Movlat Baghiyev:
Please do the following to open a tester and check on a 3000 account on Euro NZD with 1:50 leverage what will be the lot with your formula ...very please
Leverage, is just the level of margin charged and the smaller it is, the more margin you need, i.e. using margin size in the calculation is fine. I can't check it, I don't have such a leverage
 
invalid lots amount for FreeMarginCheck function

 
Movlat Baghiyev:
invalid lots amount for FreeMarginCheck function

Just checked and everything is working correctly. At 100% free margin there is 0.4263
 
Vitaly Muzichenko:
Just checked and everything is working correctly. At 100% free margin there is 0.4263
Can't say anything until a feature is probably shown here...
 
Vitalie Postolache:

As for getting prices from a lower TF, there are CopyRates and similar functions for each price individually.

It is copied into an array, then in the cycle the time is compared to the time of a candle of a high TF, if the low candle fits, then the price is calculated in the indicator.

This is what the general candle looks like visually ( this is just a picture ) , blue is the close ( it is shown by the indicator whose code is given above ) , red is the low , green is the high , the question is how to get this low and high .

П. P.S. This is not a quote, it is a reading of the indicator movement in pips

 
Movlat Baghiyev:
I can't say anything until a function is probably shown here.

Here's

void OnTick()
{
  Comment( cLot(100)," | ",AccountFreeMarginCheck(_Symbol,OP_BUY,cLot(100)) );
}
Reason: