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 cmtjoancolmenero, Yesterday, 03:58 PM
    2 responses
    19 views
    0 likes
    Last Post cmtjoancolmenero  
    Started by Stanfillirenfro, Today, 07:23 AM
    0 responses
    2 views
    0 likes
    Last Post Stanfillirenfro  
    Started by olisav57, Yesterday, 07:39 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by cocoescala, 10-12-2018, 11:02 PM
    7 responses
    942 views
    0 likes
    Last Post Jquiroz1975  
    Started by oviejo, Today, 12:28 AM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X