Announcement

Collapse
No announcement yet.

KAMA - Cannot display on smaller tick charts; why?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • KAMA - Cannot display on smaller tick charts; why?

    Can someone help me figure out why the following code, which I found through the forums, will not display when I try to display it on smaller tick charts. For example, it displays fine on an 89T chart but not on a 21T chart.

    Any help is appreciated, I'm EFS code challenged and cannot figure it out.

    Thanks.
    Attached Files

  • #2
    Re: KAMA - Cannot display on smaller tick charts; why?

    mdk
    The issue is unrelated to the interval and is due to the value of the variable nNoise returning 0 [usually after a protracted series of closes at the same price] which causes a 'divide by 0' error in the following line of code
    nSmooth = Math.pow( ( nSignal/nNoise ) * ( 0.6667 - 0.0645 ) + 0.0645, 2 );
    To resolve the issue insert the following immediately above that line
    if(nNoise==0) nNoise = 1.0;
    Once you make this change the script should be working correctly
    If - as you indicate - you are unfamiliar with programming in efs then you may find it to your benefit to learn to do that as it will enable you to take full advantage of the resources offered by the eSignal application. The best way is to start by reviewing the JavaScript for EFS video series and the Core JavaScript Reference Guide. Those will provide you with a thorough introduction to programming in JavaScript which is at the foundation of EFS. Then go through the EFS KnowledgeBase and study the Help Guides and Tutorials which will provide you with the specifics of EFS.
    Alex



    Originally posted by mdk
    Can someone help me figure out why the following code, which I found through the forums, will not display when I try to display it on smaller tick charts. For example, it displays fine on an 89T chart but not on a 21T chart.

    Any help is appreciated, I'm EFS code challenged and cannot figure it out.

    Thanks.

    Comment

    Working...
    X