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

daily loss limit in strategy builder

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

    daily loss limit in strategy builder

    hi, hoping to find a method in nj8 strategy builder whereby i could set an overall loss limit on a strategy. in other words to have it exit positions and turn off the working strategy, thanks

    #2
    Hello 37s29nala,

    Thank you for your post.

    Here's an example script a former colleague of ours created that should help. It's a little tricky to do this in the Strategy Builder, but you can if you use a custom series to track the current Strategy PnL. I'd advise importing this and then opening a new Strategy Builder window. On the first screen, find "DailyLossLimitBuilderExample" in the list and from there you can use the Builder navigation buttons to view the necessary logic.

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

    Comment


      #3
      hi kate

      i wasn't successful here. i downloaded the zip and copied it i dont know where i should paste this. should i be using the strateg;y analyzer.

      Comment


        #4
        Hello 37s29nala,

        Thank you for your reply.

        It should not be copied and pasted, it should be imported into NinjaTrader and then you can open a new Strategy Builder window, select "DailyLossLimitBuilderExample" from the dropdown on the first page, and then you can use the navigation buttons to view how the logic is set up.

        Note — To import NinjaScripts you will need the original .zip file.

        To Import:
        1. Download the NinjaScripts to your desktop, keep them in the compressed .zip file.
        2. From the Control Center window select the menu Tools > Import > NinjaScript Add-on...
        3. Select the downloaded .zip file
        4. NinjaTrader will then confirm if the import has been successful.

        Critical - Specifically for some NinjaScripts, it will prompt that you are running newer versions of @SMA, @EMA, etc. and ask if you want to replace, press 'No'

        Once installed, you may add the strategy to a chart to test with the Sim101 account by:
        • Right-click your chart > Strategies... > Select the Strategy from the 'Available' list on the left > Add > Check the Enable checkbox on the right > OK
        Here is a short video demonstration of the import process:Please let me know if I can be of further assistance.
        Kate W.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Taddypole, 04-26-2024, 02:47 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Eduardo  
        Started by futtrader, 04-21-2024, 01:50 AM
        6 responses
        58 views
        0 likes
        Last Post futtrader  
        Started by sgordet, Today, 11:48 AM
        0 responses
        4 views
        0 likes
        Last Post sgordet
        by sgordet
         
        Started by Trader146, Today, 11:41 AM
        0 responses
        5 views
        0 likes
        Last Post Trader146  
        Started by jpapa, 04-23-2024, 07:22 AM
        2 responses
        19 views
        0 likes
        Last Post rene69851  
        Working...
        X