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

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
why does the compiler give a warning on this line?
Why does the compiler give a warning on this line?
Because XxxxGetInteger returns long (integer with sign), while datetime is an unsigned integer and a separate type. We should specify
datetime timeProperty = (datetime)XxxGetInteger(...)
Tell me. When I subtract, I get a number 3e-5. How do I make it look like 0.00003? Thank you.
Where do you get it?
Hello!
The OnCalculate function periodically returns 0
prev_calculated = 0
I think it's because the chart is being populated with quotes from a third party resource. It doesn't look like the chart is being overwritten though.
How can I overwrite the new data without rewriting the old ones?
I just create an indicator with some calculations, I'm not trying to load quotes.
In MQL4 only in this way:
Result:
Thank you very much for your help.
Where do you get it?
Right here.
Right here.
Alert("Разбег "+DoubleToString(delta,_Digits));
or Alert(StringFormat("Spread %.5f",delta));
In general, get used to it, these are just different representations of the same number. Think back to your wonderful school days - that's where it comes from
Hello!
The OnCalculate function periodically returns 0
I think it's because the chart is being populated with quotes from a third party resource. It doesn't look like the chart is being overwritten though.
How can I overwrite the new data in these conditions without rewriting the old data?
I just create indicator with some calculations, I'm not trying to load quotes.
Declare a global variable (do not confuse with the global variables of the terminal)
and make full recalculation only on the first tick
If firstRun will also reset along with OnCalculate parameters, the indicator will restart.