Hi all, have any of you ever run into anything like this? It looks to me like my float variables are being turned into strings by something I am doing. This is the code that seems to be doing it:
var aClose = callFunction("/OHLC/getPrevDaysOHLC.efs", "main", "Close", 0);
var aHigh = callFunction("/OHLC/getPrevDaysOHLC.efs", "main", "High", 0);
var aLow = callFunction("/OHLC/getPrevDaysOHLC.efs", "main", "Low", 0);
var range = aHigh - aLow;
var p = range * 0.10;
var r = aLow + p;
debugPrint("\n"+getSymbol()+" day: "+getDay()+" low: "+aLow+" 10% range "+p+" low + 10% range "+r);
This is what I get in the formula output window:
JNJ day: 19 low: 50.18 10% range 0.07199999999999988 low + 10% range 50.180.07199999999999988
It looks to me as if when I multiplied range by 0.10, it turned p into a string. Any ideas why this may be happening?
Thanks.
var aClose = callFunction("/OHLC/getPrevDaysOHLC.efs", "main", "Close", 0);
var aHigh = callFunction("/OHLC/getPrevDaysOHLC.efs", "main", "High", 0);
var aLow = callFunction("/OHLC/getPrevDaysOHLC.efs", "main", "Low", 0);
var range = aHigh - aLow;
var p = range * 0.10;
var r = aLow + p;
debugPrint("\n"+getSymbol()+" day: "+getDay()+" low: "+aLow+" 10% range "+p+" low + 10% range "+r);
This is what I get in the formula output window:
JNJ day: 19 low: 50.18 10% range 0.07199999999999988 low + 10% range 50.180.07199999999999988
It looks to me as if when I multiplied range by 0.10, it turned p into a string. Any ideas why this may be happening?
Thanks.
Comment