Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Grabbing a value from yesterday and making it constant

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

    Grabbing a value from yesterday and making it constant

    I have a value that plots at the time of 235900, ie. 11:59 pm, lets say the value 1250 and it is part of a plot.

    How do I get 1250 to plot on each bar from 240000 thru 180000. ie. 12:01 am to 6:00 pm the next day.

    any ideas?
    Last edited by velocity; 01-29-2010, 07:14 PM.

    #2
    Hello,

    What part of it are you having issues with? The plot on each bar part or the time filter to do it?
    If it is the time filter, see this link for example time filter ideas:


    Post part of your code and tell us where you are getting stuck.
    DenNinjaTrader Customer Service

    Comment


      #3
      The time is not the problem. I can get the value at lets say 235900, but how do I take that value and plot it as a constant value from 93000. 9:30am EST to 161500, 4:15 pm the next day.

      thanks

      Comment


        #4
        Hello,

        This printed out the int time for me. Does that help:

        int tst;

        tst = ToTime(Time[
        0]);

        Print(tst);
        DenNinjaTrader Customer Service

        Comment


          #5
          thank you for responding, however, I am not looking for the int of the time.

          Instead, at 235900, the bar closes and lets say the price is 1250.00

          the next day starts at 240100

          I want to plot a constant horizontal line beginning at 093000 and ending at 161500 at the price of 1250.00

          Problem is, I don't know how to grab the prior days value at precisely 235900 of 1250 and set it in a plot for 093000 to 161500.

          any thoughts?

          Comment


            #6
            Hello,

            I will have someone reply to you on Monday. Thank you for your patience.
            DenNinjaTrader Customer Service

            Comment


              #7
              Maybe something like this

              Code:
              if (ToTime(Time[0]) == 235900) {double price = Close[0];}
              
              if (ToTime(Time[0]) >= 93000 && ToTime(Time[0])) <= 161500) Plot.Set(price);

              Comment


                #8
                Thanks, I look to see if that solves the problem

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                637 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                366 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                107 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                569 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                571 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X