Invalid request - just started and can't figure it out... - page 7

 
papaklass:

My post is an answer to the question why I don't use the standard library

Actually, so do I. But me for the reason - that I created my classes much earlier than MK.

and an attempt to draw developers' attention to redundancy of metads in a class.

I don't think it's redundant. that's how OOP is essentially. you just have a different vision of wrappers, a different class design and trade structure logic. it's probably a matter of taste.

------------------------

But with trade errors - let's give examples. Do you have a universal way to handle e.g. 10008 -> 10012 ?
Let's say, independently of previous and subsequent actions of the Expert Advisor.
What should be the result of the processing of this order which has not opened ...

 

unused functions are sort of excluded from the final file.

Another thing is that almost always, "non-universal" code is faster than universal code (EAs, for example, are optimised faster, and the claudes are paid a bit less).

 
Don't forget about optimizing compiler + mass inlining.

Only and only those functions are taken that are called in the code, and everything else is skipped during optimization. That is, if only 3 of the class with 61 methods are used, it is the code of three methods that will be included.

Inline functions, taking into account the small size of the functions themselves and code optimization in general makes the code simple and flat.
 
papaklass:

Therefore, the case (10008 -> 10012) is not of interest to me, because if the position is not opened on a certain tick, it will be opened on the next tick.

I try to build my code in such a way that, if the Expert Advisor's logic requires opening a position, the position is opened most of the time. Whether it is opened on the next tick or 10 ticks later,

that is exactly the right approach.

And then getting back to the question of error handling - what is missing in the standard library? What improvements in the direction of error handling/analysis do they want to put into it?

 
papaklass:

opening a position with a lot greater than the available funds, or when placing a pending order, the minimum allowable step from the current price is not maintained, or a stop is placed without taking into account the direction of the position.

And what is meant by the processing of these situations, correction of flaws in the programmer's order by the library itself?
i.e. the library itself reverses stops, or changes the lot at its own discretion?

or just send the appropriate code in response and let the proger know about his wrong order?

 
sergeev:

and what is meant by handling these situations, the library itself correcting the deficiencies of the programmer's order?
that is, so that the library itself reverses the stops, or changes the lot at its own discretion?

A couple more innocent questions and papaklass will start to guess and suspect something...
 

It's just that programmers have different perceptions of "necessity and sufficiency", which is why questions about extending functionality are raised.

It is better for them to be completely clear than to remain guessing.

 
papaklass:
Once again, I'm not convincing anyone of anything. You think the biblio is fine, let it stay as it is. Even after the discussion, I will not use this library. Me alone, can I?

Alexander, you're not the only one. But that's not the point of the question. To be or not to be.

The question is purely practical - with benefits for development (possibly yours).

What is meant by processing of these situations, correction of flaws in the programmer's order by the library itself?
That is, the library itself reverses the stops, or changes the lot at its discretion?

Or just send the appropriate code in response and let the proger know about his wrong order?
 
papaklass:
... Why not tell the programmer that his order is invalid and issue an error code before sending?
It seems like wrong request is cut off at client stage and does not reach the server.
 
papaklass:
The answer is on the surface - why send an order to the server that is incorrect and wait for a response? Why not tell the programmer right away that his order is wrong and issue an error code before sending it?
are we talking about adding OrderCheck to CTrade::OrderSend?