Attachments forums

List of attachments posted on this forum.


All files on forums: 137488

Re: Coding Help

traderduke, Sat Jun 15, 2019 5:29 am

MrTools
I can't seem to clear this warning "Expression not Boolean" on line #354 which is "return(0);" I tried putting true in their but that screwed everything up. I went up on mql5 website but nothing I saw addressed this situation. This of course is a Renko EA.

See below;

Can you please give it a look and suggest the correct answer.

Thank you
Ray
{
if(UseSlowMa)
{
ReadIndicatorValues();
if(CandleIn == 1 )
{if(Open[1] < Close[1]
&& Close[1] > slowestMA
&& TimeCondition())
return(true); return(false);}

else if(CandleIn == 2)
{if(Open[1] < Close[1] &&
Open[2] < Close[2]
&& Close[1] > slowestMA
&& TimeCondition())
return(true); return(false);}

else if(CandleIn == 3)
{if (Open[1] < Close[1] &&
Open[2] < Close[2] &&
Open[3] < Close[3]
&& Close[1] > slowestMA
&& TimeCondition()) return(true); return(false);}

else if(CandleIn == 4)
{if (Open[1] < Close[1] &&
Open[2] < Close[2] &&
Open[3] < Close[3] &&
Open[4] < Close[4]
&& Close[1] > slowestMA
&& TimeCondition()) return(true); return(false);}

else if(CandleIn == 0 || CandleIn > 4)
{if(Open[1] < Close[1]
&& Close[1] > slowestMA
&& TimeCondition())
return(true); return(false);}
}
return (0) ; //need new expression
}
All files in topic