So crossup==0 must be true and isthiscandleswingh() must be true.
Inside isthiscandleswingh() :
if (crossup==true){
double currentcandle=High[1]; //check if cuurent candle is the hiest of previos 8 if (currentcandle>highestprevbar){
returntrue;
}
}
You want crossup to be true for the function to return true, but than means crossup!=0 (as false=0 and true any value not being 0).
Both crossup==0 and isthiscandleswingh() can never be true at the same time.
So crossup==0 must be true and isthiscandleswingh() must be true.
Inside isthiscandleswingh() :
You want crossup to be true for the function to return true, but than means crossup!=0 (as false=0 and true any value not being 0).
Both crossup==0 and isthiscandleswingh() can never be true at the same time.
ok mate bear with im still giting used to mql4, i check if crossup=0 and is isthiscandleswingh to be true if in case if isthiscandleswingh result false it will return false that is why i put else return false ,if this is the wrong way to approach this issue what is the right way ? thank you for bring patient
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
wait, i comment out /*&&(isthiscandleswingl()) && minswingcandle<=2*/ and it work fine both crossup and
have different function they are no associated by any mean , please explain your point,thanks
You have this condition :
So crossup==0 must be true and isthiscandleswingh() must be true.
Inside isthiscandleswingh() :
You want crossup to be true for the function to return true, but than means crossup!=0 (as false=0 and true any value not being 0).
Both crossup==0 and isthiscandleswingh() can never be true at the same time.
You have this condition :
So crossup==0 must be true and isthiscandleswingh() must be true.
Inside isthiscandleswingh() :
You want crossup to be true for the function to return true, but than means crossup!=0 (as false=0 and true any value not being 0).
Both crossup==0 and isthiscandleswingh() can never be true at the same time.
ok mate bear with im still giting used to mql4, i check if crossup=0 and is isthiscandleswingh to be true if in case if isthiscandleswingh result false it will return false that is why i put else return false ,if this is the wrong way to approach this issue what is the right way ? thank you for bring patient