Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1434
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
that's for me,
there will be an extra lag until all dots are set by the chart during compilation
If necessary (for example, recompile), create a terminal variable expetname.deinitreason.ChartId() in OnDeinit and give it a flag temporary, put the reason code there. The same with related data (you may need it).
in OnInit - see if the variable exists, act on its value.
and delete such variable in any case...
---
hint - abnormal terminations are caught in the same way but in reverse :-) In OnInit a variable is checked and created, and in OnDeinit it is deleted. If a critical error occurred and EA/terminal just crashed, the variable will remain.
If necessary (e.g. recompile), create a terminal variable expetname.deinitreason.ChartId() in OnDeinit and give it the flag temporary, place the reason code there. The same with related data (you may need it).
in OnInit - see if the variable exists, act on its value.
and delete such variable in any case...
---
hint - abnormal terminations are caught in the same way but in reverse :-) In OnInit a variable is checked and created, and in OnDeinit it is deleted. If a critical error occurred and EA/terminal just crashed, the variable will remain.
I'm familiar with files and global variables, it's not worth to create this, maybe developers will remove from compilation - 0, or even add a state that the terminal started, for example, I may add a history loader for multisymbol instead of input
Hi all! The idea was to make the candles, volume, in different colours depending on the direction of the candles (up or down). However, the last candle gets different colours because of changes in the direction of the candle over time. And over time, all the candles get different colors. The question is how to change the colour of the last candle and not to change the others. Or maybe another idea.
Reset unnecessary buffers
iVolume_UP[i]=EMPTY_VALUE;
link to a separate topic -SERIES_LASTBAR_DATE
the printer showed that the missed signal because - the signal came from the indicator through the custom event, it checked for a new bar using SERIES_LASTBAR_DATE and
in the print the data of the previous bar, not new ..., about 50 trades in total of 7 characters, slips such, what can you look at, any ideas? ping 150.
Ryzen 3700x processor 16 threads
----
if i use a similar multi-symbol scheme, i have tried it on 2 or 3 terminals in realtime, on M1 for example, i wait from a couple hours to half a day for a skip like this, with 40-50 trades per day
Processor load a few % of the robot, almost sleeps.
one trade at 30-50, okay, it can close both in the black and in the black, but
I have a system for calculating total profits, which is quite tricky, and it should involve this trade now, not at the next signal
you can dig deeper for 5 years.
if the event model is crooked, please let the developers know so it can be discarded, judging from the initial posts on spy, where different variants were tested, there was also scatter and omissions?Reset unnecessary buffers
If theArraySetAsSeries(Buffer, true) function is applied
, only indexing is expanded? Or the buffer values are expanded as well?
Guys, please advise, I'm confused with indexing in mql5 indicator buffers.
If theArraySetAsSeries(Buffer, true) function is applied
, only indexing is expanded? Or the buffer values are expanded as well?
When true the zero bar of indicator buffer is rightmost on the chart. At false it is leftmost.
Thank you.
Hides the main chart window, and subwindows of the installed indicator.Artem please tell me one more thing.
The function
How can I hide only the main chart window? At the same time, the indicator subwindow should remain visible.