
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
So as not to be unfounded, I simulated the situation I mentioned above (I can't quote it as I can't get out of quote :) ).
I ran the following code on M15:
While the script was running I connected and disconnected from the Internet. The pictures show the result.
Is it in servicedesk or a bug in the code?
The indicator should build 5 point levels from the closing price downwards in red.
But only two buffers are displayed (although it counts all of them) and not red, but green (after compilation black).
Please check if it's just me or if it's just me in general...?
Is it in servicedesk or a bug in the code?
The indicator should build 5 point levels from the closing price downwards in red.
But only two buffers are displayed (although it counts all of them) and not red, but green (after compilation black).
Please check if it's just me or if it's just me in general...?
#property indicator_type2 DRAW_ARROW
#property indicator_type3 DRAW_ARROW
#property indicator_type4 DRAW_ARROW
#property indicator_type5 DRAW_ARROW
...I believe that standard libraries are ideal code that should serve as a model for others.
I can only say that it would be desirable to get rid of such notions as soon as possible.
I have nothing against standard libraries but trusting somebody else's code "to make writing programs easier" without verifying it? - Except at the stage of initial drafting of an Expert Advisor. To speed up routine processes, so to speak.
I get the message: Abnormal termination quite often in my logbook. Has anyone noticed when there might be such a conflict?
I can't find the cause yet. The only thing I can say is that if I leave the terminal idle for a while or just use another program at that moment (e.g., Excel), the Expert Advisor I am testing starts working incorrectly after I get back to the terminal. That is, trading operations are performed without any problems. The only problem is in interacting with the trading and information panels. It seems that OnChartEvent() is glitchy. Switching between the panels starts to slow down a lot, as if the process is very busy with something else. I don't use eternal loops. Also CPU load at this moment doesn't indicate that something is actively used. Recompilation of the Expert Advisor helps. At the moment of recompilation, before the EA is deinitialized theAbnormal termination message appears in the journal. Then the program is successfully initialized and everything starts working like clockwork.
I get the message: Abnormal termination quite often in my logbook. Has anyone noticed when there might be such a conflict?
I can't find the cause yet. The only thing I can say is that if I leave the terminal idle for a while or just use another program at that moment (e.g., Excel), the Expert Advisor I am testing starts working incorrectly after I get back to the terminal. That is, trading operations are performed without any problems. The only problem is in interacting with the trading and information panels. It seems that OnChartEvent() is glitchy. Switching between the panels starts to slow down a lot, as if the process is very busy with something else. I don't use eternal loops. Also CPU load at this moment doesn't indicate that something is actively used. Recompilation of the Expert Advisor helps. At the moment of recompilation, before the EA is deinitialized theAbnormal termination message appears in the journal. Then the program is successfully initialized and everything starts working like clockwork.
Do we use IsStopped() in loops?
You may read about such problems here, here and here. You should also think about where in the code there are "bottlenecks"...
As far as I understand, this error occurs in case of "early" program termination (when the chart/terminal is closed or the Expert Advisor is recompiled), and during this operation the Expert Advisor performs some work.
Do we use IsStopped() in loops?
Read about similar problems here, here and here. Also think about bottlenecks in the code...
As far as I understand, this error occurs in the case of "early" termination of a program (when the chart/terminal is closed or the Expert Advisor is recompiled), while the Expert Advisor performs some work.
Thank you. The links show the same situation. I never use IsStopped() in loops, only break, continue and return.
So far, I have not seen any connection betweenIsStopped() and the program slowing down. After all, if the program would freeze, no other operations would be performed. Or am I mistaken?
One more thing.IsStopped() is useful when you need to stop execution of a program forcibly, for example, to close the terminal or delete Expert Advisor from chart. And I need to continue using the Expert Advisor.
Thank you. The links show the same situation. I don't use IsStopped() in loops anywhere, only break, continue and return.
So far, I have not seen a connection betweenIsStopped() and the slowing down of the program. If the program would freeze, no other operations would be performed. Or am I mistaken?
One more thing.IsStopped() is useful when you need to stop execution of a program forcibly, for example, to close the terminal or delete the Expert Advisor from the chart. And I need to continue to use the Expert Advisor.
I get the message: Abnormal termination quite often in my logbook. Has anyone noticed when there might be such a conflict?
I can't find the cause yet. The only thing I can say is that if I leave the terminal idle for a while or just use another program at that moment (e.g., Excel), the Expert Advisor I am testing starts working incorrectly after I get back to the terminal. That is, trading operations are performed without any problems. The only problem is in interacting with the trading and information panels. It seems that OnChartEvent() is glitchy. Switching between the panels starts to slow down a lot, as if the process is very busy with something else. I don't use eternal loops. Also CPU load at this moment doesn't indicate that something is actively used. Recompilation of the Expert Advisor helps. At the moment of recompilation, before the EA is deinitialized theAbnormal termination message appears in the journal. Then the program is successfully initialized and everything starts working like clockwork.
Abnormal termination means that you have interfered with the program unnaturally, namely, recompiling it at runtime, which leads to program interruption and reinitialization.
The same happens if you hit a division by zero or interrupt the program at runtime, but if the program is retuned, you won't get such an entry. This is why you are advised to check for IsStopped so that the program can exit on its own return instead of being forced to do so.
Are there any plans to add the following items:
Double click on a position on the chart
to bring up the position management menu.
Highlighting multiple positions to close at once
????
Thank you.