Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks Paul.

      This was exactly what I was looking for.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by WHICKED, Today, 12:56 PM
      2 responses
      13 views
      0 likes
      Last Post WHICKED
      by WHICKED
       
      Started by Felix Reichert, Today, 02:12 PM
      0 responses
      1 view
      0 likes
      Last Post Felix Reichert  
      Started by Tim-c, Today, 02:10 PM
      0 responses
      1 view
      0 likes
      Last Post Tim-c
      by Tim-c
       
      Started by cre8able, Today, 01:16 PM
      2 responses
      9 views
      0 likes
      Last Post cre8able  
      Started by chbruno, 04-24-2024, 04:10 PM
      3 responses
      48 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Working...
      X