Announcement

Collapse
No announcement yet.

Limiting Bars in EFS

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

  • Limiting Bars in EFS

    Is there some way to limit the number of bars in a study? In a TICK chart I am getting over 100,000 calls. I only need the last 200 or so bars to be calculated.

    I already tried creating a limited Time Template. It doesn't work with the Advanced Tick Chart.

    I'm just plotting a simple histogram of volume:

    var vVolLast = 0;

    function main() {
    var vVol = volume();

    if (close() < close(-1)) {
    vVol *= -1;
    setBarFgColor(Color.RGB(255,173,91), 0); // light orange
    } else if (close() == close(-1)) {
    if (vVolLast < 0) {
    vVol *= -1;
    setBarFgColor(Color.RGB(255,173,91), 0); // light orange
    }
    }

    vVolLast = vVol;

    return vVol;
    }



    Thanks

  • #2
    It's easily done. Please see this thread:-

    http://forum.esignalcentral.com/show...&threadid=5566

    Robert

    Comment


    • #3
      Thanks, that helped. Time cut by 55% (961ms vs 2135 ms).

      However, I'm still looking for more speed. I think the problem lies in the Advanced Tick Chart. There doesn't seem to be any way to limit the number of bars being retrieved. It works very well on standard interval charts.

      I attached the efs if you would like to use it.

      Comment


      • #4
        As you can imagine working with any indicator on tick data is computer intensive. So you need a fast system in all regards (cpu, memory, graphics, disk access, internet connection) just to ensure that you have the best possible tool to compute and display data. If any of these are more than 18 months old then you should consider upgrading/replacing. Also you should know that in version 7.5 intraday data has now increased to 6 months from the previous 60 days so you are getting 3 times as much data as before.

        Another trick to reduce all bars being displayed ie cutting off the price series itself is as follows:-

        Right Click the Chart or Select 'Chart Options' from menu.
        Choose 'Time Templates'
        Then 'Edit'

        Click 'New Template'
        Give it a name say 'Tick' then click 'OK'
        Select Template Items Type as 'Intraday Default'
        Select Radio button 'Bars'
        Enter the amount of bars you want displayed say '30000'
        Click 'Update/Add'

        Another option for restricting the bars, is to set the times of display so if you work with 24 hour futures data and do not want overnight/premarket data then you can restrict this also.

        You have now created a time template that you can select from within your chart by right clicking and then selecting it from 'Time Templates' You can even make this a default if you want.

        Robert

        Comment


        • #5
          Forget what I described before. I agree that tick data cannot be restricted, it only worked for me once! I believe that it must be a bug so either wait for an eSignal support person to answer here or send eSignal Support an email asking them about a resolution to this problem.

          robert

          Comment


          • #7
            Gavishti
            While Time Templates cannot control the Start/End hours for tick based charts (those with T, P, V, or S in the interval) they do control the number of days plotted.
            Right click the chart, select Time Templates->Edit and in the template that chart is using add a User Defined interval for T (or P, V, S) and assign the number of days to be loaded.
            Alex

            Comment


            • #8
              I have sent a suggestion to eSignal regarding limiting the number of bars. Suggestion included being able to do it with code and fixing the Time Template.

              I've made some more code changes and am now down to 751ms. I have a few ideas to cut that time a little more.


              Alex,

              I know what T (tick) and S (second) are, however I have never heard of V and P. A search of the Help file was of no help. Please tell me what these two intervals are.

              Thanks.


              From the looks of the thread, the Attach File section doesn't work.

              Comment


              • #9
                Gavishti
                V is for Volume-bars (ie based on number of shares/contracts traded) and P is Price Change-bars.
                Alex

                Comment


                • #10
                  Thanks Alex for the V and P explanations.

                  I tried several different experiments with Time Templates and came to the conclusion that it doesn't make any difference what you put in for Tick Charts. Tick Charts ignore Time Templates. Seems to me that I read on one of the threads rcameron supplied that the problem is at the server. You get the same amount of data regardless.

                  Attached (hopefully) is the EFS running as fast as I can make it. I experimented with using getValue() thinking that close() was a wrapper. From what I can tell from the Performance Monitor that is not the case. close() seems to be faster than getValue().
                  Attached Files

                  Comment


                  • #11
                    Isn't it also possible to simply limit the number of tick bars that are looked to draw the indicator/label?

                    I have seen several postings for other efs formulas where this was done.

                    EZ

                    Comment


                    • #12
                      Already did that. See postings below for a discussion of the limitations of Tick charts.

                      Comment

                      Working...
                      X