Errors, bugs, questions - page 3070 1...306330643065306630673068306930703071307230733074307530763077...3193 New comment Alexey Viktorov 2021.08.24 10:43 #30691 fxsaber:I can't manage to write a function that only outputs true in the EA when the focus switches to the EA chart. Can you give me a hint if you've encountered one. Not enough CHARTEVENT on losing and gaining focus. There's enough of everything. Somewhere it was sorted out that in the documentation is not true CHART_BRING_TO_TOP Show chart on top of all other charts bool w/o void OnChartEvent(const int id, // идентификатор события const long& lparam, // параметр события типа long const double& dparam, // параметр события типа double const string& sparam // параметр события типа string ) { if(id == CHARTEVENT_CHART_CHANGE) Print(bool(ChartGetInteger(ChartID(), CHART_BRING_TO_TOP))); }/******************************************************************/ Why at the moment of activation of window with this indicator true prints twice I did not understand, but loss of focus works fine. Документация по MQL5: Константы, перечисления и структуры / Константы графиков / Примеры работы с графиком www.mql5.com Примеры работы с графиком - Константы графиков - Константы, перечисления и структуры - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5 Any questions from newcomers Any rookie question, so EURUSD - Trends, Forecasts fxsaber 2021.08.24 11:01 #30692 Alexey Viktorov:There's enough of everything. Sorted out somewhere in the documentation, which is not true CHART_BRING_TO_TOP Show chart on top of all other charts bool w/o Why at the moment of activation of window with this indicator true prints twice I haven't figured out, but loss of focus works fine. This code behaves very badly when scrolling. Alexey Viktorov 2021.08.24 11:54 #30693 fxsaber:This code behaves very badly when scrolling. Well, yes, the code is crude. But there is a direction. fxsaber 2021.08.24 12:04 #30694 Alexey Viktorov:Well, yes, the code is crude. But there is a direction. Tried that direction too. Unfortunately, it's a dead end. Alexey Viktorov 2021.08.24 13:03 #30695 fxsaber:Tried that direction too. Unfortunately, a dead end. What's a dead end? It's easily solved... Files: changeChart.mq5 5 kb fxsaber 2021.08.24 13:08 #30696 Alexey Viktorov:What's a dead end? It's easily solved... Run it on two charts. Maximize one. Minimize both of them. Now switch tabs between the charts and watch the logs. Doesn't work, unfortunately. Alexey Viktorov 2021.08.24 13:11 #30697 fxsaber: Run on two charts. Maximise one. Minimise both. Now switch tabs between the charts and look at the logs. It doesn't work, unfortunately. Will there be new inputs next? fxsaber 2021.08.24 13:12 #30698 Alexey Viktorov:Will there be new inputs next? No. These are the replay steps when this approach doesn't work. Alexey Viktorov 2021.08.24 13:16 #30699 fxsaber:No. These are the replay steps when this approach doesn't work. But there is no word on that from the beginning Forum on trading, automated trading systems and trading strategy testing Bugs, bugs, questions fxsaber, 2021.08.24 10:11 I can't write function, that would return true in EA, only when focus is switched to EA's chart. Please advise who has run into this problem. Not enough CHARTEVENT on losing and gaining focus. Features of the mql5 Annals of the mql5.com Testing 'CopyTicks' fxsaber 2021.08.24 13:18 #30700 Alexey Viktorov:But there is no mention of this at the outset. "when the focus switches to the EA chart" - so I do. No hidden inputs. 1...306330643065306630673068306930703071307230733074307530763077...3193 New comment
I can't manage to write a function that only outputs true in the EA when the focus switches to the EA chart.
Can you give me a hint if you've encountered one.
Not enough CHARTEVENT on losing and gaining focus.
There's enough of everything. Somewhere it was sorted out that in the documentation is not true
CHART_BRING_TO_TOP
Show chart on top of all other charts
bool w/o
Why at the moment of activation of window with this indicator true prints twice I did not understand, but loss of focus works fine.
There's enough of everything. Sorted out somewhere in the documentation, which is not true
CHART_BRING_TO_TOP
Show chart on top of all other charts
bool w/o
Why at the moment of activation of window with this indicator true prints twice I haven't figured out, but loss of focus works fine.
This code behaves very badly when scrolling.
This code behaves very badly when scrolling.
Well, yes, the code is crude. But there is a direction.
Well, yes, the code is crude. But there is a direction.
Tried that direction too. Unfortunately, it's a dead end.
Tried that direction too. Unfortunately, a dead end.
What's a dead end? It's easily solved...
What's a dead end? It's easily solved...
Will there be new inputs next?
Will there be new inputs next?
No. These are the replay steps when this approach doesn't work.
No. These are the replay steps when this approach doesn't work.
But there is no word on that from the beginning
Forum on trading, automated trading systems and trading strategy testing
Bugs, bugs, questions
fxsaber, 2021.08.24 10:11
I can't write function, that would return true in EA, only when focus is switched to EA's chart.
Please advise who has run into this problem.
Not enough CHARTEVENT on losing and gaining focus.
But there is no mention of this at the outset.
"when the focus switches to the EA chart" - so I do. No hidden inputs.