Announcement

Collapse
No announcement yet.

Why this doesn't work?

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

  • Why this doesn't work?

    i copy and modified following codes from knowledge base to efs editor:


    function preMain() {

    setPriceStudy(false);
    setStudyTitle("MA");
    setCursorLabelName("MA",0);
    setDefaultBarFgColor(Color.blue,0);
    setPlotType(PLOTTYPE_LINE,0);
    setDefaultBarThickness(1,0);

    var myStudy = null;

    var bInit = false;

    function main() {

    if ( bInit == false ) {


    myStudy = ema( 20, sym("orcl,1") );



    bInit = true;

    }


    return getSeries( myStudy );
    }
    }

    But I got response of "NONE"

    Any suggestion to make it work?

    Thx in advance

  • #2
    Re: Why this doesn't work?

    proptrader
    You omitted to place a closing curly bracket at the end of the preMain() function and placed it instead at the end of the main() function thereby enclosing the entire script as preMain()
    Alex


    Originally posted by proptrader
    i copy and modified following codes from knowledge base to efs editor:


    function preMain() {

    setPriceStudy(false);
    setStudyTitle("MA");
    setCursorLabelName("MA",0);
    setDefaultBarFgColor(Color.blue,0);
    setPlotType(PLOTTYPE_LINE,0);
    setDefaultBarThickness(1,0);

    var myStudy = null;

    var bInit = false;

    function main() {

    if ( bInit == false ) {


    myStudy = ema( 20, sym("orcl,1") );



    bInit = true;

    }


    return getSeries( myStudy );
    }
    }

    But I got response of "NONE"

    Any suggestion to make it work?

    Thx in advance

    Comment


    • #3
      OMG, how can i miss that.

      Thx

      Comment


      • #4
        proptrader
        My pleasure
        Alex


        Originally posted by proptrader
        OMG, how can i miss that.

        Thx

        Comment

        Working...
        X