Adding comment to a position, then try to call that specific position by its comment to count its profit or loss and close it - page 2
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Yes and it works fine! Thank you @nicholi shen
For God's sake man, take some pride in your work. That indentation is pure cringe. Also, just like stackoverflow and any other site you'd use to talk programming, post code not screenshots of code!
The first check is redundant since the for loop will never enter if all is <= 0. Also, selecting a position by symbol and magic number is already built into CPositionInfo. Finally, it is not necessary to use continue statements combined with not conditions. Since MT4 build 600 expressions stop being evaluated after it is evident that the if control statement will resolve to false, so you can just use one singe if statement.
Example:
For God's sake man, take some pride in your work. That indentation is pure cringe. Also, just like stackoverflow and any other site you'd use to talk programming, post code not screenshots of code!
ok sorry, here it is.
ok sorry, here it is.
Nice troll bro
Nice troll bro
solved!
thank you guys.
hey guys
I think I have the same problem with selecting more than one position among all positions with some specific properties like Comments, tickets or buy or sell. I use the code attached but it seems it doesn't work correctly. for selecting one position its ok but more than one position with the same identifiers it is showing wrong outcomes.
I want to select all buy positions which have "B1" comment with different Symbols (for example, EURUSD, GBPUSD and USDJPY) and calculate their profit.hey guys
I think I have the same problem with selecting more than one position among all positions with some specific properties like Comments, tickets or buy or sell. I use the code attached but it seems it doesn't work correctly. for selecting one position its ok but more than one position with the same identifiers it is showing wrong outcomes.
I want to select all buy positions which have "B1" comment with different Symbols (for example, EURUSD, GBPUSD and USDJPY) and calculate their profit.Do you really seriously code like this? Please tell me you're trolling... you're trolling, right?
Do you really seriously code like this? Please tell me you're trolling... you're trolling, right?