Announcement

Collapse
No announcement yet.

Time Overlay

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

  • Time Overlay

    Attached is an example of a 4 and 2 minute chart. The following code is from Alex and overlays a user defined set of lines and times to fill in between the default times. In the case of the 2 minute chart, there are the correct number of dots indicating the time between the default times for the overlay to correctly place the incremental time lines. In the 4 minute chart there are not the correct number and the times appear to be incorrectly plotted and there are skips. How should this be corrected and what is The logic to be used when selecting various chart times (2,4) and various increments (5,10,30) to fill in between? Is the number of intermediate dots controllable?

    Thank you for your assistance.

    Best Regards,

    Alan
    Attached Files

  • #2
    Alan
    On a 4 minute chart you cannot have the lines every 10 minutes because 10 is not evenly divisible by 4. The lowest common multiple of 4 and 10 is 20 which is why the lines are drawn every 20 minutes (ie every 5 bars assuming there is a bar that has the appropriate timestamp).
    So if your Time Template sets the chart to begin at 9:30 (or equivalent if in different time zone) the lines will be drawn at the xx:50, xx:10 and xx:30 minute bars. If for example you set the Time Template to start at 9:00 then the lines will be drawn on the xx:20, xx:40 and xx:00 bars.
    10 is instead evenly divided by 2 which is why you see the lines every 10 minutes.
    Alex

    Comment


    • #3
      Time Increments

      Alex,

      In the original example of the 4 minute chart, there are 7 default increments between the default 30 minute marks. This would equate to a 4.286 time span between dots. Does the EFS have to have even multiples as shown in your reply to preform correctly? I have tried time increments of 12 and 12.857 and neither plot while even increments as in your example do plot.

      Best Regards,

      Alan

      Comment


      • #4
        Alan
        It does require evenly divided increments.
        As an aside notice that on a 4 min chart there is no bar that is time stamped xx:00 if the Time Template is set to Start/End 9:30-16:00 (or equivalent). The efs has no way to anchor a line to a non existant bar.
        Alex

        Comment


        • #5
          Alex,

          Thank you for the assistance.

          Best Regards,

          Alan

          Comment


          • #6
            Time Overlay

            Alex,

            What causes the wash out of the labels and minute indicators in the bottom chart?

            Best Regards,

            Alan
            Attached Files

            Comment


            • #7
              Alan
              Are you running another efs in overlay? Is it painting the background? Other than that I would not know as I cannot replicate what you are showing.
              Alex

              Comment


              • #8
                Time Overlay

                Alex,

                I reviewed the code and you are correct. There was a section painting the background. Also the drawText command was limiting the line drawing to -20. When extended to -200, the lines and the times and the dots indicating minutes all plot correctly.

                Thank you for the assistance.

                Best Regards,

                Alan

                Comment

                Working...
                X