This function sets the OBJ_VLINE object vertical line on the current chart.
cl - Color of the VERTICAL LINE object. Obligatory parameter.
nm - object name. When the default value is passed - "", the open time of the current bar is used as the object name.
t1 - Object setting time. Default value - 0 - current bar open time.
st - Line style. Valid values are STYLE_SOLID (default), STYLE_DASH, STYLE_DOT, STYLE_DASHDOT.
wd - Line width. Default value is 1.
//+----------------------------------------------------------------------------+//| Автор : Ким Игорь В. aka KimIV, http://www.kimiv.ru |//+----------------------------------------------------------------------------+//| Версия : 02.07.2008 |//| Описание : Установка объекта OBJ_VLINE вертикальная линия |//+----------------------------------------------------------------------------+//| Параметры: |//| cl - цвет линии |//| nm - наименование ("" - время открытия текущего бара) |//| t1 - время (0 - время открытия текущего бара) |//| st - стиль линии (0 - простая линия) |//| wd - ширина линии (1 - по умолчанию) |//+----------------------------------------------------------------------------+voidSetVLine(colorcl, stringnm="", datetimet1=0, intst=0, intwd=1){if(nm=="")nm=DoubleToStr(Time[0], 0);
if(t1<=0)t1=Time[0];
if(ObjectFind(nm)<0)ObjectCreate(nm, OBJ_VLINE, 0, 0,0);
ObjectSet(nm, OBJPROP_TIME1, t1);
ObjectSet(nm, OBJPROP_COLOR, cl);
ObjectSet(nm, OBJPROP_STYLE, st);
ObjectSet(nm, OBJPROP_WIDTH, wd);
}
Igor, I'm addressing you as a more experienced MQL4 coder.
I started to write a library for Kohonen's network.
I want to make it as flexible and convenient as possible, but I've faced a moment that I can't overcome yet.
Example1:
int& value; // так нельзя, интересует аналог на MQL4, если он есть
voidAssignValue(int& newValue){value = newValue;
}voidSetValue(intnewValue){value = newValue;
}intinit(){intsomeValue = 5;
AssignValue(someValue);
SetValue(10);
Print(someValue); // очень хочется, чтобы вывелось 10}
Is it possible to do this using MQL4, and how, if yes?
Example2:
voidSetSize(double& matrix[][], intinSize, intoutSize){// требуется установить размеры матрицы, не осилил}voidInit(double& matrix[][]){// допустим, требуется проиниализировать всю матрицу значением 1, также не осилил}
Again, if it is possible, please give me the code. This example seems realizable to me.
TheXpert писал (а)>> I want to make it most flexible and convenient, but I've faced a moment that I can't overcome yet. >> Example1: Is it possible to do it with MQL4 tools and how, if yes?
I understand that you want to organise work with pointers. So that one variable points to another... Or maybe I've got it wrong? Try to explain in words what you need.
TheXpert wrote >> Example2: Again, if it is possible to do such a thing, please give me the code. This example seems to me to be implementable.
I understand that you want to organise work with pointers. So that one variable points to another... Or maybe I've got it wrong? Try to explain in words what you need.
Yes, sort of.
About second -- how about to initialize with random values?
Pointers in MQL4 are tricky. There is no direct support. Someone here on the forum tried to do it with arrays, I think. I can't be more precise. Search for it yourself.
TheXpert wrote (a) >> About the second -- what about initializing with random values?
TheXpert wrote (a) >> Yeah, also, I need exactly dynamic arrays.
Only the first dimension of the array can be changed programmatically. The ArrayResize() function. The second, third and fourth dimensions have to be set rigidly.
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.
The SetVLine() function.
This function sets the OBJ_VLINE object vertical line on the current chart.
Examples of how to use SetVLine().
SZY. Attached is a script to test the SetVLine() function.
EXECUTIVE. >> I'M GOING TO.
Show me a picture, let's try to make one.
Show it in the figure, let's try to do it.
A custom function that calculates the areas described by the indicator, e.g. RSI and the middle line.
The space bounded by the curve below the middle line and the middle line itself is area -S1, and above the middle line is +S2.
Posted to https://www.mql5.com/ru/forum/109590 not to interfere.
The SetTLine() function.
This function sets the OBJ_TREND trendline object on the current chart.
Examples of how to use SetTLine().
HH. Attached is a script to test the SetTLine() function.
Igor, I'm addressing you as a more experienced MQL4 coder.
I started to write a library for Kohonen's network.
I want to make it as flexible and convenient as possible, but I've faced a moment that I can't overcome yet.
Example1:
Is it possible to do this using MQL4, and how, if yes?
Example2:
Again, if it is possible, please give me the code. This example seems realizable to me.
Thank you in advance.
I want to make it most flexible and convenient, but I've faced a moment that I can't overcome yet.
>> Example1:
Is it possible to do it with MQL4 tools and how, if yes?
I understand that you want to organise work with pointers. So that one variable points to another... Or maybe I've got it wrong? Try to explain in words what you need.
Example2:
Again, if it is possible to do such a thing, please give me the code. This example seems to me to be implementable.
I understand that you want to organise work with pointers. So that one variable points to another... Or maybe I've got it wrong? Try to explain in words what you need.
Yes, sort of.
About second -- how about to initialize with random values?
Yes, also, I need exactly dynamic arrays.
Yeah, sort of.
Pointers in MQL4 are tricky. There is no direct support. Someone here on the forum tried to do it with arrays, I think. I can't be more precise. Search for it yourself.
About the second -- what about initializing with random values?
MathRand()
Yeah, also, I need exactly dynamic arrays.