[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 446

 
sss2019:

Tell me how to search for the last object of a square on a graph among all the other objects?


What do you mean by "last"?
 

sergeev:

what do you mean "the last one"?


Last by the number in the name. So, the indicator draws 30 squares on the chart and names Box1, Box2, Box3, Box4 ... Box30, so you need to select Box30 and get some price data from it.

In addition to the squares on the graph, there are also various lines with their own names, they do not need to be touched.

 
sss2019:

The last by the number in the name. That is, the indicator draws 30 squares on the chart, and gives each a name in order Box1, Box2, Box3, Box4 ... Box30, so you need to select Box30 and get some price data from it.
How can you yourself determine by looking at the name and type of the object that it is "the most recent box" ???
 
artmedia70:
How can you determine by looking at the name and type of an object that it is "the latest square"?


I can't understand what you're trying to say. Explain then how to get data from custom indicators. The indicator draws the square of minimum and maximum on the picture, but I don't understand where these price values of minimum and maximum are stored and how they are obtained from the indicator to the Expert Advisor, buffers of shmuffers. I don't understand anything, or at least give me a link from the manual or some articles.

 
sss2019:


I can't understand what you're trying to say. Explain then how to get data from custom indicators. The indicator has drawn a square with minimum and maximum on the picture, but I don't understand where these price values of minimum and maximum are stored and how they are obtained from the indicator to the Expert Advisor, buffers of shmuffers. I don't understand anything, at least give me the link from the manual or some articles.

Is it really that much of a mess? I was trying to let you understand that there's a list of objects in the terminal, that objects have names, that some substring can be selected in object's name and its analysis can lead you to a desired result.

And since you can't understand anything about buffers-shuffers, read the textbook from the beginning. Trust me - it's fascinating.

 

artmedia70, how long have you studied mql4 to such a good level, honestly?

=================================================

No, I know how to get the value of a simple custom indicator, but what about the indicator that creates squares? Where the upper and lower prices of squares are hidden and if I can get them not from the squares on the chart but directly from the indicator?

 
Hello People!



Help me write a function which would calculate the size of a position like this https://book.mql4.com/ru/build/lots depending on what percentage of the capital I risk and at what level is a stop-loss

Let's say i deposit 2000$, i may risk 100$, stop loss is 30 pips away...The question is how many lots i may open (how to write the code)
 
dva1986:

Hello People!



Help me write a function which would calculate the size of a position like this https://book.mql4.com/ru/build/lots depending on what percentage of the capital I risk and at what level is a stop-loss

Let's say i deposit 2000$, i may risk 100$, stop loss is 30 pips away...The question is how many lots i may open (how to write the code)
Help me write a function - so go ahead, start and you will get help...
 
artmedia70:
Help you write a function - well, go ahead, get started and you'll get help...

I have almost zero knowledge of mql) at least give me a nudge in which direction to go
 
sss2019:

artmedia70, how long did you study mql4 to such a good level, honestly?

=================================================

No, I know how to get the value of a simple custom indicator, but what about the indicator that creates squares? Where it has hidden the upper and lower prices of squares and whether it is possible to get them not from the squares on the chart but directly from the indicator?

Do you really need this excursus into my life history?

I don't think so...

About a month after I started to learn mql4 I started to write a multi-timeframe EA, which included several different strategies. This EA used dynamic calculation of its parameters for autotuning to the current market situation. I wanted to learn so much, I did not wait for free stuff, I coded it myself and asked what I was not clear about. I'm still learning: What is our life? - A game...

"Where are the upper and lower prices of the squares hidden and can you get them, not from the squares themselves on the chart, but directly from the indicator?"

Put the indicator on the chart, press Ctrl+D ... The data window will open. Move the mouse on the indicator chart and look how the indicator buffer values change in the data window. What data is stored in which buffer can be identified by the buffer number and by the colour of indicator lines in the tab "Colors" (in the indicator parameter window when attaching it to the chart)

It builds objects in the main window of the terminal, therefore there are no objects in buffers of the indicator. Use the standard functions of mql4 from the Expert Advisor for working with objects (their names begin with Objects)

Reason: