Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

re enabling a strategy

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

    re enabling a strategy

    Hi,

    What can you do if you close your chart which has strategies running of it and has executed so you are long/short and want to re start the strategies so they will eventually exit these positions. As i just re enabled the strategies but it did not submit an exit order.

    Thanks

    Freddy

    #2
    Hello,


    Thank you for your note.


    You need to go into control center->tools->options->Strategies tab->Ninjascript sub tab and select immediately submit live working orders.

    Make sure however that when you start your strategies that they are in sync with your live account. Making sure that the strategies tab position matches the account tab position.

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

    Comment


      #3
      thanks for that, i understand the first part but the second

      'Make sure however that when you start your strategies that they are in sync with your live account. Making sure that the strategies tab position matches the account tab position.'


      How can i make sure of this?

      Also is it normal at the end of the day the position tab goes to 0 even when its a profitable day? i.e does it reset every day or should it be p and l since entry?

      Thanks

      Freddy

      Comment


        #4
        Hello,

        Sure, its just doing a visual check to make sure they are in sync.

        For example you dont want your strategy thinking your long 1 contract and then try to exit the position, but your account is actually flat. Then it sells one and puts you into a short position when the strategy was just trying to go flat.

        This is the reason for the protective mode you have a few options.

        Strategy Position vs. Account Position:


        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

        4th solution, would be to enable Sync account position to true.

        BrettNinjaTrader Product Management

        Comment


          #5
          Thanks very much for that, it clears it up and the solutions are very helpful

          Thanks

          Freddy

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          69 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          42 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          24 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          27 views
          0 likes
          Last Post TheRealMorford  
          Started by Mindset, 02-28-2026, 06:16 AM
          0 responses
          54 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Working...
          X