Announcement

Collapse
No announcement yet.

... while the following will only happen the FIRST time:

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

  • ... while the following will only happen the FIRST time:

    How does EFS process the data as the chart is displayed? Does it start with today and work backwards (input into the efs is from most current to oldest) or does it start with the oldest day and work forward (input into the efs is from oldest data to most current)?

    In other words, is the input data sorted ascending by date/time or descending by date/time? Or . . . by coding an action that only happens the First time, that action is on the 'oldest' candle. So I have to scroll back in time to see the action. Correct?

    If so, is there a way to have the action occur only on the LAST time (which would be on the current data that is displayed on the chart) i.e. today's candle?

    Thank you.

  • #2
    Re: ... while the following will only happen the FIRST time:

    pjkowalski
    Starting from the oldest bar an efs will execute once on each historical bar as it loads on the chart and then once on every tick on the current (ie real time) bar unless the script is specifically set to compute on Close only.
    "... while the following will only happen the FIRST time:" simply means that the commands will be executed one time only the first time the condition that triggers them will be true. This can happen on any historical bar or in real time on the most current bar. It simply sets a flag that indicates that the commands have been executed. This flag will then need to be reset if you want these commands to be executed the first time of every other time the condition is true
    Alex


    Originally posted by pjkowalski
    How does EFS process the data as the chart is displayed? Does it start with today and work backwards (input into the efs is from most current to oldest) or does it start with the oldest day and work forward (input into the efs is from oldest data to most current)?

    In other words, is the input data sorted ascending by date/time or descending by date/time? Or . . . by coding an action that only happens the First time, that action is on the 'oldest' candle. So I have to scroll back in time to see the action. Correct?

    If so, is there a way to have the action occur only on the LAST time (which would be on the current data that is displayed on the chart) i.e. today's candle?

    Thank you.

    Comment


    • #3
      Thank you for the information.

      Is there a way to have the action occur only on the LAST time? I want to indicate which period is, say, 8 periods ago? I know how to draw shapes and lines but I don't know how to count back X number of days from today's current daily candle.

      Today is May 2 so I want to identify the candle 8 trading days ago, which would be April 23. (I also posted this on the EFS Studies forum).
      Thanks, Phil

      Comment


      • #4
        Phil
        If the value you want to retrieve is from a series then you can simply call it by using the appropriate bar index. The bar index is 0 for the current bar, -1 for the previous bar, -2 for two bars back etc so if for example you want to retrieve the Close for n bars back you would use close(-n)
        Alex

        PS. I notice that you asked this same question also in another thread. As suggested in the eSignal Central Forums Etiquette, Rules & Guidelines please try to avoid duplicating posts in multiple threads or forums


        Originally posted by pjkowalski
        Thank you for the information.

        Is there a way to have the action occur only on the LAST time? I want to indicate which period is, say, 8 periods ago? I know how to draw shapes and lines but I don't know how to count back X number of days from today's current daily candle.

        Today is May 2 so I want to identify the candle 8 trading days ago, which would be April 23. (I also posted this on the EFS Studies forum).
        Thanks, Phil

        Comment


        • #5
          Alex - my sincerest apology for violating forum etiquette. I asure you it won't happen again. (Junior member mistake.)

          I understand how to use the relative offset to obtain the information from X number of days ago.

          But my question is still this: Is there a way to have the action occur only on the LAST time?

          After I am done backtesting my formula, I only want to see the most recent occurrence. The forumul wizard gives the capability to only show the First time. I'd like my action to only happen the Last time.

          Thank you.

          Comment


          • #6
            Phil
            I am not sure I understand what you mean with "the last time". You may want to provide a specific example (preferably including the code or attaching the efs) that illustrates what you are trying to accomplish
            Alex


            Originally posted by pjkowalski
            Alex - my sincerest apology for violating forum etiquette. I asure you it won't happen again. (Junior member mistake.)

            I understand how to use the relative offset to obtain the information from X number of days ago.

            But my question is still this: Is there a way to have the action occur only on the LAST time?

            After I am done backtesting my formula, I only want to see the most recent occurrence. The forumul wizard gives the capability to only show the First time. I'd like my action to only happen the Last time.

            Thank you.

            Comment

            Working...
            X