Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 144

 
hoz:


Thank you. Somehow I haven't done that before, although I have read it. Need to build on that skill.


I've been looking at your implementations in my spare time... It's a real pain in the ass to figure out what's what. The libraries don't compile. Although you have very logical and competent implementations. It's good for your mind to dig around. While I was digging, my brain started to boil)) And I've already started to confuse one from the other.

One thing is strange. You have a couple of functions that partially duplicate one another. For example,

fCheck_ValidStops () - Checking correctness of setting STOPPs

fCheck_LevelsBLOCK() - Checking for validity of FREEZELEVEL and STOPLEVEL

Stops are checked in the first case and in the second case, too. But the second one checks freezevel too. What good is it?

Your logic is strange: if one function closes BUY orders, while another closes SELL ones, that is normal and there is no sign of duplication. And if you see identical names in function descriptions, you get "Warning! I already told you: "The answer you get "for free" (from outside) does not reach your brain in full. You need to seek answers using your brain, not your keyboard."

To answer your question. Function fCheck_ValidStops() (STOPs correction) is a part of function fCheck_LevelsBLOCK() (conditions check) and "does its part". I hope the answer is clear.

 
TarasBY:

To answer your question. Function fCheck_ValidStops() (STOPs correction) is a part of function fCheck_LevelsBLOCK() (conditions check) and "does its part". I hope the answer is clear.

That's what I meant.
 

Tell me please. I don't really know, but let's say we have two for loops. One cycle handles 2 moving averages, the other cycle determines the trend. Not the same method as in the first one. Question.

We have, say, 3 bars. Do the 1stand 2nd cycles read bars simultaneously or everything happens in different order? It means, each loop may be faster, while the other one is slower. Is it the lag? I would just like to mix the 2 indices, that is. The result of each of them will be written to, say, a text file. And after that, fetch the data and process them in the function. Do you think it will be possible to write the data in txt. In other words, the same bar that was in the first one will be processed in the other loop... Well, of course, the data will also be sent to tcht and written into 1 cell.

In other words. The data from the first loop should be merged with the data from the second one. In order for the data not to be mixed with other data from another loop (when the second loop sends data from the second bar).

Here is a question. Say, we'll assemble an array (from one loop and from the second one, 2 different arrays) in a loop, is it possible? Say, we will write in the loop ff[], which will contain what array structure. Such arrya([d]=>r,[r]=>ff), if everything is correct. By collecting the array from one loop and from the second loop. Tell me what can be done. How to combine, if it is possible to combine. Then the only thing left to do is to loop through the array, and in the loop, respectively, send data to the function. Can you tell me the solution to this variant, the code.

 
Zolotai:

Tell me please. I don't really know, but let's say we have two for loops. One cycle handles 2 moving averages, the other cycle determines the trend. Not the same method as in the first one. Question.

We have, say, 3 bars. Do the 1stand 2nd cycles read bars simultaneously or everything happens in different order? It means, each loop may be faster, while the other one is slower. Is it the lag? I would just like to mix the 2 indices, that is. The result of each of them will be written to, say, a text file. And after that, fetch the data and process them in the function. Do you think it will be possible to write the data in txt. In other words, the same bar that was in the first one will be processed in the other loop... Well, of course, the data will also be sent to tcht and written into 1 cell.

In other words. The data from the first loop should be merged with the data from the second one. In order for the data not to be mixed with other data from another loop (when the second loop sends data from the second bar).

Here is a question. Say, we'll assemble an array (from one loop and from the second one, 2 different arrays) in a loop, is it possible? Let's say we write ff[] in the loop, which will contain what array structure. Such arrya([d]=>r,[r]=>ff), if everything is correct. Assembling the array from one loop and from the second loop. Tell me what can be done. How to combine, if it is possible to combine. Then the only thing left is to loop through the array and in the loop, respectively, send the data to the function. Can you tell me the solution to this variant, the code.



Personally, I don't understand the point of the question. A lot of words and no clarity. And the cycles... should be counted one at a time, as I understand it.
 
Zolotai:

Tell me please. I don't really know, but let's say we have two for loops. One cycle handles 2 moving averages, the other cycle determines the trend. Not the same method as in the first one. Question.

We have, say, 3 bars. Do the 1stand 2nd cycles read bars simultaneously or everything happens in different order? It means, each loop may be faster, while the other one is slower. Is it the lag? I would just like to mix the 2 indices, that is. The result of each of them will be written to, say, a text file. And after that, fetch the data and process them in the function. Do you think it will be possible to write the data in txt. In other words, the same bar that was in the first one will be processed in the other loop... Well, of course, the data will also be sent to tcht and written into 1 cell.

In other words. The data from the first loop should be merged with the data from the second one. In order for the data not to be mixed with other data from another loop (when the second loop sends data from the second bar).

Here is a question. Say, we'll assemble an array (from one loop and from the second one, 2 different arrays) in a loop, is it possible? Let's say we write ff[] in the loop, which will contain what array structure. Such arrya([d]=>r,[r]=>ff), if everything is correct. Assembling the array from one loop and from the second loop. Tell me what can be done. How to combine, if it is possible to combine. Then the only thing left is to loop through the array and in the loop, respectively, send the data to the function. Can you tell me the solution to this variant, the code.

I don't get it at all. Give me the gun...
 
hoz:


Personally, I don't understand the point of the question. A lot of words and no clarity. And the cycles... have to take turns, as I understand it.
Why not? You can do nested ones, too.
 
artmedia70:
I don't see why not. You can do nested ones too.


I don't know which ones he means...
 
hoz:

I don't know what he means by that...
I don't know what he means... :))
 
Zolotai:

Tell me please. I don't really know, but let's say we have two for loops. One cycle handles 2 moving averages, the other cycle determines the trend. Not the same method as in the first one. Question.

We have, say, 3 bars. Do the 1stand 2nd cycles read bars simultaneously or everything happens in different order? It means, each loop may be faster, while the other one is slower. Is it the lag? I would just like to mix the 2 indices, that is. The result of each of them will be written to, say, a text file. And after that, fetch the data and process them in the function. Do you think it will be possible to write the data in txt. In other words, the same bar that was in the first one will be processed in the other loop... Well, of course, the data will also be sent to tcht and written into 1 cell.

In other words. The data from the first loop should be merged with the data from the second one. In order for the data not to be mixed with other data from another loop (when the second loop sends data from the second bar).

Here is a question. Say, we'll assemble an array (from one loop and from the second one, 2 different arrays) in a loop, is it possible? Let's say we write ff[] in the loop, which will contain what array structure. Such arrya([d]=>r,[r]=>ff), if everything is correct. Assembling the array from one loop and from the second loop. Tell me what can be done. How to combine, if it is possible to combine. Then the only thing left to do is to loop through the array, and in the loop, respectively, send data to the function. Can you tell me the solution to this variant, the code.


artmedia70:
Yeah, there's no way of knowing what he means there at all... :))


as I understood (I hope correctly :))Zolotai wants to take data from two loop statements and write them to text files. From each one to a separate file. Then he wants to load the data from these files into arrays. Then these two arrays must be joined into one array so that the data from two operators are not mixed up and correlated with each other by each bar.

like this))))

 
waroder:


As I understand it (I hope correctly:))Zolotai wants to take data from two loop statements and write them to text files. From each to a separate file. Then he wants to load the data from these files into arrays. Then these two arrays must be joined into one array so that the data from two operators are not mixed up and correlated with each other by each bar.

like this))))


Reason: