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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    156 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    90 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    138 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    130 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    107 views
    0 likes
    Last Post CarlTrading  
    Working...
    X