Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1239
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
Good day!
I learn the closing value for the current instrument and the other one (the signal one for the current bar) when opening a new hourly bar.
But in reality the value for the current instrument corresponds, while the value for the signal instrument takes the value of the previous bar, i.e. if xshiftBar = 1, then it takesxshiftBar=2 for the signal one, i.e. one bar more
You can only withdraw what you have earned from this resource, which is the sale of software, signals and computer power. What is entered can only be spent on this resource.
Vitaly, you've got it wrong. You have to withdraw first, and then when and if you need it, you can deposit it.
Good day!
I learn the closing value for the current symbol and the other one (the signal one for the current bar) when opening a new hourly bar.
But in reality the value for the current instrument corresponds, while the value for the signal instrument takes the value of the previous bar, i.e. if xshiftBar = 1, then it takesxshiftBar=2 for the signal one, i.e. one bar more
To check this, replace the variables with values 1 and 2. Then you will know where the error is.
With iCustom
To check, put values 1 and 2 in place of the variables. Then you will know where the error is.
The problem is not in the variable values in my opinion. I just have a recalculation in my code at the arrival of a new hour. and it turns out that by the current symbol new bar appears and calculates the value of bar = 1, but by the signal symbol is a new bar has not yet formed or something and calculates values for bar = 2
The problem is not in the values of the variable in my opinion. I just have a recalculation in my code, and it turns out that for the current symbol a new bar appears and calculates the bar =1, but for the signal symbol a new bar has not yet been formed and calculates the values for bar =2
I want it to be exact and not "according to my opinion". Then I can say with certainty that the new bar appears on the signal symbol. And somehow wait for this new bar. There are several options, it's up to you to decide which one to use.
Greetings. Could you please give me a hint?
I need to calculate the maximum drawdown on the orders of a particular EA.
If I count by all orders, then I do so, and it fits with the results of MT itself:
I calculate it this way for one Expert Advisor:
I believe the results should be the same in the tester, but there is a difference (not immediately) of a little over a percent. What am I counting wrong?
Hello, could you please advise how to reflect indicator values in the code when one is overlaid on another, e.g. ATR is overlaid on MA, is it possible in MT4?
For MQL4 use iMAOnArray(), for MQL5 - when creating an iMA handle specify the handle of a previously created ATR instead of the price at which the moving average is calculated