Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1196
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
@Oleg
Ask the developers to put the error number as in the Documentation, it is not clear why it is in the Documentation and not used in the Editor in the Description
https://www.mql5.com/ru/docs/constants/errorswarnings/errorscompile
simply specify the buffer index to be assigned during initialisation in SetIndexBufer
I'm not good at programming, there is no buffer in the code of the indicator through which it outputs data
I am not good at programming, in the code of the indicator there is no buffer through which it outputs data
I haven't dug deep into your code, but I understand it draws levels
... you need the OnChartEvent handler
https://www.mql5.com/ru/docs/event_handlers/onchartevent
monitor the creation of new objects (it'sCHARTEVENT_OBJECT_CREATE), and if the name prefix is from your indicator - take the properties of the created line (there the price and time of its points)
I didn't go into your code in depth, but I understand it draws levels
... you need an OnChartEvent handler
https://www.mql5.com/ru/docs/event_handlers/onchartevent
monitor the creation of new objects (it'sCHARTEVENT_OBJECT_CREATE), and if the name prefix is from your indicator - take the properties of the created line (price and time of its points there)
Please help me to correct an error that appears in my log:
MQL4 Market: failed to load products (get header failed [12150])
The handler (mt5, indictaor) handles button presses repeatedly. What can be the reason for this?
redraw - ChartRedraw()
The event handler (mt5, indictaor) handles button presses sometimes. What can be the reason?
without a sample diagram of how you process events is just guessing
Alternatively, run it in the Indicators folder Examle\SimplePanel
and if this code works correctly ... guess for yourself ;)
The handler (mt5, indictaor) handles the button presses in a time interval. What could be the reason for this?
just did the same bug this morning :-)
The button is adapted to work in the tester and works by polling, not completely in the OnChartEvent.
The error was in the check type
if (ObjectGetInteger(....,OBJPROP_STATE)!=state /* это баг, должен быть 0 */) {
// состояние поменялось
state=!state;
}
Good morning.
The point is that the last 50 candles are calculated for the average.
Question. What to add, fix in the code to calculate once and not every tick. The problem is that in ON-LINE there is an accumulation of value.