Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Tracking time

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

    Tracking time

    I am looking to execute a trade after X amount of time where the high has not been compromised. The idea is check the closing price every minute and compare it to the previous price(high in this case) and if after X time the high has not been overwritten, then begin the trade. I have been looking for a method, but am not finding one. Do people here use C# DateTime structure to track lapsed time ?
    Last edited by asdfasdf; 04-07-2015, 09:09 AM.

    #2
    Hello asdfasdf,

    Thank you for your note.

    Yes you can use DateTime objects and other C# code in NinjaScript which is written in C#.

    Each bar also has a timestamp that is a DateTime object.

    This can be accessed with Time[int bars ago].

    Below is a link to the help guide on Time.
    http://www.ninjatrader.com/support/h...s/nt7/time.htm


    Also, if you are running on a 1 minute chart, each bar will close after 1 minute.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    638 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
    572 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X