Announcement

Collapse
No announcement yet.

measuring ticks in a tick chart

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

  • measuring ticks in a tick chart

    is the only way to determine how many ticks have occured in a tick chart, to count the number of calls to main in the function?

    e.g. I have a 600 tick chart and want to know how many ticks have occured. Will I get 600 calls to my main on this chart by the time the bar completes? Is there another function that returns the number of ticks so far?

    Thanks,
    Bernie

  • #2
    Re: Reply to post 'measuring ticks in a tick chart'

    I think volume() returns the number of ticks so far on a 600T chart

    >

    Comment


    • #3
      I think what Bernie is looking for is a "Ticks in Bar" value; which I've been unable to figure out as well.
      Any ideas about that?
      I know it's shown in the cursor window so eSignal has the data somewhere.

      Comment


      • #4
        getting the number of ticks per bar

        I do not think there is a built in function to give you this information (I thought a 600 tick chart would draw a bar every 600 ticks), however, depending on how you wrote your efs, there are a number of methods to obtain this info depending on the complexity of your efs. If you had a complex efs or several efs's running at different time periods, you could have a separate efs posting the number of ticks to a global variable and then you could query this global variable every bar and determine the difference.

        If you had a simple efs, I would recommend coding the functionality within the efs.

        The main function is called every tick, so if you put a counter after main, you can arrive at a solution.

        There are a number of people on the board who have knowledge in this area. If you need more help, post another request, either myself or more knowledgable board members will surely help out.

        Comment


        • #5
          Thanks Steve.

          You're right, all completed bars on a 600T chart have 600 ticks in them. But the current bar in progress is issue at hand.
          Your suggestion is probably a 90+% answer (outside of the fact that eSignal already has this value computed and in memory, so why shouldn't it be available).

          The problem lies in 2 places from what I can tell.
          1) when you open up a new chart the count will be unreliable until the current bar completes, as any bar in progress at the time a new chart is started would have anywhere from 1 to 599 ticks in it but our code wouldn't know the exact count. once that bar completes then it would be accurate from that point forward.
          2) As slow as EFS is, is it more resource efficient to do that counting in the EFS code or is it more efficient to make a call back to eSignal for the (accurate) tally?

          It's always the simple things that are the hardest, eh?

          Dale

          Comment


          • #6
            well. thanks everyone. Having been a software deleloper and past owner of a software company, this mod doesn't look like it's very difficult (probably add a new keyword (ticks()?) to a few tables, and add a few lines to retrieve value)

            The study I have needs to know how 'far' we are into the tick bar to make some alerts. I will count the ticks that come in but I fear that the efs won't get called for every tick so that by the time the bar completes, I will not have been called 600 times. Since it's a trigger method for what I do, it needs to be accurate.

            Bernie

            Comment


            • #7
              Re: Reply to post 'measuring ticks in a tick chart'

              Bernie

              Doesn't volume() return the current tick count? It may not go 1,2
              ,3,4,5,... but it does keep score, I thought.

              Comment


              • #8
                Re: Reply to post 'measuring ticks in a tick chart'

                Bernie

                See if this helps you count ticks in bar - I call them tib in this efs.

                var tib=0;
                var alert=0;
                var beep;
                var intTime = getInterval();
                var intTimelen = intTime.length;
                var tick = intTime.charAt(intTimelen-1);
                var realInt= intTime.substr(0,intTimelen-1);
                var ok=0;

                function preMain(){
                setPriceStudy(false);
                setCursorLabelName("TIB Count");
                setPlotType(PLOTTYPE_HISTOGRAM);
                setDefaultBarFgColor(Color.white);
                if(tick!="T")
                return;
                }

                function main(pct, beep){

                if(pct==null)pct=80;
                if(beep==null)beep=1;

                if(getBarState()==BARSTATE_NEWBAR){ tib=0; alert=0; }

                if(tib>=realInt*pct/100 && alert!= 1){
                if(beep==1) Alert.playSound("C:\\Program
                Files\\eSignal\\Sounds\\Ding.wav")
                debugPrintln(tib+" Ticks >= "+pct+"% of "+realInt+"T");
                alert=1;
                }
                tib=tib+1;

                if(getCurrentBarIndex()!=0)tib=600;
                return tib;
                }
                ----- Original Message -----
                From: <[email protected]>
                To: <[email protected]>
                Sent: Monday, December 15, 2003 9:36 AM
                Subject: Reply to post 'measuring ticks in a tick chart'


                > Hello dloomis,
                >
                > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                >

                Comment


                • #9
                  using futures as an example, volume is the total number of contracts traded. Ticks are the number of transactions that occured which is smaller than volume.

                  Now perhaps, esignal has made the 'volume' function to return ticks if in a tick chart but I don't know. If they did, it would then raise the question of how to obtain the actual volume in a tick chart.

                  Bernie

                  Comment


                  • #10
                    Generally volume() returns the contracts traded on a nnT chart except for pit traded futures and symbols that do not have "trades" [eg forex, indicies, etc] in which case it returns tick volume.
                    A search for volume in the eSignal KnowledgeBase will return several articles on this topic
                    Alex

                    Comment

                    Working...
                    X