[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 864

 
Byte:
How to record a point on a chart in mql4? I have to record the price and time so that it would remain in place at any timeframe.

do you need to write down an object or what? What do you mean a point? Well, store the price and time in two variables, these will be the coordinates of the point.

Dimka-novitsek, post your code in full, no symbols!

 
Techno:

do you need to write down an object or what? What do you mean a point? Well, store the price and the time in two variables, these will be the coordinates of the point.


And if there are many points, do you create two arrays?
 
Byte:
and if there are many points, do you need to create two arrays?
Yes. Or you can create objects on the graph, and then go through them and return their coordinates (to do without arrays)
 

To find data from an array, you must either search through or enter a number in the array.

To find data from objects, you can only go through all the objects.

If so, which is better for the computer, simpler, takes less resources?

And how many arrays can there be in an indicator?

Thank you!

 
Byte:

To find data from an array, you must either search through or enter a number in the array.

To find data from objects, you can only go through all the objects.

If so, which is better for the computer, simpler, takes less resources?

And how many arrays can there be in an indicator?

Thank you!

Objects also have names and you can return data by name without any enumeration. The computer does not really care which of these methods to use, but if the arrays, you need to save them to a file, otherwise the data will be lost, you do not need to do this with objects, they will be stored on the chart, but the chart should not change. There can be any number of arrays in the indicator. But 2 arrays will be enough for a huge number of points.
 
Dimka-novitsek:

Please tell me what "OP BUY"-variable expected means

here while(difference>Span)
( OrderSend (string symbol, OP_BUY, volume, double price, slippage,Bid-stoploss*Point,
Bid+takeprofit*Point, string comment=NULL, int magic=0, datetime expiration=0, color arrow_color=Red) )

while(0-different>Red)
( OrderSend (string symbol, OP_SELL, volume, double price, slippage,Ask+stoploss*Point,
Ask-takeprofit*Point, string comment=NULL, string comment=0, int magic=0, datetime expiration=0, color arrow_color=Black) )

Translated from English, variable means variable,

expect means to expect, calculate.

The word expected is a past participle for "to expect, to expect".

For example, from the word "to eat", this participle would look like "eaten". For example: "The pizza is eaten." "Eaten" is a past participle.

Now try this preposition "to expect, to reckon with". I don't know how to translate it into Russian, but I would translate

"variable expected" as - the variable is self-sufficient, it expects nothing and is ready to use. I think so.

OP_BUY is inserted into OrderSend's function opening a Buy position while OP_SELL is the same variable but opens a Sell position. We don't need to set other values instead of OP_BUY and OP_SELL, they are self-sufficient values.
 
FOReignEXchange:
In English, variable means variable,

expect - to expect, calculate.

The word "expected" is a past participle for "to expect, to expect".

For example, from the word "to eat", this participle would look like "eaten". For example: "The pizza is eaten." "Eaten" is a past participle.

Now try this preposition "to expect, to reckon with". I don't know how to translate it into Russian, but I would translate

"variable expected" as - the variable is self-sufficient, it expects nothing and is ready to be used. I think of it this way.

OP_BUY is inserted into OrderSend and indicates that the order opens a Buy position while OP_SELL is the same variable but opens a Sell position. We don't need to set other values instead of OP_BUY and OP_SELL, they are self-sufficient values.



Thanks!!!! I don't understand it, but the compiler keeps saying it's some kind of error or I don't like it.
 
Dimka-novitsek:

Thanks!!!! It's just the compiler, it's some kind of error, or something does not like it, and I do not understand what it is!

Maybe you erased the dash _ . OP_BUY instead of OP BUY

The variable is self-sufficient. You should not put anything else in its place, while OP BUY is something else. Maybe it is a mistake.

 
Dimka-novitsek:

Thanks!!!! It's just the compiler says it's some kind of error, or it doesn't like it. I don't know what it is! Thanks in advance.
Write your code in full here.
 
Hello! Sorry for the dumb question! What do you use an order to breakeven for? There is a trailing order. Or there is a logical difference between them? If so, please give me an example! Thank you in advance!
Reason: