[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 817

 
eugggy:
Very interesting, why is this the case and what problems could arise?

There are too many where. For example in the new position opening section, there are more where.
 
Vinin:

Too many where. For example in the new position opening section, there are more where.
I took it from the book and changed it a bit, so as not to re-invent the wheel. I have used this template a couple of times when my Expert Advisor would not open: it would open in the Strategy Tester but not in real trading. You mean this, and what could cause this?
 
eugggy:
I took it from the book and reworked it a bit, so as not to reinvent the wheel. I have used this template a couple of times to make my EA not open: it opens in the tester, but does not in real life. Is that what you mean by that, and why it may happen?

That is exactly what I was talking about. When an error occurs when opening a new position, the Expert Advisor gets stuck. It is necessary to provide minimal error handling possibly with parameter correction or a pause (the trade thread is busy) or to stop all further attempts to open a position and terminate the work of the Expert Advisor. There can still be variants. But we should at least limit the number of attempts to open a position.
 
Vinin:

This is exactly what I was talking about. If an error occurs when opening a new position, the Expert Advisor hangs up. It is necessary to provide minimal error handling, perhaps with correction of parameters, or a pause (trade flow is busy), or to stop all further attempts to open and stop the Expert Advisor. There can still be variants. But we should at least limit the number of attempts to open a position.
It is strange: the Expert Advisor is offered as a tutorial, while it has such flaws, I will correct them if I can. Going back to the Expert Advisor with error 130, could it be because of the last block where the stop order distance is checked, it uses MODE_STOPLEVEL which is 15 points?
 
eugggy:
It's strange: the EA is offered as a tutorial, but it has such flaws, I will fix it if I can. Going back to the EA with error 130: could it be because of the last block where the stop order distance is checked, it uses MODE_STOPLEVEL, which is 15p?

I cannot check the EA properly. I don't have an indicator.
 
Indicator.
Files:
 
eugggy:
Indicator.

I have no trades and no errors either. I have to redo all the problematic places
 
Vinin:

I have no trades and no errors either. I have to redo all the problem spots.
Victor, it seems that the problem area is not taking into account 4, 5 digits...

You've got a five-digit number, what's the EA under how much???

If you take that into account, that's where all the problems come out...

 
I'll have to redo it.
 

Hello!

I've seen an indicator (script) that shows the countdown to the end of the last bar. If anyone has it, please share it.

Reason: