Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1151
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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