Variable comparison of losing and winning closed positions
-
hi. I would like to put in a variable all closed positions, both Buy and Sell winning. And the same thing I would like to do with the losing ones, to be able to compare them with the Condition block. How can I do?
thank you. -
@pontedruse It depends on the amount of closed trades you want to check. Your MT4 can have thousands of them in the History tab. What's the limit?
-
-
-
@l-andorrà The limit should be: that once the 2 variables have been compared with each other, for example: reaching parity (sell and buy winnings == sell and buy losses), the count must start from zero, and re-count the new trades winners and losers that close from the confrontation onwards
-
@pontedruse Then you can use this project as a way to begin. Here you can check open and closed trades when comparing pips. Once the target in pips is reached, the EA self terminates. Simply remove the self terminate block and substitute it by a variables as you describe.
Please note that this EA is looking at the hostory tab of the EA for the closed trades. This means, as I said in my previous post, that all closed trades from the day the account was created will be considered. Just select a time filter on yout MT4 to limit that number of trades.
-
@l-andorrà Show me a practical example, with some pictures. However I use mt5 no mt4.
-
@pontedruse Sorry, I forgot to add the link:
-
@l-andorrà I tried it but it doesn't work. There is no function in mql5 that directly calculates the number of closed winning and losing positions ??
-
@pontedruse No, there is none AFAIK.
-
@pontedruse said in Variable comparison of losing and winning closed positions:
hi. I would like to put in a variable all closed positions, both Buy and Sell winning. And the same thing I would like to do with the losing ones, to be able to compare them with the Condition block. How can I do?
thank you. -
@l-andorrà Thanks all the same for your kindness. If you come up with any new ideas later, just let me know.
-
@pontedruse said in Variable comparison of losing and winning closed positions:
@pontedruse said in Variable comparison of losing and winning closed positions:
hi. I would like to put in a variable all closed positions, both Buy and Sell winning. And the same thing I would like to do with the losing ones, to be able to compare them with the Condition block. How can I do?
thank you.@trader.philipps @ambrogio @josecortesllobat @seb 0 @Zackry @AlphaOmega @CPxiom @timmyhanke @Spuzy @biztet @Hadees @TitanGeorge @CPBonzo @Xfire @CDWilder1 @fxDreema