Mt4 End of support. - page 38

 
Galina Bobro:

What's so strange? It's a silly idea to explain to a person who will spend another 10-20 pages proving the opposite. Your programming style is perfect and cannot be criticized.

Criticize it on its own merits.
 

Forum on trading, automated trading systems and trading strategy testing

Mt4 End of support.

Nikolai Semko, 2017.09.12 02:02

I have a problem with this algorithm, because it does not work when a new bar arrives in the current timeframe, and if you run it on a day, you can wait the whole day until it works.
This is my fault. And on the subject of "littering the code", there is no such a thing. We can move the loop of filling of the array to a separate function, but it is not urgent at this stage. So why are you picking on me?
 

I'll try to make it clearer:

1) if the code does not work, it is the author's problem and the author's problem alone; no one is to blame but the author. Judging by the messages, you yourself are not sure that it works, i.e. do not properly verify.

2) Russian names - at least it's inconvenient (okay, you can close your eyes) and it may not work everywhere, as in this case the debugger, and even worse, if the system is not in the Russian language. Don't say you don't need the debugger until you try it and find out what it is.

3) Nothing in the code should be repeated - this is a very bad style of programming. Are you going to correct every character manually? What if the terminal does not show "EURUSD", but shows "EURUSDf" or even FORTS, or some shares? If something is written more than twice - there must be a function that does this.

 if(Новый_бар && Этот_символ == "EURUSD" && Этот_таймфрейм == PERIOD_M5)
         {
          Print("M5");
         }
       //---------------------------------- 
       if(Новый_бар && Этот_символ == "EURUSD" && Этот_таймфрейм == PERIOD_M1)
         {
          Print("M1"); }

4) You just took a huge chunk for all TFs and symbols from the review... Why allocate memory for symbols which may never be requested? And if the user needs a symbol not from the market review?

5) By the way, what about EuroBucks I did not understand - will you manually type all the symbols in this way? Then here's the bad news - there are a lot of symbols, and you hopefully want to be a programmer, not a "typing operator"

-----

You can still dig through the code, the list can be long, but you should at least understand it - already the code will be much better.

 
Реter Konow:
You're the big expert here. Evaluate my solution in terms of correctness and economy of resources. You've figured it out. Why don't you say anything?

Your approach is fundamentally flawed. And why do you ask, you don't care.

 

The roots come from here, from this belief :

Forum on trading, automated trading systems and trading strategy testing

Mt4 End of support.

Retag Konow, 2017.09.09 23:20

The analogy is flawed. This is the world of trading, and the people who come here are by and large adventurers, not future scientists and engineers. Their goal is to try their luck and make a lot of money fast. Of course, for such serious people as we all are here together with you, it is not serious, - but for them it is only the point of their efforts.

Their initial brainpower is low, and the contrivances of OOP clearly discourage them from actively getting involved in our ecosystem. They would like to quickly and easily test their ideas, and they get such a load dumped on their heads that they can't help but get scared and think, "why do I need it...?"

Of course, this is a very figurative and caricatured representation of the state of things, but the point is still the same.


So he doesn't want to listen to anyone or hear anything, because... and the explanation is in the same passage.

 
Galina Bobro:

I'll try to make it clearer:

1) if the code does not work, it is the author's problem and the author's problem alone, no one is to blame but the author. Judging by the messages, you yourself are not sure that it works, i.e. do not properly verify.

2) Russian names - at least it's inconvenient (okay, you can close your eyes) and it may not work everywhere, as in this case the debugger, and even worse, if the system is not in the Russian language. Don't say you don't need the debugger until you try it and find out what it is.

3) Nothing in the code should be repeated - this is a very bad style of programming. Are you going to correct every character manually? What if the terminal does not show "EURUSD", but shows "EURUSDf" or even FORTS, or some shares? If something is written more than twice - there must be a function that does this.

4) You just took a huge chunk for all TFs and symbols from the review... Why allocate memory for symbols which may never be requested? And if the user needs a symbol not from the market review?

5) By the way, what about the EuroBucks I did not understand - are you going to type all symbols manually in this way? Then here's the bad news - there are a lot of symbols, and you hopefully want to be a programmer, not a "typing operator"

-----


Finally, some criticism on the point.

1. Of course, no one is arguing. My inspection was superficial. However, I'm not fulfilling anyone's order now, but merely refuting the point of view that such a task cannot be effectively solved without OOP. Remember? - That's where it all started.

2. Whether it is convenient or not, whether you need a debugger or not is a totally subjective and personal matter. This, again, is irrelevant to the subject. The subject is to prove and show you how you can manage without OOP and make equally efficient solutions. 5.

3. Here I offer one of the variants of solving the task of fixing the event of a new bar for tens of symbols and timeframes with minimal load on the system. Exactly with minimal load. For the sake of this, I am forcing all future trading functionality to adapt to this solution. If resource saving is not a priority - you can use another solution.

4. See point 3.

5. This is just an example, you can write your own trading functions. This is the trader's business.

 
Реter Konow:

At last, the criticism is on point.

1. Of course, no one is arguing. My inspection was superficial. However, I'm not fulfilling anyone's order now, but merely refuting the point of view that such a task cannot be effectively solved without OOP. Remember? - That's where it all started.

2. The question is totally subjective and personal - whether it is convenient or not, whether you need a debugger or not. Again, this is irrelevant to the subject. The subject is to prove and show you how you can manage without OOP and make equally efficient solutions.

3. Here I offer one of the variants of solving the task of fixing the event of a new bar for tens of symbols and timeframes with minimal load on the system. Exactly with minimal load. For the sake of this, I am forcing all future trading functionality to adapt to this solution. If resource saving is not a priority - you can use another solution.

4. See point 3.

5. This is just an example, you can write your own trading functions. This is the trader's business.


1) The code does not work - what do you mean? What OOP?

2) Well, tell me how you like "tram" in comparison to "Mercedes". I don't really care what you like. It's purely a matter of taste.

3) You have a maximum load on your memory and system, more max you still need to think how to write. For this is what you wrote, but it seems you do not need it.

4) See point 3.

5) Yes, let the trader fix the code. There was a topic somewhere about the knowledge of the program for a trader - let him teach the bastard.

----

I think this is what I had to prove - it's pointless to say anything. I will put my amateurish opinion where I am concerned - I will go to a freelancer to finish my order better.

 

My initial task: To show effective solutions without using OOP.


The essence of my solution: - generating a global array of event flags of new bars of all symbols and timeframes once per minute.

Advantages:

1. Automatic filling of the array and automatic clearing.

2. no system load.

3. Direct access to the array from any function and saving the event flag before the array is cleared.

 
Реter Konow:

My initial task: To show effective solutions without using OOP.


The essence of my solution: - generating a global array of event flags of new bars of all symbols and timeframes once per minute.

Advantages:

1. Automatic filling of the array and automatic clearing.

2. no system load.

3. Direct access to the array from any function and saving the event flag before the array is cleared.

What the hell, once a minute. You don't get out how the bar is formed at all!
Sleeping, I have 4.41am.
 
Реter Konow:

Advantages:

3. Direct access to the array from any function and saving the event flag before clearing the array.

It is arguable that this is an advantage.

Accidentally someone will change the flag - and this will affect the behaviour of the TC.