Announcement

Collapse
No announcement yet.

Tick Size

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

  • Tick Size

    Is there a way to get the tick size of the underlying (i.e., 0.25 for ES #F) without creating a series (too inefficient and I can't "grab" the value for use in a script).

    I found the attached efs that correctly plots the tick size to the output window but it creates a series using min() so it produces many other price values.

    In effect I haven't been able to use the tick size by any means I tried (like .getValue(0) or getValue(-!)).

    Thanks in advance for any help.

    Wayne
    PHP Code:
    var nBarCounter 0;
    var 
    null;

    function 
    main(){
         if ( 
    getBarState() == BARSTATE_NEWBAR ) {
            
    nBarCounter ++;
         }
        if (
    getCurrentBarIndex()<-&& nBarCounter>3z=Min_Move();
        return 
    z+" ";
    }

    var 
    mMove=1000;

    function 
    Min_Move(){

        var 
    cDelta Math.abs(close(0)-close(-1));
        if (
    cDeltamMove Math.min(cDelta,mMove);
    //    debugPrintln(mMove);
        
    return mMove

    Last edited by waynecd; 11-04-2008, 01:27 AM.

  • #2
    Re: Tick Size

    waynecd
    FWIW min() is a method of the Math Object and does not return a series.
    Alex


    Originally posted by waynecd
    Is there a way to get the tick size of the underlying (i.e., 0.25 for ES #F) without creating a series (too inefficient and I can't "grab" the value for use in a script).

    I found the attached efs that correctly plots the tick size to the output window but it creates a series using min() so it produces many other price values.

    In effect I haven't been able to use the tick size by any means I tried (like .getValue(0) or getValue(-!)).

    Thanks in advance for any help.

    Wayne
    PHP Code:
    var nBarCounter 0;
    var 
    null;

    function 
    main(){
         if ( 
    getBarState() == BARSTATE_NEWBAR ) {
            
    nBarCounter ++;
         }
        if (
    getCurrentBarIndex()<-&& nBarCounter>3z=Min_Move();
        return 
    z+" ";
    }

    var 
    mMove=1000;

    function 
    Min_Move(){

        var 
    cDelta Math.abs(close(0)-close(-1));
        if (
    cDeltamMove Math.min(cDelta,mMove);
    //    debugPrintln(mMove);
        
    return mMove

    Comment


    • #3
      Alex,

      I meant that the:

      function Min_Move(){ returns a series and min() is used within it to calculate the return value.

      Any ideas regarding how to get the tick value?

      Wayne

      Comment


      • #4
        waynecd
        The call to the function Min_Move does not create a series but a value. In fact you are not able to retrieve the value returned by it using the getValue() method
        You can use the getMinTick() function (see the EFS KnowledgeBase for the description of the function)
        Alex


        Originally posted by waynecd
        Alex,

        I meant that the:

        function Min_Move(){ returns a series and min() is used within it to calculate the return value.

        Any ideas regarding how to get the tick value?

        Wayne

        Comment

        Working...
        X