Announcement

Collapse
No announcement yet.

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.

    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:








        Comment


          #5
          Thank you very much Paul

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Mindset, 04-21-2026, 06:46 AM
          0 responses
          93 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          138 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          68 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by cmoran13, 04-16-2026, 01:02 PM
          0 responses
          123 views
          0 likes
          Last Post cmoran13  
          Started by PaulMohn, 04-10-2026, 11:11 AM
          0 responses
          73 views
          0 likes
          Last Post PaulMohn  
          Working...
          X