Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Drawing a line from a certain time to current

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

    #31
    Patrick,

    my PC is set to GMT Coordinated Universal Time and I have "time nist.gov" and this also in the session manager for my 24/5.

    Best
    Tony


    Originally posted by NinjaTrader_PatrickH View Post
    Hello Tony,

    Thank you for your response.

    I do not see the same behavior on my end.

    What time zone is your PC set to? And what region?

    I look forward to your response.

    Comment


      #32
      Hello Tony,

      Thank you for your response.

      I cannot recreate this item on my end, even with GMT Coordinated Universal Time set on my PC.

      If you right click in your EURUSD chart and select Reload All Historical Data, do you see the lines correctly?

      I do not see the 4th of May on my charts for the EURUSD, who do you connect to for your Forex Data?

      I look forward to your response.
      Last edited by NinjaTrader_PatrickH; 05-16-2013, 10:34 AM.

      Comment


        #33
        Patrick,

        thank you for your reply.

        When I try not it works also with me. This might be depending from dataloading somehow.

        But - as I asked you several times - in your code the lines DO NOT start at the price at the time 22:00 the days before. You can see in all screenshots.

        What one has to change to start the lines there? And how to change to have it starting at 22:00 in all data-series (so not only in minute bars with close, how can this be solved also for range bars, as the close of the range bar will not be exactly that time? With GetCurrentBid (????????) somehow?

        Thanks
        Tony

        Originally posted by NinjaTrader_PatrickH View Post
        Hello Tony,

        Thank you for your response.

        I cannot recreate this item on my end, even with GMT Coordinated Universal Time set on my PC.

        If you right click in your EURUSD chart and select Reload All Historical Data, do you see the lines correctly?

        I do not see the 4th of may on my charts for the EURUSD, who do you connect to for your Forex Data?

        I look forward to your response.

        Comment


          #34
          Originally posted by tonynt View Post
          Patrick,

          thank you for your reply.

          When I try not it works also with me. This might be depending from dataloading somehow.

          But - as I asked you several times - in your code the lines DO NOT start at the price at the time 22:00 the days before. You can see in all screenshots.

          What one has to change to start the lines there? And how to change to have it starting at 22:00 in all data-series (so not only in minute bars with close, how can this be solved also for range bars, as the close of the range bar will not be exactly that time? With GetCurrentBid (????????) somehow?

          Thanks
          Tony
          You cannot use data that does not exist. On a RangeBar chart, you are unlikely to get any bar hit any specified exact time. Given no other gate, the only thing that can logically be done is to then process the first bar that exceeds the specified time. In this particular instance, you could specify your code to start drawing from either the last bar before the specified time, or the first bar after the specified time.

          Comment


            #35
            Hello Tony,

            Thank you for your response.

            My code draws the line from the previous day at 22:00 to the current day at 14:00, if this is not what you want then please provide specifics on what you are looking for.

            With Range Bars, Koganam provides a good idea here. These are items will need to test out on your side, we do not provide programming services for our clients.

            Comment


              #36
              Patrick,


              my lines also go from previous day at 22:00 to current day at 14:00.

              But the lines do not start at the price at 22:00.

              Please see the attached screenshot. The line is at the price level of 14:00 and not at the price of 22:00 previous day. Yours is at 22:00???


              Best
              Tony

              Originally posted by NinjaTrader_PatrickH View Post
              Hello Tony,

              Thank you for your response.

              My code draws the line from the previous day at 22:00 to the current day at 14:00, if this is not what you want then please provide specifics on what you are looking for.

              With Range Bars, Koganam provides a good idea here. These are items will need to test out on your side, we do not provide programming services for our clients.
              Attached Files

              Comment


                #37
                Hello Tony,

                Thank you for your response.

                Yes, mine do start at 10 PM (see screenshot).

                Can you provide the code you are using?

                I look forward to your response.
                Attached Files

                Comment


                  #38
                  Patrick,

                  mine also at 22:00 as you see in the screenshot.

                  I really don´t know where is the problem in our communication: your line starts at 22:00 - but not at the price of 22:00. I wrote this several times.

                  Your line starts approx. at price of 1648.25 but not at 1653.50 (approx.) which is the price at 22:00.

                  Best
                  Tony


                  Originally posted by NinjaTrader_PatrickH View Post
                  Hello Tony,

                  Thank you for your response.

                  Yes, mine do start at 10 PM (see screenshot).

                  Can you provide the code you are using?

                  I look forward to your response.

                  Comment


                    #39
                    Hello Tony,

                    Thank you for your response.

                    Incorporate what Joydeep had detailed earlier with the barsAgo int open:
                    Code:
                    				int barsAgo = CurrentBar - Bars.GetBar(new DateTime(Time[0].Year, numberMonth[0], numberDay[0], 22, 0, 0)) - 1;
                    
                    				DrawLine("tag" + Time[0].Date.ToString("yyyyMMdd"), false, new DateTime(Time[0].Year, numberMonth[0], numberDay[0], 22, 0, 0), Close[barsAgo], new DateTime(Time[0].Year, Time[0].Month, Time[0].Day, 14, 0, 0), Close[0], Color.Blue, DashStyle.Dash, 2);
                    Please let me know if I may be of further assistance.

                    Comment


                      #40
                      Hello,

                      thank you for your support.

                      It is plotted only the first month. As you can see in the screenshot eg with 70 days dataseries its plotted only in March.

                      Best
                      Tony

                      Originally posted by NinjaTrader_PatrickH View Post
                      Hello Tony,

                      Thank you for your response.

                      Incorporate what Joydeep had detailed earlier with the barsAgo int open:
                      Code:
                                      int barsAgo = CurrentBar - Bars.GetBar(new DateTime(Time[0].Year, numberMonth[0], numberDay[0], 22, 0, 0)) - 1;
                      
                                      DrawLine("tag" + Time[0].Date.ToString("yyyyMMdd"), false, new DateTime(Time[0].Year, numberMonth[0], numberDay[0], 22, 0, 0), Close[barsAgo], new DateTime(Time[0].Year, Time[0].Month, Time[0].Day, 14, 0, 0), Close[0], Color.Blue, DashStyle.Dash, 2);
                      Please let me know if I may be of further assistance.
                      Attached Files
                      Last edited by tonynt; 05-19-2013, 02:01 PM.

                      Comment


                        #41
                        Hello Tony,

                        Thank you for your patience.

                        Can you provide the code you are using?

                        I look forward to your response.

                        Comment


                          #42
                          Hello Patrick,

                          thank you for your response.

                          Now it is plotted the month before AND the current month. I have to check out when it occurs that it is plotted only the month before. This must be somehow in concern with dataloading (new chart or changing dataseries.............).


                          But I do attach a screenshot please where you can see that on Mondays the line is not correct. It is not at 22:00 (which is a certain exchange close). I have drawn an arrow where the line should be. You can see the wrong dashed line above.

                          Thank you for your support!

                          Best
                          Tony



                          Originally posted by NinjaTrader_PatrickH View Post
                          Hello Tony,

                          Thank you for your patience.

                          Can you provide the code you are using?

                          I look forward to your response.
                          Attached Files

                          Comment


                            #43
                            Hello Tony,

                            Thank you for your response.

                            So I can test this matter on my end and investigate further can you provide the code your are using?

                            You can send the indicator to support[at]ninjatrader[dot]com with 'ATTN: Patrick - 671994' in the subject line if you prefer.

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by judysamnt7, 03-13-2023, 09:11 AM
                            4 responses
                            59 views
                            0 likes
                            Last Post DynamicTest  
                            Started by ScottWalsh, Today, 06:52 PM
                            4 responses
                            36 views
                            0 likes
                            Last Post ScottWalsh  
                            Started by olisav57, Today, 07:39 PM
                            0 responses
                            7 views
                            0 likes
                            Last Post olisav57  
                            Started by trilliantrader, Today, 03:01 PM
                            2 responses
                            21 views
                            0 likes
                            Last Post helpwanted  
                            Started by cre8able, Today, 07:24 PM
                            0 responses
                            10 views
                            0 likes
                            Last Post cre8able  
                            Working...
                            X