Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problems with NG (only)

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

    Problems with NG (only)

    For some reason I am having issues with Natural Gas (NG), and no other instrument has this problem:

    I have this problem using the SampleMAStrategy.

    When I start a strategy with a chart, and it takes a position, the strategy executes the position, but doesn't update the position. It's like it's out of sync.

    Finally when it comes to flipping the position, it merely closes it, and doesn't flip sides.

    I've tried uninstalling and reinstalling. How do I fix this instrument?

    Jeremy
    Jeremytang
    NinjaTrader Ecosystem Vendor - Shark Indicators

    #2
    Hello,

    Sounds like you are in fact out of sync with your strategy position and your account position.

    If this is a sim101 account please reset the sim101 account.


    Resetting a simulation account will clear all historical trade data from this account. Please follow the instructions below to reset a simulation account.
    From the NinjaTrader Control Center window select the menu Tools > Options
    Select the "Simulator" tab
    Press the "Reset" button

    Then please fully read and understand this information.

    From what you describe it looks like your account position and the strategy position is not in sync.
    Strategy Position vs. Account Position:
    <http://www.ninjatrader-support2.com/...ead.php?t=4033>
    1st solution:
    You can include the following statement in your code to avoid the strategy to be calculated on historical data.
    // Only run on real-time data
    if (Historical)
    return;
    Add the statement to the top of OnBarUpdate()
    2nd solution:
    You can set 'On starting a real-time strategy' to 'Wait until flat before executing live'.
    This option can be found at Tools-->Options-->Strategies-->NinjaScript-tab.
    3rd solution, would be submitting manual orders to sync the strategy and account positions described in the link


    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      Hi Brett, unfortunately this isn't a sim101 account, it's a live one. How do I reset that?

      Jeremy
      Jeremytang
      NinjaTrader Ecosystem Vendor - Shark Indicators

      Comment


        #4
        Jeremy,

        You will need to check on your brokerage account what that position is and submit the necessary actions to close/however you wish to handle that position with. Then in NT add an execution to offset it to get things back in sync. You can add executions in the Executions tab of the Control Center by right clicking.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Hi Josh, I reset the instruments and restarted, and that seemed to work.
          Jeremytang
          NinjaTrader Ecosystem Vendor - Shark Indicators

          Comment


            #6
            Hello,

            Excellent!.

            Let us know if we can be of further assistance.
            BrettNinjaTrader Product Management

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            597 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            343 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            556 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            555 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X