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

Soft Stop Options

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

    Soft Stop Options

    Hello, need some advice on best way to have NinjaTrader do the following:

    If I have an open position and I need to step away from my desk, how can I have NT automatically close a long position if the bar closes below a user defined price (support) level ? Opposite for a short position.

    Thanks,

    Mike

    #2
    Hello Mike,

    Thank you for writing in and welcome to the NinjaTrader Support Forum!

    We do not recommend leaving trades unattended. However, automating this can be done with a NinjaScript strategy.

    Do note that the strategy will also need to be submitting the entry orders as well.

    We do have resources to help you begin creating NinjaScript Strategies/Indicators.

    The best way to begin learning NinjaScript is to use the Strategy Wizard. With the Strategy Wizard you can setup conditions and variables and then see the generated code in the NinjaScript Editor by clicking the View Code button.

    I'm also providing a link to a pre-recorded set of videos 'Strategy Wizard 301' and 'NinjaScript Editor 401' for you to view at your own convenience.
    Strategy Wizard 301
    NinjaScript Editor 401

    There are a few Sample Automated Strategies which come pre-configured in NinjaTrader that you can use as a starting point. These are found under Tools--> Edit NinjaScript--> Strategy. You will see locked strategies where you can see the details of the code, but you will not be able to edit (you can though always create copies you can later edit via right click > Save as)

    We also have some Reference samples online as well as ‘Tips and Tricks’ for both indicators and strategies:
    Click here to see our NinjaScript Reference Samples
    Click here to see our NinjaScript Tips

    These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.

    Further, the following link is to our help guide with an alphabetical reference list to all supported methods, properties, and objects that are used in NinjaScript.
    Alphabetical Reference

    We also have a few tutorials in our help guide for both Indicators and Strategies.
    Indicator tutorials
    Strategy tutorials

    I have attached two screenshots of how you could exit a position if the close crosses above or below a specified price through the Strategy Wizard.

    Please, let us know if we may be of further assistance.
    Attached Files
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      Thanks Zachary. I did start looking at the videos and I see now why my first attempt at the code didn't work. I didn't realize that the strategy also had to open the position.

      How would I manually open a position through the strategy ? Also, just to let you know that I'd have a hard stop further away from the market.....just in case.

      Mike
      Last edited by michaelc6; 08-09-2016, 12:42 PM.

      Comment


        #4
        Hello Mike,

        NinjaScript strategies are automated strategies. You will need to place logic in the strategy itself to make your entries. You cannot manually enter and have your strategy take over.

        You can instead use ATM Strategies if you wish to manually enter and have a stop loss and profit target placed for you according to the parameters you set: https://ninjatrader.com/support/help...gement_atm.htm
        Zachary G.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by PhillT, 04-19-2024, 02:16 PM
        3 responses
        14 views
        0 likes
        Last Post mangel2000  
        Started by TraderBCL, Today, 02:37 AM
        0 responses
        1 view
        0 likes
        Last Post TraderBCL  
        Started by mangel2000, Today, 02:23 AM
        0 responses
        5 views
        0 likes
        Last Post mangel2000  
        Started by mangel2000, Today, 01:30 AM
        0 responses
        13 views
        0 likes
        Last Post mangel2000  
        Started by Doxxxx, Today, 01:24 AM
        0 responses
        5 views
        0 likes
        Last Post Doxxxx
        by Doxxxx
         
        Working...
        X