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 sjsj2732, Yesterday, 04:31 AM
      0 responses
      27 views
      0 likes
      Last Post sjsj2732  
      Started by NullPointStrategies, 03-13-2026, 05:17 AM
      0 responses
      284 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      280 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      132 views
      1 like
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      90 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Working...
      X