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 CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    14 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    119 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    172 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    89 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    131 views
    0 likes
    Last Post cmoran13  
    Working...
    X