Stuck with an EA programming. Can anyone help this newbie?

 

The matter is that I want to exit a position at first profitable close of the day after entry. Can somebody help? I don't know how to code this in mql5.

I am working with XAUUSD.

 
Neeraj Jain: The matter is that I want to exit a position at first profitable close of the day after entry. Can somebody help? I don't know how to code this in mql5. I am working with XAUUSD.

If you don't know how to code anything in MQL at all, then we cannot help you much. You will have to start by at least leaning the basics by yourself first, via reading Articles or books, or viewing videos., reference the documentation and analysing code in the CodeBase. Only once you have shown us a valid attempt yourself can we then start helping you with specific issues.

So, in summary, you if you want help, then please show your code in which you attempt this, so that we can point out things and offer you guidance.

If however you don't have the time or want to dedicate the effort, then please consider hiring someone to code it for you in the Freelance section.

 

Hi

As was said above – you should try to code it first(the documentation on mq5 is very helpful here) or hire someone to do it for you.
But it seems that this function you need is not so complicated – you need to detect the first close of the day and then close all profitable positions.
Also please note that Eas are working on the chart they are applied normally – or you can set the instrument in the code – but it’s not so important what kind of instrument is this (code is working the same for all trades).

 

Hello everyone, pls i am new to mql5 and i'ii need ur help. i'm currently working on an ea but i find one thing confusing.

will the positionOpenPrice change after a pending order is triggered to that of the pending order or will it still remain as that of the first order.

Thanks in advance.

 
great2-2 #:

Hello everyone, pls i am new to mql5 and i'ii need ur help. i'm currently working on an ea but i find one thing confusing.

will the positionOpenPrice change after a pending order is triggered to that of the pending order or will it still remain as that of the first order.

Thanks in advance.

Do not double/triple post!

Your other duplicated posts have been deleted.

If you continue to double post, you can expect a ban.

 
great2-2 #: Hello everyone, pls i am new to mql5 and i'ii need ur help. i'm currently working on an ea but i find one thing confusing. will the positionOpenPrice change after a pending order is triggered to that of the pending order or will it still remain as that of the first order. Thanks in advance.

Yes, the position's opening price can be different (due to slippage) when compared to the requested opening price in the pending order.

 
great2-2 #: Hello everyone, pls i am new to mql5 and i'ii need ur help.

This is an international English forum; post in English on this part of the forums. "pls" and "ur" are not words.
          Please don't write ur - it's "you are" or "your" - MQL4 programming forum (2014)

Reason: