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.

    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.

        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 bortz, 11-06-2023, 08:04 AM
          47 responses
          1,609 views
          0 likes
          Last Post aligator  
          Started by jaybedreamin, Today, 05:56 PM
          0 responses
          9 views
          0 likes
          Last Post jaybedreamin  
          Started by DJ888, 04-16-2024, 06:09 PM
          6 responses
          19 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by Jon17, Today, 04:33 PM
          0 responses
          6 views
          0 likes
          Last Post Jon17
          by Jon17
           
          Started by Javierw.ok, Today, 04:12 PM
          0 responses
          16 views
          0 likes
          Last Post Javierw.ok  
          Working...
          X