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 DJ888, 04-16-2024, 06:09 PM
    6 responses
    18 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by Jon17, Today, 04:33 PM
    0 responses
    1 view
    0 likes
    Last Post Jon17
    by Jon17
     
    Started by Javierw.ok, Today, 04:12 PM
    0 responses
    6 views
    0 likes
    Last Post Javierw.ok  
    Started by timmbbo, Today, 08:59 AM
    2 responses
    10 views
    0 likes
    Last Post bltdavid  
    Started by alifarahani, Today, 09:40 AM
    6 responses
    41 views
    0 likes
    Last Post alifarahani  
    Working...
    X