Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1277

 
graf1976:

Good day to you all.

Can you advise how to fix this situation?

According to the manual :

CHARTEVENT_OBJECT_CLICK

Mouse click on graphical object


Actually, the reaction to this command happens after releasing the mouse button, i.e. pointing at the object, click, no reaction, release, there is a reaction.

Is it possible to make the reaction, exactly, on the mouse button press ?

Either no one knows, or it can't be fixed ?
 
graf1976:
Either no one knows it or it can't be fixed?
If you know less English than I do, and I don't know it at all, then nothing will help you. I think click is not just a push, but a push and release. In Russian it's poke... But when writing documentation you can't write "poke", so they wrote click. Try to write a custom event, it may work.
 

Hi all!

Can you please explain to me why the EA ALWAYS opens a trade with a lot that does not correspond to the lot calculated in the code?

 
Andrey Ilinykh:

Hi all!

Can you please explain to me why the EA ALWAYS opens a trade with a lot that does not correspond to the lot calculated in the code?

Because it is not calculating correctly. Look for a calculation error in the code.
 
Alexey Viktorov:
Because it is not calculating correctly. Look for a calculation error in the code.

I specifically underlined the word EVERYWHERE.

I double-checked it a thousand times. I mean, the previous trade was calculated correctly and the next one too. I don't know what the mistake is.

 
Andrey Ilinykh:

I specifically highlighted the word EVERYWHERE.

I double-checked it a thousand times. I mean, the previous trade was calculated correctly and the next one too. I do not understand what is the error.

In a magazine or file, calculate values write, perhaps takes the old, from previous transactions, not correctly updates, there may be many reasons.

 

Hello.

I understand that in MQL4, there is no possibility to draw lines as bars in indicators? That is, let us say that an indicator style is a line. It is not drawn as a continuous line connecting all points of the indicator buffer, but only from some points determined by some condition? Or, for example, it is not one line, but several lines and different segments, of different colours.

Roughly speaking, is it possible to draw like this with an indicator? This is drawn with graphical objects.


 
leonerd:

Hello.

I understand that in MQL4, there is no possibility to draw lines as bars in indicators? That is, let us say that an indicator style is a line. It is not drawn as a continuous line connecting all points of the indicator buffer, but only from some points determined by some condition? Or, for example, it is not one line, but several lines and different segments, of different colours.

Roughly speaking, is it possible to draw like this with an indicator? This is drawn with graphical objects.


SetIndexStyle(0,DRAW_SECTION);
 
Alekseu Fedotov:

And how is this done for my picture above? Is it a single indicator buffer or what? I don't understand how to separate the sections?

 
Medved49:
Have you worked it out? I'm not getting it either and haven't found an answer yet.
No.