Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can NinjaTrader execute strategy code regularly without trade happening?

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

    Can NinjaTrader execute strategy code regularly without trade happening?

    I have never used NinjaTrader before, but I am considering to switch from Tradestation.

    From my experience using Tradestation, when applying strategy to a chart, they execute strategy code when:
    a. trade happens to the main datastream (tick based) or
    b. an interval bar closes and there is trade happen to the main datastream during the bar.

    If data #1 of the chart does not have trade happen during the bar interval, then strategy code is not run at all.

    For example, if I apply my strategy to 1-minute chart and no trade happens for 10 minutes, then the strategy code is not executed at all during the 10 minutes.

    I am looking for some trading software that can execute strategy code regularly(like every 15 seconds) regardless whether there is trade happen.

    Another 2 alternative solutions are:
    1. Software can execute strategy code when data#2 ticks.
    2. Software can generate order for data#2
    then I can use another actively-traded instrument as second datastream to solve this issue.

    Can NinjaTrade achieve this?

    Thanks for help.

    #2
    Hello bourbonnais,

    Welcome to the NinjaTrader forums!

    Yes, we function similarly. The equivalent NinjaTrader setting is CalculateOnBarClose to determine whether orders are submitted tick by tick or the next bar following a condition.


    Running a Strategy at the Close of a Bar or Tick by Tick
    • During backtest, strategies can ONLY be processed at the close of each bar
    • During real-time operation, you have a choice to run a strategy tick by tick (CalculateOnBarClose set to false) which can produce different results. This is because you can have a signal that executes an order at the close of a bar but when running tick by tick, while in a bar a signal condition can be true although its false at the close of the same bar.
    However, you do not have to tie conditions for entry to bar objects. You're free to use C# language to specify other conditions. The following reference sample discusses creating custom events to create a level II book, but the same principles can be used for trade entry:


    Your other approach should work for you as well. You can monitor for conditions on one series and submit orders on another. This help guide article can help with implementing a multseries strategy.
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Brevo, Today, 01:45 AM
    0 responses
    3 views
    0 likes
    Last Post Brevo
    by Brevo
     
    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
    240 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
    6 views
    0 likes
    Last Post oviejo
    by oviejo
     
    Working...
    X