Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trade by time

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

    Trade by time

    Hi NT,

    I would like to create a strategy that looks at bar time and decide to trade (pls note this looks at Renko Bars)

    i.e.

    IF Close1 was formed less than 55 seconds from Close0 -- then ACTION (BUY/SELL).

    Is this possible in the strategy building on board the platform?

    Cheers,

    Z

    #2
    Hello Zhorny,

    Thank you for your inquiry.

    This would involve custom programming and you would not be able to do it in the Strategy Wizard.

    Here's an example of what you could do:
    Code:
    System.TimeSpan difference = Time[0] - Time[1];
    double seconds = difference.TotalSeconds;
    
    if (seconds < 55)
         {
              // logic
         }
    For more information on Time, please take a look at the NinjaTrader help guide at this link: http://ninjatrader.com/support/helpGuides/nt7/?time.htm

    For more information about the C# DateTime structure, please take a look at this link: https://msdn.microsoft.com/en-us/lib....datetime.aspx

    For more information about using TimeSpan, please take a look at this link: https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx

    Please, let us know if we may be of further assistance.
    Zachary G.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    64 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    41 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    22 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    25 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    52 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X