I don't understand, maybe I'm talking about the wrong window. I mean the chart window where the bars are. These move. There are also dialog windows when loading EA indicators, alert windows, message windows, but they all move. Which window are we talking about? The dialog box has nothing to do with it. I also have no libraries in 4
That's what I want to move on the schedule when I need to.
It's not a window, it's a panel. You can move it, I can't even tell you the code. I need the code and redraw it in general. I need to find where the panel is drawn and coordinates are specified - then, using events, I click to move it, delete it and draw a new one. Like this. But I'm not a draftsman at all.
Can you tell me (formula) how to calculate the price for a certain level (taking into account open positions)? To calculate at what price there will be a margin call and stop out.
If comments have been used, he will clean them up after himself. And many beginners do not pay attention to this. That's the secret.
That's what I wrote, and I wrote about it above). The question was why the different behaviour in EAs and indicators. Is there a hidden meaning or has historically developed from different writing teams)
The libraryEASY AND FAST https://www.mql5.com/ru/articles/3527 implements the possibility to start a program window in an indicator subwindow by loading the file "SubWindow.mq5", in mql5 everything works, in mql4 also the content is compiled without errors, but the subwindow does not open, what can be done?
//+------------------------------------------------------------------+//| SubWindow.mq5 |//| Copyright 2016, MetaQuotes Software Corp. |//| http://www.mql5.com |//+------------------------------------------------------------------+#property copyright"2016, MetaQuotes Software Corp."#property link"http://www.mql5.com"#property indicator_separate_window#property indicator_plots0#property indicator_buffers0#property indicator_minimum0.0#property indicator_maximum0.0//--- Имя программы#define PROGRAM_NAME ::MQLInfoString(MQL_PROGRAM_NAME)
//--- Идентификатор события для изменения высоты подокна эксперта#define ON_SUBWINDOW_CHANGE_HEIGHT (38)
//+------------------------------------------------------------------+//| Custom indicator initialization function |//+------------------------------------------------------------------+intOnInit(void)
{
//--- Короткое имя индикатора
::IndicatorSetString(INDICATOR_SHORTNAME,PROGRAM_NAME);
//--- Инициализация прошла успешноreturn(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+//| Деинициализация |//+------------------------------------------------------------------+voidOnDeinit(constint reason)
{
}
//+------------------------------------------------------------------+//| Custom indicator iteration function |//+------------------------------------------------------------------+intOnCalculate(constint rates_total,
constint prev_calculated,
constint begin,
constdouble &price[])
{
//--- Если инициализация прошла успешноif(prev_calculated<1)
//--- Отправим сообщение эксперту, чтобы получить от него размер для подокна
::EventChartCustom(0,ON_SUBWINDOW_CHANGE_HEIGHT,0,0.0,PROGRAM_NAME);
//---return(rates_total);
}
//+------------------------------------------------------------------+//| ChartEvent function |//+------------------------------------------------------------------+voidOnChartEvent(constint id,
constlong &lparam,
constdouble &dparam,
conststring &sparam)
{
//--- Обработка события изменения высоты подокна экспертаif(id==CHARTEVENT_CUSTOM+ON_SUBWINDOW_CHANGE_HEIGHT)
{
//--- Принимать сообщения только от имени экспертаif(sparam==PROGRAM_NAME)
return;
//--- Изменить высоту подокна
::IndicatorSetInteger(INDICATOR_HEIGHT,(int)lparam);
//--- Обновить график
::ChartRedraw();
}
}
//+------------------------------------------------------------------+
I'm trying to attach an account check to (any) indicator!
bool VerifityToSchet()
{
if(AccountNumber() != account)
{
Print("На данном счете индикатор работать не будет, вы его приобрели незаконным путем!!!");
}else
{
Print("На данном счете индикатор авторизован");
}
return(false);
}
I enabled it in init() and start() of course, but when I restart the terminal, it says the account is invalid!
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.
I don't understand, maybe I'm talking about the wrong window. I mean the chart window where the bars are. These move. There are also dialog windows when loading EA indicators, alert windows, message windows, but they all move. Which window are we talking about? The dialog box has nothing to do with it. I also have no libraries in 4
Here's the owl window.
I want to move it on the chart when I need it.
Here is the owl window
That's what I want to move on the schedule when I need to.
It's not a window, it's a panel. You can move it, I can't even tell you the code. I need the code and redraw it in general. I need to find where the panel is drawn and coordinates are specified - then, using events, I click to move it, delete it and draw a new one. Like this. But I'm not a draftsman at all.
When deleting in an EA, you don't need to clean the comment, but in an indicator you do. Is it designed that way?
An adequate programmer would at least write
If comments have been used, he will clean them up after himself. And many beginners don't pay attention to this. That's the secret.An adequate programmer would at least write
If comments have been used, he will clean them up after himself. And many beginners do not pay attention to this. That's the secret.That's what I wrote, and I wrote about it above). The question was why the different behaviour in EAs and indicators. Is there a hidden meaning or has historically developed from different writing teams)
An adequate programmer will at least write
If comments have been used, he will clean them up after himself. And many beginners do not pay attention to this. That's the whole secret.Actually, there are no explicit general requirements on this.
Did I talk about the requirement? I only said that some take this point into account and some do not.
Did I talk about the requirement? I only said that some take this point into account and some don't.
Not like that.
The libraryEASY AND FAST https://www.mql5.com/ru/articles/3527 implements the possibility to start a program window in an indicator subwindow by loading the file "SubWindow.mq5", in mql5 everything works, in mql4 also the content is compiled without errors, but the subwindow does not open, what can be done?
Hi all!
I'm trying to attach an account check to (any) indicator!
I enabled it in init() and start() of course, but when I restart the terminal, it says the account is invalid!
What am I doing wrong?