ahmadsabryelgendi / Publications
Forum
Consecutive Bullish Candles Function logic problem
Hi ,, I appreciate your help for the below function that search in a range to extract the most number of bullish candles and return the first candle in the trend with an exception of maximum 2 bearish candles , in other words , if there were 7 candles in uptrend and there were 2 maximum bearish
&& Illegal operation use
I am trying to use 2 conditions , but I get that error message: && Illegal operation use Below is my function and the if condition , that line is causing issues to me: if ( ( iClose ( _Symbol , PERIOD_W1 , 1 ) > iClose ( _Symbol , PERIOD_W1 , 3 )) && (CondBuy1 = 1 )) { BUY_IT1( 0.01 );} #property