[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 180

 
I'm sorry, how?
 
clt+ctrl+del. google how to complete the process
 

How to manage slippage when closing an order intelligently?

Situation. I am closing a SELL-order, here is a code line:

OrderClose(OrderTicket(), OrderLots(), NormalizeDouble(Ask,Digits), slip, Red);
slip=3;

Sometimes I get error 129: ERR_INVALID_PRICE (Incorrect price).

I looked through logs and found out that the error occurs when I try to close relatively large lots (for example, >1 lot at 0.01 minimum). I suspect that the problem is small slippage. That's where the above question came from.

 
100yan:

...and experience is the son of misfortune...
Wrong. Experience is when something positive is gained or new is learned in the absence of information. In this case, there was a routine - it seems that people already knew that this strategy does not work. Routine never gives experience.
 
volshebnik:
I wonder on what basis it should have been "clear as day" ? Roman, thank you for your help - but it turned out to be a Sisyphean task - a waste of time, and not a small one at that. If you knew for sure that it was not working, I think you could have said at once, without holding back: I would have spent this time on researching other options. It's a couple of months down the drain.


In fact, who knows, maybe there was something useful in it... No one knows... One can only (like me) assume about it, based on one's own experience and knowledge, and

No one will tell you a precise estimate without (as you correctly noted - 2 months of work) - that's for sure and that's normal. I myself sometimes come to similar answers based on solutions to any problem - and let me assure you it is not Sisyphean work - as a result of such research, even at times routine operations, each comes to his own solution, the main result, even if negative - most importantly it is obtained ... If they tell you that this is black and that is white, go this way and do not go that way, (sorry for the advice) tell them to go fuck themselves... In any case, you need to let everything go through your decision-making lens and then come to some conclusions... As for that question (previously discussed), you could only assume that the terms of entry are very primitive and unlikely to be positive ... it was not for nothing that I wrote to you to share your findings when I gave you a scheme for how to solve that problem in the best possible way - yes, it turned out that "all is not brilliantly simple" - so what... let's move on... And you - "tell me straight away, do not hold back" - but no one will tell you if you yourself have not carried out work with exactly the same conditions - I did not before ...

P.S. Thank you for writing off your findings so that others know and dig in "other" directions.

 
volshebnik:
Wrong. Experience is when something positive is gained or new is learned in the absence of information. In this case, there was a routine - it seems that people already knew that this strategy was not working. Routine never gives experience.

The same thoughts were had when it took about a month to try to create something suitable. At 4 o'clock I went to bed in disappointment, the day passed in the daily routine, I forgot about all that nonsense, but the next day came the understanding of why the implemented ideas do not work, and how it could be understood from the beginning. And this is a significant result.
 
Roman.:


Yes, in fact, who knows, maybe a grain of usefulness could be in this one as well... No one knows... Maybe only (like me, for example) speculate about it, based on their experience and knowledge, and

No one will tell you an accurate estimate without (as you correctly noted - 2 months of work) - that's for sure and that's normal. I myself sometimes come to similar answers based on solutions to any problem - and let me assure you it is not Sisyphean work - as a result of such research, even at times routine operations, each comes to his own solution, the main result, even if negative - most importantly, it is obtained ... If they tell you that this is black and that is white, go this way and do not go that way, (sorry for the advice) tell them to go away... In any case, you need to let everything go through your decision-making lens and then come to some conclusions... As for that question (previously discussed), you could only assume that the terms of entry are very primitive and unlikely to be positive ... it was not for nothing that I wrote to you to share your findings when I gave you a scheme for how to solve that problem in the best possible way - yes, it turned out that "not everything is brilliantly simple" - so what... let's move on... And you - "tell me straight away, do not hold back" - but no one will tell you if you yourself have not carried out work with exactly the same conditions - I did not before ...

P.S. Thank you for writing off your findings, so that others know and dig in "other" directions.

Roman, thank you for your thorough answer! You have a glimpse of life's knowledge. About the primitiveness of the strategy - sorry, I haven't found anything really worthwhile yet ... And all brilliant really simple, sometimes even fantastic - just brilliant not everyone and not immediately open.
 
kiimar:

I had the same thoughts when it took about a month to try to create something suitable. At 4 o'clock I went to bed in frustration, the day passed in the daily routine, forgot about all this nonsense, but the next day came the understanding of why the implemented ideas don't work, and how it could have been understood initially. And this is a substantial result.
That's the "essential result". I had no "understanding" about the tested strategy ) However, there was an idea - to check the floating TP, but no more.
 
volshebnik:
Roman, thank you for your thorough answer! You have a glimpse of life's knowledge. About the primitiveness of the strategy - sorry, I haven't found anything really worthwhile yet ... And all brilliant really simple, sometimes even fantastic - just brilliant not everyone and not immediately open.

Let's work ... :-)))
 

The manual for OrderModify() says:

Если в качестве параметров функции передать неизмененные значения, то в этом случае будет сгенерирована ошибка 1 (ERR_NO_RESULT).

Can this error not be handled? If not handled, won't there be any problems with the dealer and trade?