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
Please advise where the mistake is. I'm getting the exact value, but I can't make the "Obem_Pozic" value to be 1.00, so I can calculate the lot for displaying, I don't want to normalize it, just gives out 4 decimal places.
I am writing in MQL4.
I'm asking about MQL4 on the appropriate forum, here it's an A.
You should use DoubleToStr() to display more accurate values on the screen.
This pair is probably provided by the terminal, it just needs to be connected. If manually, then in Market Watch. And if it's a grown-up one, it should be done manually with SymbolSelect().
As soon as you have one error, others will follow. The first errors are at the bottom of the terminal. So, we should try to eliminate the first errors and then we'll see :)
Thanks!!! Very well understood and beautifully written. I do have SymbolSelect() in my EA. I posted it with the code on pg. 53, if you need it, you can see it. I checked with the help - it's correct!!! So, if this pair is provided by the terminal, what should I think?
Further, if the First in line errors are at the bottom of the terminal. Why don't the printer error messages and the terminal messages alternate - no, they are grouped together?
Maybe the terminal is not reporting the error from this function?
Yes, I can see that. Let's try it this way:
Thank you!!! !!
Could you please tell me what the variable timeframe print should look like, can it be digital? I see one, I mean the number one is displayed.
I'm asking why. This is a function, it has a line with the prints. The second one from the top accordingly.
Here is the function call.
Note that I use another function in the call line. It is used to convict the timeframe. It is so because my Expert Advisor has been pyrivided from 4. I have usedcase opener in it.Later on, just in case, I added F to F4 timeframes to further use it.
And this is what I see
Well, just below in this code is used
EnumToString(timeframe),
I think I've figured out where the problem might be. I will describe it now.
From the picture, you can see that EA is running on M1, timeframe==1, period==140. Is it correct?
The timeframe==1 value most likely indicates that timeframe==M1. At the same time, the periodd(period) entry means periodd(140). According to the code, the periodd(140) function must return the PERIOD_CURRENT value. So it turns out that periodd(140)==M1.
And that means that the iMA call looks like this: iMA(symbol,M1,M1...) I don't know if it's acceptable when calculating iMA for the value of the second argument to coincide with the value of the third argument (i.e. for the period to coincide with the averaging period), but something tells me that this is wrong.