Closed position profit

 

Hi all,

why is so hard in MQL5 to get last closed position profit, or at least if this was >=0 or <0 ?

I'm not posting any code as I tried all that I could find on mql5.com, but none of it worked.

Please, can anybody post some minimal example ?

Thank you. 

 
robdabank: why is so hard in MQL5 to get last closed position profit, or at least if this was >=0 or <0 ? I'm not posting any code as I tried all that I could find on mql5.com, but none of it worked. Please, can anybody post some minimal example ?

We cannot read your mind nor see your computer. Explain yourself properly and in detail please. And yes, you will need to show your code if you want anyone to understand what it is you are trying to achieve.

This is the usual boiler-plate template response ...

  • Usually people who can't code don't receive free help on this forum.
  • If you show your attempts and describe your problem clearly, you will most probably receive an answer from the community. Use the CODE button (Alt-S) when inserting code.
  • To learn MQL programming, you can research the many available Articles on the subject, or examples in the Codebase, as well as reference the online Documentation.
  • If you do not want to learn to code, that is not a problem. You can either look at the Codebase if something free already exists, or in the Market for paid products (also sometimes free). However, recommendations or suggestions for Market products are not allowed on the forum, so you will have to do your own research.
  • Finally, you also have the option to hire a programmer in the Freelance section.
 
Your topic has been moved to the section: Expert Advisors and Automated Trading
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
 
Reason: