Announcement

Collapse
No announcement yet.

Time Templates for inv()

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

  • Time Templates for inv()

    The interval defined by inv() is affected by the time template of the chart it is plotted on.

    How then, if at all possible, can I get a tick chart moving average (MA) on to a 3 minute chart that has a regular trading hours (RTH)template.

    for example:

    When plotting a MA for a 512T chart on a 3 min chart with a RTH time template, how do I get it to plot the 512T chart MA with the values it would have on the 512T chart?

    Thanks in advance.

  • #2
    Hi waynecd,

    I tried to put a 5minutes 20MA & 512tick 20MA on a 3minutes chart and it worked with both 24Hours & RTH Time Templates.

    Code:
    function preMain() {
    	setPriceStudy(true);
    	setStudyTitle("Test01")
    	setCursorLabelName("5Min", 0);
    	setDefaultBarFgColor(Color.RGB(0,0,0), 0);
    	setDefaultBarThickness(2, 0);
    	setCursorLabelName("Tick", 1);
    	setDefaultBarFgColor(Color.RGB(255,173,91), 1);
    	setDefaultBarThickness(3, 1);
    }
    var MA01;
    var MA02;
    function main() {
    MA01 = sma(20, inv("5"));
    MA02 = sma(20, inv("512t"));
    return new Array(MA01,MA02);
    }
    Attached Files

    Comment


    • #3
      Thanks for the post.

      On my eSignal if the 3 minute chart time template is set to 9:30 - 16:15 EST and I apply a 21 ema inv(512T) to it, the 21 ema plots differently than a regular 21 ema on the 512T chart.

      However, if the 3 minute chart time template is set to intraday default, the 21 ema inv(512T) plots just like on the 512T chart.

      So, the comparison is not between two different 3 min charts with different timeframes but between a 3 min 9:30-16:15 EST chart and a 512T chart using the same moving average for the 512T chart.

      Is this what you are seeing?
      Last edited by waynecd; 04-10-2008, 04:44 AM.

      Comment


      • #4
        If I understood correctly, You want to see the exact MA that you see on the 24Hours TICK chart on your "DaySession" 3minutes chart.

        Once I wanted to solve a similar issue, I wanted to see a 24Hours Indicator on a DaySession chart, So instead of switching the time template to DaySession (which will interrupt the indicator calculation) I stayed with the 24Hours TimeTemplate but switch the symbol to DaySession symbol.

        So you need to add a symbol to the indicator, like that:
        Code:
        MA01 = sma(20, sym("ES #F","5"));
        MA02 = sma(20, sym("ES #F","512t"));
        Now stay with the 24Hours TimeTemplate but change the symbol to ES #F=2.

        This is worked for me once. But now I see that there's a problem with TICK calculation.
        Attached Files

        Comment


        • #5
          -

          The initial issue posted by Wayne is related to the 10.1 beta. Please see this thread in the beta forum.

          ser-E, if you still think there is a problem with tick calculation, please explain further. Also let me know what build you are using.
          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


          • #6
            Hi Jason. How about specifiying a time interval when constructing a study on an internally passed value on a one tick chart. For example:

            function main(){
            myVar1 = efsInternal(“Calc”);
            myVarMa = sma(10, myvar1, inv(“15s”));
            return myVarMa;
            }

            function Calc(){
            myVar = whatever;
            return myVar;
            }

            I can’t seem to get this to work. Wrong format or not possible? Thanks.

            Mike

            Comment


            • #7
              Mike
              If you want myVarMa to be calculated in the context of the 15 seconds interval then the syntax is incorrect and should be either
              myVar1 = efsInternal("Calc", inv("15s"));
              myVarMa = sma(10, myVar1);

              or
              myVarMa = sma(10, efsInternal("Calc", inv("15s")));
              Alex


              Originally posted by mikejhelms
              Hi Jason. How about specifiying a time interval when constructing a study on an internally passed value on a one tick chart. For example:

              function main(){
              myVar1 = efsInternal(“Calc”);
              myVarMa = sma(10, myvar1, inv(“15s”));
              return myVarMa;
              }

              function Calc(){
              myVar = whatever;
              return myVar;
              }

              I can’t seem to get this to work. Wrong format or not possible? Thanks.

              Mike

              Comment


              • #8
                Thanks Alex. I'll give it a try.

                Mike

                Comment


                • #9
                  Mike
                  You are welcome
                  Alex


                  Originally posted by mikejhelms
                  Thanks Alex. I'll give it a try.

                  Mike

                  Comment

                  Working...
                  X