Announcement

Collapse
No announcement yet.

Current bar timer

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

  • Current bar timer

    Is there an EFS, or could someone help me in constructing one that would give a visual of the time required to form a bar on a tick or volume chart..

    Let me explain..I trade the YM on a 133T chart and have found that if it takes LONGER than 1:45 to form a bar that the trade's success rate is really decreased.

    What I would like to see is this:

    1. As soon as the bar starts printing the timer would start with a box that is lime.

    2. When the time reaches 1:30, this box would then change to Yellow.

    3. When the time reaches 1:45 the box turns Red.

    4. Possible audio alert at 1:45 also, but not requirement.

    This efs would in fact help every tick/volume chart trader in choppy or slow markets keeping one out of trades when the volume is low.

    Currently I am using Woodies CCI efs, which has a bar timer, but appears that it is PRIOR bar.

    Can anyone help me?

    Racer



  • #2
    Racer
    Try the attached efs. This is a modification of RemainingBarTime.efs which was originally programmed by JasonK.
    It now computes the time elapsed from the beginning of the bar and if that time is less than 1 min 30 secs it colors the numbers in green, if between 1:30 and 1:45 in yellow and above 1:45 in red
    Alex

    Attached Files

    Comment


    • #3
      Alex..As always you are the BEST!!

      Thanks..Exactly what I wanted..

      Racer

      Comment


      • #4
        I looked at the code and could not determine why the numerals turned green after 10:10 or so

        May not be an issue, but thought it was interesting.

        Comment


        • #5
          David
          I believe it is happening because these statements in lines 34-35
          if (vMin < 10) vMin = ("0" + vMin);
          if (vSec < 10) vSec = ("0" + vSec);

          convert the numbers to strings only when they are less than 10. If both vMin and vSec are greater than 10 then they are considered numbers hence vMin+vSec becomes an arithmetic operation instead of two strings concatenated
          To fix this add the following after line 37
          vMin = vMin+"";
          vSec = vSec+"";

          At this point vMin and vSec are always strings
          Alex

          Comment


          • #6
            The attached revision of the efs fixes the issue reported by David albeit with a different solution than the one I originally suggested (see lines 34-35) and corrects the study title.
            Alex
            Attached Files

            Comment

            Working...
            X