Announcement

Collapse
No announcement yet.

Cursor labels and chart related issues

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

  • Cursor labels and chart related issues

    Below I have attached a Woodies group indicator EFS. I am trying to do a few things to it and not sure how to.

    1) I am not sure how to hide a few of the cursor window items? I tried commenting out the setcursorlabelname and many other things but no luck. I am trying to hide the 0-5 but one is
    setCursorLabelName("34 EMA", 0);

    2) When this shows on the ES chart I am not sure how to get the ES emini to show a "." prior to the 2 decimal places. Currently it shows the same as the full S&P contract like 110900

    3) When I load an ES chart with a tick interval it shows 0:00-24:00 but when I set the same chart to a 3min time frame it then goes to 9:30-16:00. I can't seem to change this and don't know why this happens.

    Thanks for the help.
    Attached Files

  • #2
    Hello Rangers,

    1) The cursor labels are an all or nothing setup. If you want don't want to display any cursor labels, add setShowCursorLabel(false); to the preMain() function. Returning an array of data to the chart and only having one cursor label isn't possible at this time.

    2) Divide your numbers by 100 to move the decimal over 2 places.

    3) Tick intervals default to dynamic mode and we don't have control over the start and end times with tick intervals currently.
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment


    • #3
      Thanks. On #3 I was saying I am not sure how to change the time when I set it to 3min as it is set to 930-1600 and I am central. I don't mind the 0-24 on the tick charts.

      Comment


      • #4
        The time can be set in your time template. Right-click on your chart and select Time Templates --> Edit and create a new template similar to one of the Equity RTH templates.
        Jason K.
        Project Manager
        eSignal - an Interactive Data company

        EFS KnowledgeBase
        JavaScript for EFS Video Series
        EFS Beginner Tutorial Series
        EFS Glossary
        Custom EFS Development Policy

        New User Orientation

        Comment


        • #5
          Thanks for this. So the EFS I am using does have some decimal settings in it at least. I put a piece of it below. I figured this would set the decimal place without have to divide it by 100. Apparently that is not the case. So just add sym/100 if ES in this below?

          PHP Code:
          sym=getSymbol().substring(0,2);
          decPts=2;
          if(
          sym=="6E")decPts=4;
          if(
          sym=="ES")decPts=2;
          if(
          sym=="ZB")decPts=0;
          if(
          sym=="YM")decPts=0;
          if(
          sym=="AB")decPts=2;
          sHour 930eHour=1615;
          if(
          sym=="6E"||sym=="ZB"){ sHour 820eHour=1500;}
          start=1;

          Comment


          • #6
            Hello rangers,

            I would set your decPts variable to the required divisor instead. Then you just need to divide your price by decPts. Example:

            PHP Code:
            var sym=getSymbol().substring(0,2);
            var 
            decPts=1;
            if(
            sym=="6E")decPts=10000;
            if(
            sym=="ES")decPts=100;
            if(
            sym=="ZB")decPts=1;
            if(
            sym=="YM")decPts=1;
            if(
            sym=="AB")decPts=100;
            sHour 930eHour=1615;

            if(
            sym=="6E"||sym=="ZB"){ sHour 820eHour=1500;}
                
            start=1;
            }

            var 
            vLast close()/decPts;

            return 
            vLast
            Jason K.
            Project Manager
            eSignal - an Interactive Data company

            EFS KnowledgeBase
            JavaScript for EFS Video Series
            EFS Beginner Tutorial Series
            EFS Glossary
            Custom EFS Development Policy

            New User Orientation

            Comment


            • #7
              Thanks. This makes sense, but so far it isn't working for me. I admit I am probably considered a newbie with EFS code, but I have been using TS Easy Language for quite some time. So please forgive me.

              I found I have two sections in the EFS with decimal values. I am showing those below updated to what I believe they should be. Secondly I put the var you gave me up under main as it complained if I didn't.

              So currently the ES price displayed on the right is still showing "111200" for example instead of "1112.00". Thanks.

              First section:
              PHP Code:
              decPts=1;
              if(
              sym=="ES")decPts=100;
              if(
              sym=="6E")decPts=10000;
              if(
              sym=="AB")decPts=1000;
              if(
              sym=="ZB")decPts=1000;
              if(
              sym=="YM")decPts=1
              Second Section:
              PHP Code:
              sym=getSymbol().substring(0,2);
              decPts=1;
              if(
              sym=="6E")decPts=10000;
              if(
              sym=="ES")decPts=100;
              if(
              sym=="ZB")decPts=1;
              if(
              sym=="YM")decPts=1;
              if(
              sym=="AB")decPts=100;
              sHour 930eHour=1615;
              if(
              sym=="6E"||sym=="ZB"){ sHour 820eHour=1500;}
              start=1;

              Comment


              • #8
                Hello rangers,

                Our code solution we have here for changing the decimal place only affects the numbers that appear in the cursor label window. We cannot change the decimalization of the y-axis labels currently.
                Jason K.
                Project Manager
                eSignal - an Interactive Data company

                EFS KnowledgeBase
                JavaScript for EFS Video Series
                EFS Beginner Tutorial Series
                EFS Glossary
                Custom EFS Development Policy

                New User Orientation

                Comment

                Working...
                X