Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Virtual Orders?

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

    Virtual Orders?

    If my Strategy has a two losing trades in a row then I want to halt it until I have a certain number of winning trades again.

    Rather than just stop trading completely when I start to lose I would like to be able to place "virtual trades" such that I am able to keep an eye on whether the losing streak has ended and get back in the game after some unexpected losers. Is there a way to do this?

    #2
    Is there any guidance on this at all to achieve this? I want to stop trading but keep an eye on things to be able to know that if I was to start trading again I would be winning. I'm thinking of unpredictable events like fundamentals that might cause price to crash through two stop orders.... I want to stop trading if that happens but would like to know when things are back to normal so I can resume. What is the best way to do this?

    Comment


      #3
      Hello reach4thelasers,

      Thank you for your post.

      So rather than stopping the strategy or having it stop trading, just switch to the Sim101 account for example?

      Is this for NinjaTrader 7, 8, or both?

      Comment


        #4
        Aha I did not think of that!! It's for NT8. So I can switch accounts at runtime programmatically?

        Comment


          #5
          Originally posted by reach4thelasers View Post
          Aha I did not think of that!! It's for NT8. So I can switch accounts at runtime programmatically?
          Yes, you can - however your strategy only runs on one configured account if you're using all the convenience methods/approaches that you're used to. If you want to switch accounts from a single strategy instance, I would advise you create your own Account event handlers and not mix in the standard OnPosition/Order/Execution Update virtuals or use the managed/unmanaged order methods (EnterLong(), etc). That account object will get you everything to custom tailor a strategy to run on those accounts.

          Information on the Account class can be found here:

          MatthewNinjaTrader Product Management

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Lumbeezl, 01-11-2022, 06:50 PM
          31 responses
          817 views
          1 like
          Last Post NinjaTrader_Adrian  
          Started by xiinteractive, 04-09-2024, 08:08 AM
          5 responses
          14 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by swestendorf, Today, 11:14 AM
          2 responses
          6 views
          0 likes
          Last Post NinjaTrader_Kimberly  
          Started by Mupulen, Today, 11:26 AM
          0 responses
          7 views
          0 likes
          Last Post Mupulen
          by Mupulen
           
          Started by Sparkyboy, Today, 10:57 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X