Quick question for Miro1360
-
Hi Miro,
This is the MT5 version of your pip counter for MT4 you so kindly helped me to develop last year:https://fxdreema.com/shared/1JvNdFyO
I added a new feature to improve it. I want that only those closed trades from the very moment it is executed on the platform are counted from the history tab. This is why I added a Bucket of closed trades block on the project. However, two wierd things happen. The first one is the data format shown (the last number in the list on the top left screen). This is not how the block says it should be shown.
The second one is how pips are counted. As you can see in this image the number is clearly wrong.

Before you tell me, I checked the pip size rules and they are correct for this broker. I simply duplicated the structure of your counter for MT4. Should this project be different for MT5?
Thank you in advance
-
I think you must convert time variables, because there is plenty of formats


about the pips, I think there is a relation to the spread ... maybe spread is not included

-
I didn't know formats should be specified manually. BTW, how can I write the vertical line separating 'Time_Date' and 'Time_Minutes'?
On the other hand, you're right, spread is not included. How can it be done?
Thanks.
-
copy that from there: |
I used right ALT + W
... for the spread, well maybe do the calculation manually? ... or ask admin if he will add the spread option into settings
-
Great! Once more, thank you very much. But one more final question, please. Will time info put from block 13 into the 'Now' (on Init) variable be recognised by block 11 (bucket of closed positions)? Shoud I change the way block 11 can identify time?
-
I think the way you used Bucket of trades is not right.
Add a new variable of type int (call it now2)
In on Init add this:

and the pips counter create without bucket of trades:

I have not tested it, but something like that ...
-
Ok. I'll try it.
-
As far as I cant tell your variable suggestion works perfect. Thank you.
Unfortunately, a new unexpected problem has appeared. Negative results are incorrectly counted! All losses are considered as gains and I have no idea why.

Any hint?
-
add another condition


-
I'm afraid I disagree. This is not required for the MT4 version:
https://fxdreema.com/shared/x75d43Fwc
Negative results are correctly substracted there. Something is not working properly in the MT5 version, I'm afraid.
-
in that case you should contact the admin and he can repair bugs

-
Ok. I will. Thank you once more.