Comment block does not show the correct information on chart
-
In fxDreema for MT5, the Comment block does not show the correct information from the Bucket of Positions block, on the chart in MT5 platform.
For example, here is what I see on the chart in MetaTrader 5 :
Trades Count: 6.75948526541678E+273
Lots Total Value (Sum): 6.75948526541678E+273
Profit Total Value (Sum): 6.75948526541678E+273
For some variables used in the Expert Advisor, values I see on the chart are:
0.00000000000000e+00
inf
Otherwise, the Expert Advisor is working fine.
It is opening and closing trades as expected.Anyone had similar experience.
Any help would be appreciated.
-
This is a known problem with mt5, you have to use a ping block set up to mimic, set a variable to 0 - for each position - formula block to add 1 to the variable... you can use this set up for any information you need to get.
-
Thanks jstap for your reply.
I was pleased to know that this is a known problem with mt5, and not unique to my particular setup.
I am not familiar with how to use a ping block.
Could you please provide more information on that.
-
This should work, you can use close positions for different results:
https://fxdreema.com/shared/OpaH7iYwe -
@ExWize
It is the EMPTY_VALUE and numeric representation issue.For numeric representation, you can try function like DoubleToString(variable_name,Digits)

-
Thanks jstap, I greatly appreciate your help.
I was able to resolve the issue by adapting the blocks you provided to my Expert Advisor.
This solution worked because it avoided using the "Bucket of Positions" block.
Important takeaways from this experience:
I believe this issue is caused by the underlying code of the Bucket of Positions block, and the way it interacts with the data feed from the broker.
This issue occurs with some brokers, not all.
One broker I used for years without this issue appearing at any time, then suddenly a few days ago this issue appeared, with the same MT5 Expert Advisor that was working as expected the day before.
This means the broker changed something in their hardware or software which caused a conflict somewhere in the system.MT4 has the same problem.
With one broker, I converted my MT5 Expert Advisor to MT4, but it made no difference.
The same issue appeared with the MT4 Expert Advisor.Had my trading algorithm depended on data from the Bucket of Positions block, the consequences could have been more serious than just an error in comments on a chart !
Ultimately, the issue seems to be caused by a conflict between broker infrastructure, MetaQuotes Language (MQL), and the language in which fxDreema is written.
Acknowledgements:
Many thanks to the developers of fxDreema.
There are similar tools for MetaTrader, but nothing comes even close to fxDreema.
-
Tried DoubleToString(variable_name,Digits) with a variable that depended on data received from Bucket of Positions.
The variable value printed on chart was wrong.
This further confirms that the issue is caused by Bucket of Positions block.
The other two blocks in this category:
Bucket of Closed Positions
Bucket of Pending PositionsShould also be handled with care !