[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 908

 

I've just started to learn mql4, i started to write my EA (it does not matter for me if profitable or not, i am just learning), i compile it and test it.

I've been working on it for a while now.

Attached files:
gheka_1.mq4 (1.56 KB)
 
Slepoy:

Hello, can you help me find a fault?

The arrows are not working.


The code is not read at all, go on from there. (or in person).
 
gheka:

I just started to learn mql4, i started to write my own EA, (for me it doesn't matter if profitable or not, i am just learning), i compile it and test it.

I don't see any movement on the chart, it just does not open anything, help me.

Attached files:
gheka_1.mq4 (1.56 KB)


My Expert Advisor beats all of mine put together)) (Just kidding).

I have tested it, it compiles and tests it. Use functions at the end of the code (tested) and 1 lot.

 
costy_:


Advisor outperforms all of mine put together )) (just kidding).

Use the functions at the end of the code (tested), and 1 lot, some dealers work from 1 lot.

I have been racking my brains for a long time, but I figured it out (I guess I'm a long way off from you) the test goes, and yet the chart still does not work even with 1 lot
 
gheka:

I have been puzzling over this for a long time, but I figured it out (I guess I'm too far ahead of you) the test works, and yet the chart still does not work even with 1 lot


Look for the answer in the logbook

Error codes https://docs.mql4.com/ru/errors

Compile in the ekspert directory ...

If the current graph

 
OK, the delays between cycles should be at least 5 seconds. ) Thanks again everyone
 
people!!! what is the error code OrderSend error 4110 ????????? I did not find in the documentation
 
gheka:
people!!! what is OrderSend error 4110 ????????? i couldn't find it in the documentation

ERR_LONGS_NOT_ALLOWED 4110 Long positions are not allowed. Expert properties must be checked.

ERR_SHORTS_NOT_ALLOWED 4111 Short positions are not allowed. Check EA properties.

 
Hello. I apologise at once for the question. What does "FLAG" mean? Order flag, trade flow occupancyflag, object visibilityflag and so on. Is it some kind of label or value? Explain it to me please. Thank you in advance.
 
dimon74:
Hello. I apologize at once for such a question. What does "FLAG" mean? The flag of the order, the flag of trade flow occupancy, the flag of object visibility and so on. Is it some kind of label or value? Explain it to me please. Thank you in advance.

You are about right in your thinking.

This is overwhelmingly a bool type variable.

And it can only have two values:

true and false .

So, if the flag is set (value true), we have an order, if the flag is not set (value false), we don't have an order.

The values true and false do not necessarily mean presence/absence.

Sometimes false means that a condition is present , and true means that there is no condition.

It all depends on the logic of the program and the criteria the programmer checks.

Anyway, if you set these flags yourself, you can specify which flag value (true or false)

will correspond to one data state or another.

There are, however, standard functions that return true or false depending on the result of the function.

You can see these values in the function reference.