In general, since Artyom does not answer anything, and the man above gave the answer that functions work with structures that must be known and therefore must be declared globally, we conclude that the structure must be declared globally.
By its nature, a function that works with a structure can only accept the same static structures. It means that we cannot declare a structure locally so that it has a limited scope and pass it into a function.
Don't refer to me when you don't understand what I told. Carefully read what Artem said.
declaration of a variable with the type of that structure.
In his haste, he made some inaccuracies in the code. This does not mean that he was speaking incorrectly. A structure is a custom data type and is defined in the global scope. A variable of user type can be declared anywhere. And there can be any number of such variables declared.
Artyom Trishkin: The statistics will not change from this.
By the way, it doesn't just not show me at 1 a.m. or 11 p.m., it shows me this.
The technical job.
Progress
Approval of the TOR
Demo
Transmission of work and payment
All these checkboxes are clicked. it says that in a week the payment will automatically go away. Except that only the demo file was received and there is a date restrictor sitting in it allowing work only last year. I guess he got bored and now he will wait a week for the pay file to change automatically?
It already happened.
The customerZlaya_budka has confirmed the"Demo" step
2020.01.29 21:47
Transfer of work and payment
The Customer has accepted the Demo, now the Developer has to hand over the final result.
After acceptance of the work, payment will come automatically from the Customer's account (minus a commission). If the Customer does not reply to the submitted work within one week, the Order will automatically be deemed completed.
2020.01.29 21:47
Developer=========confirmed the step"Transfer of work and payment"
What is this supposed to mean? already had a lovely one from pipal where debit and word balance were swapped, already been waiting 3 weeks for servicedesk with payment. now this joy what does it mean?
Don't refer to me when you don't know what I'm talking about. Read carefully what Artem said.
In his haste, he made some inaccuracies in the code. It does not mean that he spoke incorrectly. A structure is a custom data type and is defined in the global scope. A variable of the user type can be declared anywhere. And there can be any number of such variables declared.
Well, I'm talking exactly about my case and exactly about structure, it's clear that it's also a custom variable type, but in particular I'm interested in local level. Maybe it could be done through a class. In principle, you may declare a private type through a class and that's it, but I don't understand it too well.
Well I'm talking exactly about my case and exactly about the structure and exactly like this, it's clear that it's also a custom variable type but in particular I'm interested in the local level. Maybe it could be done through a class. In principle, you may declare a private type through a class, but I don't understand it too well.
You define your structure on a global level - the entire program must know about it - it's a new type of variables that you created.
And you can define different variables with the type of this structure at any of the local levels - only in them (the local levels) will be visible the variables created in their scope.
//+------------------------------------------------------------------+//| Create an equidistant channel by the given coordinates |//+------------------------------------------------------------------+bool ChannelCreate(constlong chart_ID=0, // chart's IDconststring name="Channel", // channel nameconstint sub_window=0, // subwindow index datetime time1=0, // first point timedouble price1=0, // first point pricedatetime time2=0, // second point timedouble price2=0, // second point pricedatetime time3=0, // third point timedouble price3=0, // third point priceconstENUM_BASE_CORNER corner = CORNER_RIGHT_UPPER, // the angle of the graph for the bindingconstcolor clr=clrRed, // channel colorconstENUM_LINE_STYLE style=STYLE_SOLID, // style of channel linesconstint width=1, // width of channel linesconstbool back=false, // in the backgroundconstbool selection=true, // highlight to moveconstbool ray_left = false, // extend the line to the leftconstbool ray_right=false, // channel's continuation to the rightconstbool hidden=true, // hidden in the object listconstlong z_order=0) // priority for mouse click
{
//--- reset the error valueResetLastError();
//--- create a channel by the given coordinatesif(!ObjectCreate(chart_ID,name,OBJ_CHANNEL,sub_window,time1,price1,time2,price2,time3,price3))
{
Print(__FUNCTION__,
": failed to create an equidistant channel! Error code = ",GetLastError());
return(false);
}
ObjectSetInteger(chart_ID,name,OBJPROP_COLOR,clr);
ObjectSetInteger(chart_ID,name,OBJPROP_STYLE,style);
ObjectSetInteger(chart_ID,name,OBJPROP_WIDTH,width);
ObjectSetInteger(chart_ID,name,OBJPROP_BACK,back);
ObjectSetInteger(chart_ID,name,OBJPROP_SELECTABLE,selection);
ObjectSetInteger(chart_ID,name,OBJPROP_SELECTED,selection);
ObjectSetInteger(chart_ID,name,OBJPROP_RAY_RIGHT,ray_right);
ObjectSetInteger(chart_ID,name,OBJPROP_HIDDEN,hidden);
ObjectSetInteger(chart_ID,name,OBJPROP_ZORDER,z_order);
//--- return(true);
}
//+------------------------------------------------------------------+//| Delete the channel |//+------------------------------------------------------------------+bool ChannelDelete(constlong chart_ID=0, // chart's IDconststring name="Channel") // channel name
{
//--- reset the error valueResetLastError();
//--- delete the channelif(!ObjectDelete(chart_ID,name))
{
Print(__FUNCTION__,
": failed to delete the channel! Error code = ",GetLastError());
return(false);
}
//---return(true);
}
//---
I understand that ChartXYToTimePrice calculates the coordinates and defaults from the top left corner.
How would ChartXYToTimePrice be re-calculated from the angle I specified?
You can only change the mind of someone who has something to make decisions with. And if "it" only executes someone else's settings, then all dialogue in an attempt to convince you of something is just a waste of time.))
I don't quite understand the task, but pay attention not only to the binding angle ENUM_BASE_CORNER, but also to the binding point ENUM_ANCHOR_POINT
Графические объекты Text, Label, Bitmap и Bitmap Label (OBJ_TEXT, OBJ_LABEL, OBJ_BITMAP и OBJ_BITMAP_LABEL) могут иметь один из 9 различных способов привязки своих координат, задаваемых свойством OBJPROP_ANCHOR. – объекты имеет ширину и высоту. Если указано "только для чтения", то это означает, что значения ширины и высоты...
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.
In general, since Artyom does not answer anything, and the man above gave the answer that functions work with structures that must be known and therefore must be declared globally, we conclude that the structure must be declared globally.
By its nature, a function that works with a structure can only accept the same static structures. It means that we cannot declare a structure locally so that it has a limited scope and pass it into a function.
Don't refer to me when you don't understand what I told. Carefully read what Artem said.
This is the forum for trading, automated trading systems, and trading strategy testing.
Any questions from newbies on MQL4 and MQL5, assistance and discussion on algorithms and codes
declaration of a variable with the type of that structure.
The statistics will not change from this.
By the way, it doesn't just not show me at 1 a.m. or 11 p.m., it shows me this.
The technical job.
Progress
All these checkboxes are clicked. it says that in a week the payment will automatically go away. Except that only the demo file was received and there is a date restrictor sitting in it allowing work only last year. I guess he got bored and now he will wait a week for the pay file to change automatically?
It already happened.
Transfer of work and payment
The Customer has accepted the Demo, now the Developer has to hand over the final result.
After acceptance of the work, payment will come automatically from the Customer's account (minus a commission). If the Customer does not reply to the submitted work within one week, the Order will automatically be deemed completed.
Developer=========confirmed the step"Transfer of work and payment"
What is this supposed to mean? already had a lovely one from pipal where debit and word balance were swapped, already been waiting 3 weeks for servicedesk with payment. now this joy what does it mean?
Don't refer to me when you don't know what I'm talking about. Read carefully what Artem said.
Well, I'm talking exactly about my case and exactly about structure, it's clear that it's also a custom variable type, but in particular I'm interested in local level. Maybe it could be done through a class. In principle, you may declare a private type through a class and that's it, but I don't understand it too well.
Well I'm talking exactly about my case and exactly about the structure and exactly like this, it's clear that it's also a custom variable type but in particular I'm interested in the local level. Maybe it could be done through a class. In principle, you may declare a private type through a class, but I don't understand it too well.
You define your structure on a global level - the entire program must know about it - it's a new type of variables that you created.
And you can define different variables with the type of this structure at any of the local levels - only in them (the local levels) will be visible the variables created in their scope.
Hello, everyone!
Help me attach
to this object
bool
I understand that ChartXYToTimePrice calculates the coordinates from the top left corner by default as well.
How would ChartXYToTimePrice re-calculate from the corner I specified?
I understand that ChartXYToTimePrice calculates the coordinates and defaults from the top left corner.
How would ChartXYToTimePrice be re-calculated from the angle I specified?
You can only change the mind of someone who has something to make decisions with. And if "it" only executes someone else's settings, then all dialogue in an attempt to convince you of something is just a waste of time.))
I don't quite understand the task, but pay attention not only to the binding angle ENUM_BASE_CORNER, but also to the binding point ENUM_ANCHOR_POINT
Alexey Viktorov:
I don't quite understand the task
indicator on call creates an object (OBJ_CHANNEL) in the upper left corner
how to set the condition to create an object in the other corner.
indicator on call creates an object (OBJ_CHANNEL) in the upper left corner
how to set the condition to create an object in the other corner.
Read the manual carefully. OBJ_CHANNEL has nothing to do with the angle.