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

 
Money_Maker:
Good afternoon, could you please tell me if it's possible to import from MSDN
MRoubd function ?
(returns number rounded to a multiple of a given value)

or how to round up for example 2285.13 as a multiple of (0.25) 2285.00 __ 2285.25 ___ 2285.50 ___ 2285.75

See the functions in the help starting with Math...

Open the editor help, select the "Index" tab in the left-hand window and start entering Math in the input field - a list of mathematical functions will appear.

Or read the online help.

 
Artyom Trishkin:

The size of the leverage provided:

long liverage=AccountInfoInteger(ACCOUNT_LEVERAGE);
so this is the leverage of the account, but how do you know the leverage of a pair?
 
SAMER:
so it's the leverage of the account, but how do you know the leverage of a pair?
What do you mean by pair leverage?
 
Artyom Trishkin:
What do you mean by the leverage of a pair?
for example euro/dollar 1k100 and stocks 1k20
 
Artyom Trishkin:

See the functions in the help starting with Math...

Open the editor's help, select the "Index" tab in the left-hand window and start entering Math in the input field - a list of mathematical functions will appear.

Or read the online help.

the thing is, none of them work... ) it's only a multiple of a number up or down.
 
Money_Maker:
the thing is, none of them fit... ) It doesn't round it up or down only in multiples of a number(.
Try to find the right information about the tool here. It's not clear to me what the "leverage of the pair" is
 
Money_Maker:
the thing is, none of them fit... ) It doesn't round it up or down to a number only.
Try to make a function that does this rounding yourself(the remainder of the fractional part of a number divided by 25 must be an integer)
 
Artyom Trishkin:
Try to make a function that performs this rounding(the remainder of the fractional part of a number divided by 25 must be an integer).
I know you can make the function yourself, I was interested in simple execution... by standard means or via WinApi
 

Greetings.

Can you tell me how to write the condition so that the action will be performed at the opening of a new candle on the current chart?

 

Hello!

Please help me write an EA.

The essence of the Expert Advisor: opens 4 orders of 1 lot.

2 to sell: usdchf; eurusd;

2 to buy: gbpusd; usdjpy;

Upon reaching a total profit of 5 pips, close all trades. And start again.