pivomoe: Can you tell me how to make a pause of 1 millisecond? Sleep(1) is not an option because it pauses from 0 to 50 milliseconds or so. When calling with parameter 1.
In documentation it is written, that in connection with technical nuances to receive a pause less than 16-18 milliseconds is not real. This is related to hardware, OS, etc.
BlackTomcat: It is written in the documentation that due to technical nuances it is not realistic to get a pause of less than 16-18 milliseconds. This is related to hardware, OS, etc.
I have about 1, sometimes 2,3, depending on the load.
Aliaksandr Hryshyn: I have about 1, sometimes 2,3, depending on workload.
? google: winds system timer, for questions or misunderstandings why less than 16ms is not possible, in short - winds is not a real-time system, only the timer from winds is available to software
? google: winds system timer, for questions or misunderstandings why less than 16ms is not possible, in short - winds is not a real-time system, only the timer from winds is available to software
16 is a lot, but bearable. It can be more than 50.
Once again, the wind is not a real time system, not enough resources OS, your timer will be delayed but will still be executed, use logical time intervals, I do not use less than 100 ms, and usually use 400 ms, even for a call dll with graphics and processing clicks checkboxes 400 ms is not noticeable at all, checked 500 ms - yes it is already visible that no response
imho, i wouldn't expect less than 100 ms to be guaranteed from a timer
[in] Любые значения, разделенные запятыми. Для разделения выводимой информации на несколько строк можно использовать символ перевода строки "\n" либо "\r\n". Количество параметров не может превышать 64. Массивы нельзя передавать в функцию Alert(). Массивы должны выводиться поэлементно. Данные типа double выводятся с 8 десятичными цифрами после...
Good afternoon. Please advise or provide me with a link. How to organize an indicator that would show the balance changes as a candlestick chart in a separate window. I have done the simplest thing, the indicator copies the price changes, but now how to replace the price changes with the changes in the balance, in other words, to replace the arrays used by the indicator.
If you have any ideas, please share them, I will be grateful even for a general description of the algorithm, I lack experience, I do not know where to start.
//+------------------------------------------------------------------+//| iBalans_Logic.mq5 |//| Sergei Voicehovskii |//| |//+------------------------------------------------------------------+#property copyright"Sergei Voicehovskii"#property link""#property version"1.00"//------------------------------------------------------------------#property indicator_separate_window#property indicator_buffers6#property indicator_plots1#property indicator_label1"iBalans_Logic"#property indicator_type1DRAW_COLOR_CANDLES#property indicator_color1clrGray,clrDodgerBlue,clrSandyBrown//--- indicator buffers//--- индикаторный буферdouble opn[],hi[],lo[],cls[],clr[],lot[],type[];
//------------------------------------------------------------------// Custom indicator initialization function// Функция инициализации пользовательского индикатора//------------------------------------------------------------------intOnInit()
{
SetIndexBuffer(0,opn,INDICATOR_DATA);
SetIndexBuffer(1,hi,INDICATOR_DATA);
SetIndexBuffer(2,lo,INDICATOR_DATA);
SetIndexBuffer(3,cls,INDICATOR_DATA);
SetIndexBuffer(4,clr,INDICATOR_COLOR_INDEX);
SetIndexBuffer(5,lot,INDICATOR_CALCULATIONS);
SetIndexBuffer(6,type,INDICATOR_CALCULATIONS);
IndicatorSetString(INDICATOR_SHORTNAME,"iBalans_Logic ("")");
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+//| Custom indicator iteration function //| Функция итерации пользовательского индикатора |//+------------------------------------------------------------------+intOnCalculate(constint rates_total,
constint prev_calculated,
constdatetime &time[],
constdouble &open[],
constdouble &high[],
constdouble &low[],
constdouble &close[],
constlong &tick_volume[],
constlong &volume[],
constint &spread[])
{
//---Comment("-------------------------",
"\n rates_total = ",rates_total,
"\n prev_calculated = ",prev_calculated,
"\n ---------------------- "
);
//---int i=(int)MathMax(prev_calculated-1,0);
for(;i<rates_total && !_StopFlag; i++)
{
opn[i] = open[i];
cls[i] = close[i];
hi[i] = high[i];
lo[i] = low[i];
clr[i] = (cls[i]>opn[i])?1:(cls[i]<opn[i])?2:0;
}
//--- return value of prev_calculated for next call//--- возвращаемое значение соответствует моменту prev_calculated для следующего вызоваreturn(rates_total);
}
//+------------------------------------------------------------------+
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Can you tell me how to make a pause of 1 millisecond? Sleep(1) is not an option because it pauses from 0 to 50 milliseconds or so. When calling with parameter 1.
It is written in the documentation that due to technical nuances it is not realistic to get a pause of less than 16-18 milliseconds. This is related to hardware, OS, etc.
I have about 1, sometimes 2,3, depending on workload.
? google: winds system timer, for questions or misunderstandings why less than 16ms is not possible, in short - winds is not a real-time system, only the timer from winds is available to software
? google: winds system timer, for questions or misunderstandings why less than 16ms is not possible, in short - winds is not a real-time system, only the timer from winds is available to software
16 is a lot, but bearable. Sometimes more than 50.
Once again, the wind is not a real time system, not enough resources OS, your timer will be delayed but will still be executed, use logical time intervals, I do not use less than 100 ms, and usually use 400 ms, even for a call dll with graphics and processing clicks checkboxes 400 ms is not noticeable at all, checked 500 ms - yes it is already visible that no response
imho, i wouldn't expect less than 100 ms to be guaranteed from a timer
Can you tell me how to display an information message on the screen without waiting for the OK button to be pressed?
There is of course a MessageBox function, but it waits for a reaction and stops the execution of the program.
Can you tell me how to display an information message on the screen without waiting for the OK button to be pressed?
There is of course a MessageBox function, but it waits for a reaction and stops the execution of the program.
Yes Alert, I think. Just be sure to read the last paragraph.
https://www.mql5.com/ru/docs/common/alert
Yes Alert, I think. Just be sure to read the last paragraph.
https://www.mql5.com/ru/docs/common/alert
Thank you. Just what I need.
Good afternoon. Please advise or provide me with a link. How to organize an indicator that would show the balance changes as a candlestick chart in a separate window. I have done the simplest thing, the indicator copies the price changes, but now how to replace the price changes with the changes in the balance, in other words, to replace the arrays used by the indicator.
If you have any ideas, please share them, I will be grateful even for a general description of the algorithm, I lack experience, I do not know where to start.
https://charts.mql5.com/22/192/eurusd-m1-alpari-international-2.png