Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

mixed bar calculation mode

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

    mixed bar calculation mode

    Hi

    My strategy needs mostly to be calculated on any upcoming tick, but there is s piece of it which is related with exits that needs to be calculated just on bar close.

    My question is what the best way to code this requirement for a non programmer as me?


    Thanks

    #2
    Hello zerosum666,
    You can calculate your exit login in the FirstTickOfBar. This way it will be calculated only once.

    Please refer to this sample code which demonstrates it


    Please let me know if I can assist you any further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Joydeep,

      If you don't mind, another related topic is how should I address the orders to enter and exit the trades in the context of running the code on incoming tick.

      Say, I use the EnterLongLimit (GetCurrentBid()) function. But given that the code is executed on each incoming tick, it looks like NT will start to fire cancel and replacement orders at high speeds, which could lead to many problems such as overfills, sync halts, etc.

      I want to know whether you believe is feasible to have the EnterLongLimit() running on incoming tick or if, alternatively, you'd recommend a different order management approach for such processor intensive strategy.

      Thanks

      Comment


        #4
        Hello zerosum666,
        Unfortunately, if you modify your order with each incoming tick then overfills etc can be an reality and there is now workaround.
        JoydeepNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by bmartz, Today, 09:30 AM
        2 responses
        11 views
        0 likes
        Last Post bltdavid  
        Started by f.saeidi, Today, 11:02 AM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by geotrades1, Today, 10:02 AM
        4 responses
        12 views
        0 likes
        Last Post geotrades1  
        Started by rajendrasubedi2023, Today, 09:50 AM
        3 responses
        16 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by lorem, Today, 09:18 AM
        2 responses
        11 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X