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

Is there a function that allows you to block trading on the account?

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

    Is there a function that allows you to block trading on the account?

    I am trying to create a strategy that will control losses and profits on the account and prohibit trading strategies in case of a daily loss.


    #2
    Hi Goolden,

    there is a free user app share. Maybe this will help you.

    This strategy will close any open positions and stop trading for the current day if your daily P/L reaches a set negative or positive value. There are simpler ways to accomplish a daily PL limit if you stop and restart your strategy every trading day, but those ways don’t always work when back testing over […]


    Credits to "algotrading".

    Regards
    Tradeer

    Comment


      #3
      Hello Goolden and Tradeer,

      Thank you for your posts.

      It's important to note a couple of things here. I wouldn't suggest the strategy that Tradeer posted, as it appears it just enters long or short randomly if the strategy is between the open and close times specified and then exits when it hits the loss or profit limit.

      There's not a way to keep manual entries from being made after a certain PnL is reached. Generally strategies are self-contained, so the above could be used as an example of how to build a daily PnL limit into a strategy, but the strategy PnL isn't the same as the PnL for your whole account.

      Here's an example of using trade performance statistics to stop a single strategy from trading that's a little easier to follow than the one Tradeer posted:



      If you're wanting something that will monitor the PnL for all strategies you're running on your account and stop after a specific Account PnL, such a project would likely be best made as an Add On so that not only would it not disable like a strategy but also that it could watch all account position, execution, and order events as needed.

      Please refer to the following links for details on the items you will need to begin this project:If you would like to seek a third party to develop such an item for you I can have a member of our Business Development team follow up with a list of NinjaScript Consultants.

      Please let us know if we may be of further assistance to you.
      Kate W.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by samish18, 04-17-2024, 08:57 AM
      16 responses
      55 views
      0 likes
      Last Post samish18  
      Started by arvidvanstaey, Today, 02:19 PM
      3 responses
      9 views
      0 likes
      Last Post NinjaTrader_Zachary  
      Started by jordanq2, Today, 03:10 PM
      2 responses
      8 views
      0 likes
      Last Post jordanq2  
      Started by traderqz, Today, 12:06 AM
      10 responses
      18 views
      0 likes
      Last Post traderqz  
      Started by algospoke, 04-17-2024, 06:40 PM
      5 responses
      47 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X