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 TradeSaber, Today, 07:18 AM
    0 responses
    4 views
    0 likes
    Last Post TradeSaber  
    Started by PaulMohn, Today, 05:00 AM
    0 responses
    9 views
    0 likes
    Last Post PaulMohn  
    Started by ZenCortexAuCost, Today, 04:24 AM
    0 responses
    6 views
    0 likes
    Last Post ZenCortexAuCost  
    Started by ZenCortexAuCost, Today, 04:22 AM
    0 responses
    3 views
    0 likes
    Last Post ZenCortexAuCost  
    Started by SantoshXX, Today, 03:09 AM
    0 responses
    17 views
    0 likes
    Last Post SantoshXX  
    Working...
    X