[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 556
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
HELP!!!
https://www.mql5.com/ru/forum/137960
It is of course better to switch to read/write array
1. Don't change the size of the array by 1 at every iteration, it's better to do it less frequently, for example increase it in increments of 50 or 100 if necessary
2. You'd better use DoubleToStr() for check printing.
3. I don't understand why a string variable is used for reading
It is better of course to switch to read/write array
1. Don't change the array size by 1 at each iteration, it's better to do it less frequently, e.g. increase it in increments of 50 or 100 if necessary
2. For check printing, it is better to use DoubleToStr()
3. I don't understand why a string variable is used for reading
1. it doesn't work otherwise. it writes null rows, like for 4 columns it must be updated every time
2. ok.
3. one special advised, now it reads everything correctly. but it turns out, one null row is redundant, and one extra run.but the value is not there, so it fills the null row accordingly.
1. it doesn't work otherwise. it writes null rows, like for 4 columns you have to update each time
2. ok.
3. a special advised one, now it reads everything correctly. but it turns out, one null row is extra, while one extra run.and the value is not there, respectively the null row is filled.
With such approach there will be big brakes.
With this approach there will be big brakes.
I see, so far it's easier for me to write this way.
Can you tell me how to get rid of "while" being executed one more time?
I see, so far it's easier for me to write this way.
how do I get rid of while being executed one more time?
I couldn't get rid of it. But I didn't use string variables
Got it. Can, then, ArrayResize(); be applied less than the cycle count, will it remove this string from the array?
Yes, it will.
The less often you use this function, the faster it works. Reserve 100 elements and read by controlling the array overrun. If necessary, increase the array again by 100 elements. At the same time you keep the actual number of elements downloaded. After a complete download of the array, you make a new ArrayResize(), but by the actual number of downloaded elements.
But the functions for working with arrays work more correctly. You should first save the number of elements of the array into a file, and then the array itself
Read the number of elements first, set the size of the array. Download the array. And no loops
Yes, it will.
The less often you use this function, the faster it works. Reserve 100 elements and read by controlling the array overrun. If necessary, increase the array again by 100 elements. At the same time you keep the actual number of elements downloaded. After a complete download of the array, you make a new ArrayResize(), but by the actual number of downloaded elements.
But the functions for working with arrays work more correctly. You should first save the number of elements of the array into a file, and then the array itself
Read the number of elements first, set the size of the array. Download the array. And no loops
Please advise how to solve the problem correctly:
There is a projection of Support/Resistance levels of the older TF to the current TF. It is necessary to determine which of the levels was the last to be tested by the price. I tried to do it through the flags:
but the log doesn't show anything.... [If I set, for example, Print(Level_Re), then running through the whole array, the log will stop at the value of the level for the last bar, i.e. levels themselves are calculated correctly, but with flags something does not work for me.... ]
What is the error? Or what is the best way to do it?
to T-G
try it like this:
datetime expiration=TimeCurrent()+MaxSecLiveTime;
OrderSend(Symbol(), OP_BUYSTOP, Lots(), PriceBuy, 0, 0, 0, EA_Comment, Magic, expiration, CLR_NONE);
and what's the difference with: