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 gentlebenthebear, Today, 01:30 AM
      2 responses
      13 views
      0 likes
      Last Post gentlebenthebear  
      Started by Kaledus, Today, 01:29 PM
      2 responses
      8 views
      0 likes
      Last Post Kaledus
      by Kaledus
       
      Started by frankthearm, Yesterday, 09:08 AM
      13 responses
      45 views
      0 likes
      Last Post frankthearm  
      Started by PaulMohn, Today, 12:36 PM
      2 responses
      16 views
      0 likes
      Last Post PaulMohn  
      Started by Conceptzx, 10-11-2022, 06:38 AM
      2 responses
      56 views
      0 likes
      Last Post PhillT
      by PhillT
       
      Working...
      X