Good afternoon. Is there any way to set the slope of a trend line as a percentage, rather than in points between the first extremum and the second one (we use them to draw the trend line)? I.e., Ext. 2 is located at x% versus Ext. 1. I read the mql forum, where they suggest creating virtual coordinates that depend on the price and time scale and, if the scale is changed, they will also change. @Artyom Trishkin
DotCom: Good afternoon. Is there a way to set the slope of a trend line as a percentage, rather than in points between the first and the second extrema (we use them to plot the trend line)? I.e., Ext. 2 is located at x% versus Ext. 1. The mql forum advises to create virtual coordinates that depend on the price and time scale and, if the scale is changed, they will also change. @Artyom Trishkin
How do I calculate all charges related to a position?
In MT4, I obtained and added swap and order commission for this purpose using OrderSwap() and OrderCommission() functions;
I need to do the same in MT5, but I have difficulties with netting and hedging. I need a universal solution that will work correctly in both modes.
I can get swap by position using the PositionGetDouble(POSITION_SWAP) function;
But the commission is paid for each deal that took part in the position formation. Therefore, we need to get the entire history of deals on the position HistorySelectByPosition(position_id).
And then loop through all deals of this position and sum the commission HistoryDealGetDouble(deal_ticket,DEAL_COMMISSION).
However, in addition to commissions, I found another expense item in the reference: DEAL_FEE - payment for carrying out a transaction. It is charged as soon as the transaction is completed.
Isn't this the same as commission? And what about these costs, should they also be added together with commission DEAL_COMMISSION?
Отсчет элементов копируемых данных (индикаторный буфер с индексом buffer_num) от стартовой позиции ведется от настоящего к прошлому, то есть стартовая позиция, равная 0, означает текущий бар (значение индикатора для текущего бара). При копировании заранее неизвестного количества данных в качестве массива-приемника buffer[] желательно...
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Does anyone know how to distinguish a graphical object created by the program from a manually created object in the terminal?
Previously terminal objects had a name beginning with #
Now there is no such distinction in mt 5
Good afternoon. Is there a way to set the slope of a trend line as a percentage, rather than in points between the first and the second extrema (we use them to plot the trend line)? I.e., Ext. 2 is located at x% versus Ext. 1. The mql forum advises to create virtual coordinates that depend on the price and time scale and, if the scale is changed, they will also change. @Artyom Trishkin
in degrees you can)
in degrees you can)
thought about it, but if you scale the graph, degrees will change, it is better to have a relative value %
thought about it, but if you scale the graph, degrees will change, it is better to have a relative value %
If you scale it to a fixed scale, the values will be constant.
Good afternoon. I have a question about MQL5.
How do I calculate all charges related to a position?
In MT4, I obtained and added swap and order commission for this purpose using OrderSwap() and OrderCommission() functions;
I need to do the same in MT5, but I have difficulties with netting and hedging. I need a universal solution that will work correctly in both modes.
I can get swap by position using the PositionGetDouble(POSITION_SWAP) function;
But the commission is paid for each deal that took part in the position formation. Therefore, we need to get the entire history of deals on the position HistorySelectByPosition(position_id).
And then loop through all deals of this position and sum the commission HistoryDealGetDouble(deal_ticket,DEAL_COMMISSION).
However, in addition to commissions, I found another expense item in the reference: DEAL_FEE - payment for carrying out a transaction. It is charged as soon as the transaction is completed.
Isn't this the same as commission? And what about these costs, should they also be added together with commission DEAL_COMMISSION?
Correct me if I am wrong.
Please advise and MQL4 to take the previous value of MA I wrote
MQL5 does not have " i+1" parameter for iMA
How do I do it now?
I want to remake this indicator for MT5Please advise and MQL4 to take the previous value of MA I wrote
MQL5 does not have " i+1" parameter for iMA
How do I do it now?
I want to remake this indicator for MT5Open the Expert Advisor file "Moving Average.mq5" and see an example of working with indicators in MQL5.
Please advise and MQL4 to take the previous value of MA I wrote
MQL5 does not have " i+1" parameter for iMA
How do I do it now?
I want to remake this indicator for MT5