No trade statistics option
-
I am working on an EA in MT5. I need to get the Long or short count for a specific group # and market in the formula block. There does not seem to be a way to do this. any suggestions?
James
-
How about the "check trades count" block in the "check trades & orders count" section? I use it to keep the number of trades from a group of trades under X number. You can check either Long, Short or total of open positions as well. At least it has worked for me.
-
I'm realizing the latter would only work as a filter, but if you need the specific number of trades open into a formula then a variable could do the work if it starts in zero and then on each trade make a "check trades count"* and refresh the value of the variable with that number.
*To obtain the "check trades count" number you could make a series of "n" blocks of "check trades count" each one equal to a natural number from 1 to "n" being that the maximum open trades number you mant to have (also limiting the maximum trades open to that number). It would bhe messy, and cumbersome, but it could work. -
Try this idea:
https://fxdreema.com/demo/mt4-bucket-trades -
Why is that option not there in MQL5? I would like to use it the as well.