metatrader not working

 

Hello all

maybe someone can help me

This code in my EA is not working.

Print(" ma55m5 ",ma55m5," ma55 ",ma55," close1 ",Close[1]);


strcomment="MAIN";
if(ma55m5>ma55&&Close[1]>ma55) {Print(" mains ",strcomment); sellone(profit);} //12

if(ma55m5<ma55&&Close[1]<ma55) { Print(" mainb ",strcomment); buyone(profit);} //12

The data for the ma55 is printed prior to this code being executed. When all conditions are true according to the printed data the true action of the if statements are not executed?

Yes there is a smiley face for the EA. I have both live and demo accounts with 2 different dealers .

I noticed during testing that some of my code would not be acted on but put that down to the tester. That was not this part of the code however it was somewher else in the EA.

Testing always produced the correct action for this code.

Help

Please

Ross

noranross@tadaust.org.au

 

maybe is double contents issues? could try

ma55m5 = NormalizeDouble(ma55m5,Digits );

ma55 = NormalizeDouble(ma55,Digits );

then know 4 sur that same content resolution as Close[].

i say cuz Print() maybe not print real contents...

Print(DoubleToStr(ma55,8));

not same Print(ma55);

help says:

Data of double type are printed with 4 decimal digits after point. To output more precisely, use the DoubleToStr() function.
-

so that why i say use NormalizeDouble(xyz,Digits );

u set zerro all digits right of 'Digits' - now same as price data for symbol/digits

Reason: