Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 808

 
Terind:

Hello! Help me out here. I am writing my first EA in MQL4.

My Expert Advisor opens a position but does not close it. It does not show any errors in the log.

This condition does not work:

if ((OrdersTotal()!=0) && (OrderMagicNumber()==Magic)) //ордер ещё не выбран с помощью OrderSelect()
 
evillive:

This is the condition that doesn't work:

Thank you. Fixed it, it's working now.
 
Hello. i have encountered this problem. when i draw lines and rectangles on the chart of one pair, all these elements are displayed on the markets of other pairs. why is this and how can i remove it?
 
roymax:
Hello. i have encountered such a problem. when i draw lines and rectangles on the chart of one pair, all these elements are displayed on the markets of other pairs. why is this so, and how can i remove it?
I need to show it, since others do not know how to do it. And preferably in the code
 

This is a long-standing bug, you could consider it a feature :)

1. Draw something on some graph

2. Press the spacebar and move to another pair

The graphical objects remain on the chart

Example:

On the graph of the euro, a straight line has been plotted

Moved to the pound and reduced the vertical scale

 
tara:

This is a long-standing bug, you could consider it a feature :)

1. Draw something on some graph

2. Press the spacebar and move to another pair

The graphical objects remain on the chart

Bild 765, doesn't work, the objects do stay, but on the graphic where they were created :)

P.S.: The way Alexey described certainly works, but in fact this action takes place in one window, the chart symbol changes, but the object is attached to the window, not to a symbol)))

 
Does AccountInfoInteger(ACCOUNT_TRADE_ALLOWED)=false mean that the account is blocked? Or is it just a trade ban? What other criteria are there for a blocked account? And what exactly, besides a trade ban, is the account blocked if the login was passed (I mean error 64)?
 
tara:

This is a long-standing bug, you could consider it a feature :)

1. Draw something on some graph

2. Press the spacebar and move to another pair

The graphical objects remain on the chart

Example:

and this has not been fixed in any way?
 

Hello. I looked in the documentation but couldn't find it. my question is this. is it possible to change this image at the start of the EA to your logo?






 
pycha:

Hello. I searched the documentation but couldn't find it. my question is this. can I change this picture when starting the EA to my logo?

#property icon "\\\\Images\\\xxx.ico";
Reason: