Announcement

Collapse
No announcement yet.

EFS2 for Ticki Extemes and the $tick

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

  • EFS2 for Ticki Extemes and the $tick

    I have made an attempt at altering TickiExtreme.efs to handle alternate intervals and symbols, but I have run into some problems with my understanding of how to call high(), low(), etc.

    I would appreciate if you could look at the attached and advise me. Please note lines 85 and 96, either of which may be where the problem lies. I have referred to a number of EFS2 examples on the Board, but don't have the syntax correct.

    Thank you very much. Joe.
    Attached Files

  • #2
    Hello Joe,

    Thank you for posting your code. Here are a few corrections that will help get you going in the right direction. However, after implementing these changes there is a potential logic problem of how the multiple time frame results are displayed. We'll cross that bridge when you get to it.

    1. The correct way to set up the xHigh, xLow and xClose series is as follows.

    PHP Code:
    xHigh  =  high(sym(vSymbol));
    xLow   =   low(sym(vSymbol));
    xClose close(sym(vSymbol)); 
    Because your vSymbol variable becomes a string combination of the symbol and interval you just need to pass that to the sym() function as the only parameter. When you specify the bar index of 0 as the first parameter, you are only requesting a single value rather than creating a Series Object. In response to the getSeries note in your code, using .getValue(0) for establishing your study values, vHigh, vLow and vClose is the correct method.

    2. vNum
    You have removed the logic for this variable, which creates a 'Variable undefined' syntax error. You need to add back the global declaration and its corresponding code logic from the original formula you modified.

    3. Comparison Operators
    You have two if() statements that are using an invalid comparison operator, (i.e. <+ and >+). They should be changed to <= and >=, respectively.


    Implement these changes and then see if the displayed results are what you had in mind.
    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
      Jason, thank you very much for the assistance. I am learning about EFS all the time.

      Your first comment got me just what I wanted! And thanks for pointing out the other errors - I had not intended for you to fix those kinds of things, but thanks very much.

      I am posting a working version. I always appreciate seeing a working copy on the Forum, so maybe other traders will get value from it, the way I have received value from their posts.

      As for your comment about potential display problems, I may be seeing what you mean. I am wanting to run this on an ES 180-tick chart, with the $ticki calculated on 1-min interval. I realize I will be getting multiple highlight $ticki bars when the tick chart prints more than one bar per minute, but that is OK. It is more important to synchronize the highlight bars on the chart, which is working fine.

      But when the tick bars slow down, it looks like sometimes I am missing highlights. So the $ticki efs must be getting its values based on the time stamp of the ES tick bar. Is that the beginning time of the ES bar, or is it the clsong time of that bar? And if the ES bar is longer than 1-minute, then I risk losing a potential $ticki high or low highlight.

      I tried changing the $ticki interval to 2-mins, which catches some of the missing highlights, but it also means back-to-back high and low $ticki signals are missed.

      Is there a way to amalgamate the $ticki data during that longer ES chart bar, and have the highlight logic apply to that, yet still have the 1-minute detail on the faster bars?

      Again, thanks very much for your help. Joe.
      Attached Files

      Comment


      • #4
        Hello Joe,

        I think you have a pretty good understanding of the display issue. The problem you are dealing with is that intervals of different types such as tick vs minute cannot be uniformly synchronized as you are observing. The time stamps of the bars represent the start time of the bars. Multiple time frame studies are synchronized by these time stamps. Because the amount of time covered for each bar in a 180T chart varies, there really is no logical way to synchronize to an external time frame that has equidistant time intervals.
        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