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 pechtri, 06-22-2023, 02:31 AM
    10 responses
    124 views
    0 likes
    Last Post Leeroy_Jenkins  
    Started by judysamnt7, 03-13-2023, 09:11 AM
    4 responses
    59 views
    0 likes
    Last Post DynamicTest  
    Started by ScottWalsh, Yesterday, 06:52 PM
    4 responses
    36 views
    0 likes
    Last Post ScottWalsh  
    Started by olisav57, Yesterday, 07:39 PM
    0 responses
    7 views
    0 likes
    Last Post olisav57  
    Started by trilliantrader, Yesterday, 03:01 PM
    2 responses
    22 views
    0 likes
    Last Post helpwanted  
    Working...
    X