Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Get price at specified date

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

    Get price at specified date

    Hello,

    I need to store a close at a specified date (I use as input value)
    How could I do it?

    Let' say my input is: 20160808, I'm trying something like;

    if (ToDay(Time[0]) = input)
    RS.Set(Close[0]));

    but I doesn't work.

    Any hint?

    Thank very much.

    #2
    Hello MAX,

    Thanks for your post.

    I've created an example indicator that when applied to daily bars, will allow you to select in the indicator panel, a particular day to retrieve the close value of. The code will show you the elements of getting a date into Ninjascript and then using it to test against a day bar and when found to print the close value of that bar.

    Once the indicator is added to a daily bar chart, open the indicator panel and left click on the row "Search" to bring up a calendar tool that you can then use to select a date. The indicator will print to the output window (Tools>outputwindow) the close value of that day bar (assuming that day is on the chart).

    To Import
    1. Download the attached file to your desktop
    2. From the Control Center window select the menu File > Utilities > Import NinjaScript
    3. Select the downloaded file
    Attached Files

    Comment


      #3
      Thanks Paul.

      This was exactly what I was looking for.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      558 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      545 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X