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

 
smithers88:
Is it possible to simply paint a small rectangle on the background of the price chart, say, blue?

It's all there, I think you can figure out the anchor points
 
Artyom Trishkin:
Well, not really... Maybe(?) a histogram by thickness of a candle. Otherwise, the object will be between two candlesticks.

A line, not necessarily a rectangle. But a histogram is also an option.

Canvas.mqh can also be used, I guess. It depends on what you want to do.

 
I'll look into it now.
Thank you all.
 
smithers88:
Can I simply paint a small rectangle on the background of the price chart, say, blue?

You can do it
 

Good day everyone! Can you please advise how to set the deletion of an order in an EA?

The situation is as follows:

We place 2pending orders in different directions, as soon as one of them triggers, the other is removed and is no longer exhibited.

I would be very grateful for any help.

I would be very thankful for it.

 
yaaarik777:

Good day everyone! Can you please advise how to set an order deletion in an EA?

The situation is as follows:

We place 2pending orders in different directions, as soon as one of them triggers, the other is removed and is no longer exhibited.

I would be very thankful for any help.

I would be very thankful for it.

Do you need mql4?
 
Artyom Trishkin:
Do you need mql4 ?
Yes
 
yaaarik777:
Yes
Have you tried anything yourself?
 
Artyom Trishkin:
Have you tried anything yourself?
I'm just learning, I'm trying to use the guide, but I realise that I'm getting some nonsense, so I'd like to see an example of how to do it.
 
yaaarik777:
I am just learning, I am trying to use the handbook, but I realise it turns out to be absurd.

Look, here is your condition:

we place 2pending orders in different directions, as soon as one of them triggers, the other one is deleted and is not placed again.

If I set two pending orders in different directions, I understand, but when, in what situation? (because it is recurring, not just once).

As soon as one of these two triggers, the one that didn't work is deleted immediately - I see.

... And never set it again - this is not quite clear. It will never be displayed again? We have a cycle of EA operation.

Reason: