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

Multiple Targets

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

    Multiple Targets

    I am trying to exit half of my positions at 4T pofit and let the other half of my positions ride up to 8T profit. At the same time I would like to place a Breakeven once 4T is touched on all my positions. Is there a way to code this? I have been able to code the Breakeven portion, but the multiple tick targets is a challange for me. Can you help with this?

    #2
    lvaduva, this is possible to do in NinjaScript if you scale in first so you can scale out later with your exits, here's a sample to get you started coding this - http://www.ninjatrader-support2.com/...ead.php?t=3751
    BertrandNinjaTrader Customer Service

    Comment


      #3
      That is a great start. Can you help with the syntax, for a EnterLongLimit()
      Currently I have:

      EnterLongLimit(DefaultQuantity, Bollinger(Median, 1, 21).Upper[0] + 3 * TickSize, "");

      From you example you use EnterLong("Long1a") how do I change this to EnterLongLimit syntax that I have above?

      Comment


        #4
        The signal name would be added as the last parameter, the string you've left empty -

        Code:
        EnterLongLimit(DefaultQuantity, Bollinger(Median, 1, 21).Upper[0] + 3 * TickSize, "Long1a");
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Okay, but I use DefaultQuantity throughout my code and I type that in at 4, and I set my Long1a to 2. Will there be a conflict?

          Comment


            #6
            Then please use to set order size 'by Strategy' as you start this up, this would then work properly with the hard coded sizes you have now.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Thank you. I will try.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by cre8able, Yesterday, 09:15 PM
              2 responses
              13 views
              0 likes
              Last Post cre8able  
              Started by Trader146, Today, 09:17 PM
              0 responses
              6 views
              0 likes
              Last Post Trader146  
              Started by ttrader23, 05-08-2024, 09:04 AM
              9 responses
              43 views
              0 likes
              Last Post ttrader23  
              Started by ZeroKuhl, Yesterday, 04:31 PM
              8 responses
              46 views
              0 likes
              Last Post ZeroKuhl  
              Started by reynoldsn, Today, 07:04 PM
              0 responses
              11 views
              0 likes
              Last Post reynoldsn  
              Working...
              X