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 funk10101, Today, 09:43 PM
          0 responses
          3 views
          0 likes
          Last Post funk10101  
          Started by pkefal, 04-11-2024, 07:39 AM
          11 responses
          36 views
          0 likes
          Last Post jeronymite  
          Started by bill2023, Yesterday, 08:51 AM
          8 responses
          44 views
          0 likes
          Last Post bill2023  
          Started by yertle, Today, 08:38 AM
          6 responses
          25 views
          0 likes
          Last Post ryjoga
          by ryjoga
           
          Started by algospoke, Yesterday, 06:40 PM
          2 responses
          24 views
          0 likes
          Last Post algospoke  
          Working...
          X