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

Variable Profit Target and Stop Loss orders using the Strategy Builder?

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

    Variable Profit Target and Stop Loss orders using the Strategy Builder?

    Hi Ninja Support,
    How can I set an variable Profit Target and variable Stop Loss orders using the Strategy Builder? I mean I dont want to use an User Variable parameter insted of an User Input..... I have tried using an "Exit Position by Stop Order" for the Profit Targets and an "Exit Position by Limit Order" for the Stop Losses but it is calculated once the bar is closed and sometimes the price has crossed the Profit/Stop level and I lose the control of my order (Profit Target and Stop Loss isnot excecuted). Is there a way to set an instantly Profit/Loss orders once I enter a position without waiting for the bar to close?



    Thank you,

    #2
    Hello MarcoNT29,

    Thanks for your post.

    The stops and targets as found in the Stops and Targets window would provide the type of stops and targets you need (IE: implemented upon entry) however they are limited to using fixed values only (IE: 10 ticks, $100, 0.01 percent, etc.).

    To use a dynamically calculated stop and target you have to wait for the position to be filled.

    To accomplish your goal I would suggest unlocking the strategy and working directly in Ninjascript where you can dynamically use the stops and targets so that they are set as you wish before the entry is filled and are deployed as soon as the entry is filled.

    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks Paul!
      Do you have any suggestion to learn how to use the NinjaScript? maybe a NinjaTrader guide/course?

      Regards

      Comment


        #4
        Hello MarcoNT29,

        Thanks for your reply.

        Ninjscript is the programming language of NinjaTrader. Ninjascript is based on C# Programming language and we recommend a good working knowledge of C#. We do not provide C# education/tutorials as these can be found on the internet in many places.

        Once you have created a Ninjascript strategy or indicator you would need to use the Ninjascript editor for further coding and debugging, here is a link to the overall Ninjascript editor: https://ninjatrader.com/support/help...t8/?editor.htm

        Here is a link to live webinars where you can find the Ninjascript editor and strategy builder, alternating on Thursdays: https://ninjatrader.com/PlatformTraining

        Here is a link to a recording of the Ninjascript editor webinar:
        https://www.youtube.com/watch?v=H7aD...We0Nf&index=14

        The help guide is your best resource, here are some links to get you going:








        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Thank you very much Paul

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by DanielTynera, Today, 01:14 AM
          0 responses
          2 views
          0 likes
          Last Post DanielTynera  
          Started by yertle, 04-18-2024, 08:38 AM
          9 responses
          40 views
          0 likes
          Last Post yertle
          by yertle
           
          Started by techgetgame, Yesterday, 11:42 PM
          0 responses
          12 views
          0 likes
          Last Post techgetgame  
          Started by sephichapdson, Yesterday, 11:36 PM
          0 responses
          2 views
          0 likes
          Last Post sephichapdson  
          Started by bortz, 11-06-2023, 08:04 AM
          47 responses
          1,615 views
          0 likes
          Last Post aligator  
          Working...
          X