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

 
grimc124 #:

Good evening, help me to rewrite a code section in MQL4 for MQL5 compiler, if not hard, thanks!

Read about indicators handles.

 

How do I understand Close on the zero bar? For example, condition

if (ma>Close[0])

How does metatrader understand this? If I understand correctly, bar close is a future event and can only be compared when it occurs. But, that said condition works in practice, but in a completely different way than Close[1]

 
Ivan Butko #:

How do I understand Close on the zero bar? For example, condition

if (ma>Close[0])

How does metatrader understand this? If I understand correctly, bar close is a future event and can only be compared when it occurs. But, at the same time, the above condition works in practice in a quite different way from Close[1]

Close[0] is Bid

 
Artyom Trishkin #:

Close[0] is Bid

Thank you! The behaviour of the owl is now clear.
 
Ivan Butko #:
Oh, thank you. Now I understand the owl's behaviour.

Does it bite? Does it bite? Or does it hum loudly? If it bites, put a blanket over it - it will sit still - tried it out

 
Artyom Trishkin #:

Does it bite? Or does it bite loudly? If it bites, put a blanket over it - it will sit still - tried it out

Photo, please!
 
Artyom Trishkin #:

Does it bite? Or does it bite loudly? If it bites, put a blanket over it - it will sit still - tried it out

https://www.instagram.com/p/CIsS2KigtET

 
Valeriy Yastremskiy #:
Silly, because the warrants are numbered as it is. They have ordinal numbers and tickets. And you write the ordinal numbers plus 1 in Magik. And you do this even without a distinctive prefix, by which you could distinguish the orders you need.

I assign magiks only to pending orders and then using them I need to track the order status: whether it was closed or became a market order.
 
Artyom Trishkin #:

Does it bite? Does it bite? Or does it hum loudly? If she bites, put a blanket over her and she'll sit still.

I'm dissecting her now. I also need to put in a time-limit block. Let it hum in the European and American sessions.

 
Nerd Trader #:
I only assign magiks to pending orders and then I need to track the order's state: whether it was closed or became a market order.

And you only open new pending orders after the last order in the first series of pending orders is closed?

Reason: