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

Various Exits

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

    Various Exits

    Hello,

    I´m want to make in my strategy-coding for a position with quantity = 2 with 2 different exits. Exits depend from different stop-losses ("scale out"). Sounds easy, but I can´t find the correct coding for this as with stoploss total quantity is exit. (I mean to code this in the Strategy Analyzer, of course in the ATM-Dom it works fine!)

    I tried already to enter maybe 1 position in condition set 1 and another position in condition set 2, each with a specific signal-name and to refer with my stop-losses to the concerning position. But it doesn´t work - to my surprise I have however only one 1 entry with one signal-name in my charts.

    Thanks in advance for any help how to do for exit not total quantity of a positione but always 1 contract, depending from different stoplosses.

    Best regards
    Tony
    Last edited by tonynt; 06-14-2010, 12:49 AM.

    #2
    Hi Tony, please set EntriesPerDirection to a higher value or work with the EntryHandling set to 'Unique Entries' - http://www.ninjatrader.com/support/f...ead.php?t=3225



    This should allow the scale in / out logic to work as expected then.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thank you!

      Bertrand,

      thank you for your reply. Great software - great support!

      Best
      Tony

      Comment


        #4
        Bertrand,

        thank you for your reply. But the exit with different conditions is not what I mean.

        I asked for exits with different stoplosses (same as in the ATM with DOM) for eg 3 contracts that have been entered at the same time. How can I code eg

        a.)
        when 9 ticks in profit with 1st contract then move stoploss to breakeven
        when 15 ticks in profit with 2nd then move stoploss to 5 ticks below/above price

        b.)
        when 20 ticks in profit with 3rd then move TRAILstop to 3 ticks below/above price

        Thanks.
        Tony
        Last edited by tonynt; 06-14-2010, 05:29 AM. Reason: Typing error

        Comment


          #5
          Tony, for this you would need to scale in with your entries to be able to scale out then later with your exits as well -



          To create the trailing in your stoplosses, please see this sample here -



          As an alternative you can call ATM's directly for exit mangement, however this will not allow for any backtesting then -

          BertrandNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by rocketman7, Today, 09:41 AM
          4 responses
          15 views
          0 likes
          Last Post rocketman7  
          Started by selu72, Today, 02:01 PM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_Zachary  
          Started by WHICKED, Today, 02:02 PM
          2 responses
          12 views
          0 likes
          Last Post WHICKED
          by WHICKED
           
          Started by f.saeidi, Today, 12:14 PM
          8 responses
          21 views
          0 likes
          Last Post f.saeidi  
          Started by Mikey_, 03-23-2024, 05:59 PM
          3 responses
          52 views
          0 likes
          Last Post Sam2515
          by Sam2515
           
          Working...
          X