Hello
I am having a strange problem. I have copy/pasted this code because ema(100) returned either null og nan. I decided to copy code already available. When I use ema(10) or ema(50) the code respons as expected, but when I use other values like 150 the code returns with nan? I cant find any logic in this, am I missing something here?
appreciate your help, tx.
Danny Nielsen
/************************************************** ***************
Provided By:
Interactive Data Corporation (Copyright © eSignal) 2010.
All rights reserved. This sample eSignal Formula Script (EFS)
is for educational purposes only. Interactive Data Corporation
reserves the right to modify and overwrite this EFS file with
each new release.
************************************************** ****************/
function preMain() {
setPriceStudy(true);
setStudyTitle("EMA");
setCursorLabelName("EMA",0);
setDefaultBarFgColor(Color.RGB(0x00,0x94,0xFF), 0);
setPlotType(PLOTTYPE_LINE,0);
setDefaultBarThickness(1,0);
}
function main() {
return "::"+ema(10)+"::";
}
I am having a strange problem. I have copy/pasted this code because ema(100) returned either null og nan. I decided to copy code already available. When I use ema(10) or ema(50) the code respons as expected, but when I use other values like 150 the code returns with nan? I cant find any logic in this, am I missing something here?
appreciate your help, tx.
Danny Nielsen
/************************************************** ***************
Provided By:
Interactive Data Corporation (Copyright © eSignal) 2010.
All rights reserved. This sample eSignal Formula Script (EFS)
is for educational purposes only. Interactive Data Corporation
reserves the right to modify and overwrite this EFS file with
each new release.
************************************************** ****************/
function preMain() {
setPriceStudy(true);
setStudyTitle("EMA");
setCursorLabelName("EMA",0);
setDefaultBarFgColor(Color.RGB(0x00,0x94,0xFF), 0);
setPlotType(PLOTTYPE_LINE,0);
setDefaultBarThickness(1,0);
}
function main() {
return "::"+ema(10)+"::";
}
Comment