• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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:
        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

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

        http://www.ninjatrader.com/support/h..._positions.htm
        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 KonalGondal, Today, 10:18 AM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_Kate  
          Started by Jorge.andres.o, Today, 09:24 AM
          2 responses
          8 views
          0 likes
          Last Post Gland1
          by Gland1
           
          Started by Oracletrades, Today, 09:02 AM
          4 responses
          8 views
          0 likes
          Last Post NinjaTrader_ChrisL  
          Started by JTizz, Today, 08:17 AM
          7 responses
          25 views
          0 likes
          Last Post JTizz
          by JTizz
           
          Started by Johnny Santiago, 07-30-2020, 07:30 PM
          9 responses
          37 views
          0 likes
          Last Post brucerobinson  
          Working...
          X