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 fx.practic, 10-15-2013, 12:53 AM
          5 responses
          5,404 views
          0 likes
          Last Post Bidder
          by Bidder
           
          Started by Shai Samuel, 07-02-2022, 02:46 PM
          4 responses
          95 views
          0 likes
          Last Post Bidder
          by Bidder
           
          Started by DJ888, Yesterday, 10:57 PM
          0 responses
          8 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by MacDad, 02-25-2024, 11:48 PM
          7 responses
          159 views
          0 likes
          Last Post loganjarosz123  
          Started by Belfortbucks, Yesterday, 09:29 PM
          0 responses
          8 views
          0 likes
          Last Post Belfortbucks  
          Working...
          X