Your posted code doesn't generate anything. Your switch only functions on zero.
MQL? respects your code.
How To Ask Questions The Smart Way. (2004
Don't rush to claim that you have found a bug.
Questions Not To Ask
My program doesn't work. I think system facility X is broken.It is almost always your code.
Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. Always post all relevant code (using Code button) or attach the file.
How To Ask Questions The Smart Way. (2004
Be precise and informative about your problem
We can't see your broken code.
You do understand that a char can only hold [-128 to 127]thanks william for your pointers...apologies for not including the entire codes here because they are large and spans multi-libraries, i thought it might confuse more... i made some adjustments and now not getting the strange numbers generated but i still do not understand why its happening as it did....let me try out some more and do research on how to make a variable persistent (static doesnt seem to be working) come back when i surrender.
Thanks again for your kind intent.
Your posted code doesn't generate anything. Your switch only functions on zero.
MQL? respects your code.
How To Ask Questions The Smart Way. (2004
Don't rush to claim that you have found a bug.
Questions Not To Ask
My program doesn't work. I think system facility X is broken.It is almost always your code.
Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. Always post all relevant code (using Code button) or attach the file.
How To Ask Questions The Smart Way. (2004
Be precise and informative about your problem
We can't see your broken code.
You do understand that a char can only hold [-128 to 127]
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all,
i'm defining flag variable called char "alertswitch" from 1-10 with their corresponding negative nos. for short positions. I do this in order to identify certain conditions have been met processing and for documentation purpose. when i ran it inside my function below, it keeps on generating strange numbers like " 34, 44, 72, 16, -112, 80, 118, -92, 58, -48, 32,..."
even when none of the if conditions are being triggered, alertswitch variable keep on changing! below is the printf result at each steps of the way.
0 Alertswitch1 : 44 : fixalertwitch : 72 alertswitch : 44 (after the function call)
1 Alertswitch1 : 44 : fixalertwitch : 0 alertswitch : 0 (inside the beginning of the function)
end Alertswitch1 : -34 : fixalertwitch : -34 alertswitch : -34 (inside the end of the function)
0 Alertswitch1 : -34 : fixalertwitch : 44 alertswitch : -34 (after the function call)
1 Alertswitch1 : -34 : fixalertwitch : 0 alertswitch : 0 (inside the beginning of the function)
end Alertswitch1 : -108 : fixalertwitch : -108 alertswitch : -108 (inside the end of the function)
separately, when i use != for alertswitch to control the if-else statment, MQL doesnt respect it at all, even if the alertswitch clearly shows the expression to be true.
Appreciate all your HELP!!!