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 aussugardefender, Today, 01:07 AM
    0 responses
    3 views
    0 likes
    Last Post aussugardefender  
    Started by pvincent, 06-23-2022, 12:53 PM
    14 responses
    238 views
    0 likes
    Last Post Nyman
    by Nyman
     
    Started by TraderG23, 12-08-2023, 07:56 AM
    9 responses
    384 views
    1 like
    Last Post Gavini
    by Gavini
     
    Started by oviejo, Today, 12:28 AM
    0 responses
    4 views
    0 likes
    Last Post oviejo
    by oviejo
     
    Started by pechtri, 06-22-2023, 02:31 AM
    10 responses
    125 views
    0 likes
    Last Post Leeroy_Jenkins  
    Working...
    X