Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

carrying positions, increasing its size.

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

    carrying positions, increasing its size.

    I am running strategies which carry positions for days. Sametime, in case they are going well I am increasing the PositionTaken weekly.
    My question is:

    Yesterday I slept with 100 GOOG short, today in the morning I increased PositionTaken to 130 shares (from 100).
    In case a long position is generated, will the system know that it must buy 100 to get position flat and then buy more 130 (new size)?

    #2
    Hello,

    Is PositionTaken a user-defined property in your script? If so, you will not be able to change this property in the Indicators window on the fly. You would need to disable the strategy, then re-enable it, which could potentially cause issue with your new strategy position not synching with your account position.

    To get around this, I recommend disabling the strategy, then making sure that your account position is flat before re-enabling it. That way, the new instance can start fresh and simply enter with the new quantity the next time your order-entry logic is triggered.

    Please let me know if I can assist further.
    Dave I.NinjaTrader Product Management

    Comment


      #3
      I disable the strategy every day, and reconnect it using SYNC. I see no problem.
      but here is the question.

      long position = 100 GOOG.
      new position taken (mannually changed) = 130 GOOG.

      suposing a short position is generated what will be my new position? (it will close and open a new short position, of course).

      160 SHORT GOOG???

      Comment


        #4
        Hello,

        If I'm reading your post correctly, then in that case the strategy would ignore the new quantity that you entered manually. Your strategy position may be 100 short, for example, while your account position is only 70 short. This is a great example of the kind of unexpected results that can occur.

        Please let me know if I can assist further.
        Dave I.NinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by algospoke, 04-17-2024, 06:40 PM
        5 responses
        46 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by arvidvanstaey, Today, 02:19 PM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_Zachary  
        Started by mmckinnm, Today, 01:34 PM
        3 responses
        5 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by f.saeidi, Today, 01:32 PM
        2 responses
        8 views
        0 likes
        Last Post f.saeidi  
        Started by alifarahani, 04-19-2024, 09:40 AM
        9 responses
        55 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X