Tree Optimize Error bug

 

The attached script produces a Tree Optimize Error with the code below uncommented

int n=wa.Widget(0).m_Member;

 It appears that the compiler cannot handle the levels of indirection.

 

Thank you for message. Bug fixed.

 
phampton posted  :

 

The attached script produces a Tree Optimize Error with the code below uncommented

 It appears that the compiler cannot handle the levels of indirection.

 

 

I'm still getting the error with the following line of code:

        double numContracts = MathMax( 1, StartCapital * ( (double)RiskPercent / 100 ) / MathAbs( ( m_Open_BID[ 3 - 2 ] - m_Open_BID[ 3 - 0 ] ) / m_symbol.Point() ) );


yet it compiles fine when declaring it as an int, though it give a truncation warning, as expected.

I'm using MT5 v5 build 239

Furthermore, I have two of those lines in my EA, each in different functions. When I declare both as int's, i get two truncation warnings, as expected. When I changed both to be doubles, I get the 'tree optimization errror'. But when I only change one, and leave the other declared as an int, the MQL5 editor crashes and disappears.

Reason: