Using the code below prints some sort of random number before the text "Looking ....".
Print("Looking at H1 bar ", i, " time on bar local= ", TimeToStr(time), ", bar time dest= ", , TimeToStr(time-tzdiffsec));
There's an extra comma in the statement, the compiler doesn't give an error about it. If I remove it, the output looks as expected.
Markus
Unless I am misunderstanding your purpose with commas I would do it like this:
Print("Looking at H1 bar "+i+" time on bar local= "+TimeToStr(time)+"bar time dest= "+ TimeToStr(time-tzdiffsec));
-Stan
commas are better. you get with adding temporary string wich should be allocated and then freed. to eliminate this problem we've implemented StringConcatenate function
commas are better. you get with adding temporary string wich should be allocated and then freed. to eliminate this problem we've implemented StringConcatenate function
Why can't the compiler itself use that StringConcatenate functionality for string '+' operator to avoid the teporary string problem? What the purpose of replacing the intuitively clear operator with a superfluous function? I mean from user's perspective, not from developer's.
Why can't the compiler itself use that StringConcatenate functionality for string '+' operator to avoid the teporary string problem? What the purpose of replacing the intuitively clear operator with a superfluous function? I mean from user's perspective, not from developer's.
was discussed on our russian forum (you can read russian isn't?) "Индикатор или Эксперт"
was discussed on our russian forum (you can read russian isn't?) "Индикатор или Эксперт"
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
There's an extra comma in the statement, the compiler doesn't give an error about it. If I remove it, the output looks as expected.
Markus