we need to know more about the folowing variabes
currentStopLoss
& prevBarTrendDown
it seem that they have the same amount
for that the result is 0.0000
because digits is 5, and the non-zero digit appears later on? Example: 0.000001
Probably because the one line should read:
if (Result == 0.0) {
0 is an int(eger), while 0.0 is a double, which is the same as Result in the comparison. When you compare integers with doubles, different things can happen. Or even better:
if (Result < 0.0001) {

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Any idea why this code snippet gives the below output?
if(result== 0) {
Print("Result is 0");
} else {
Print("Result is not 0: " + DoubleToStr(result, Digits));
}
[/CODE]
Output's : [CODE]Result is not 0: 0.00000