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

exit long stop limit. average position price arithmetic or ticks

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

    exit long stop limit. average position price arithmetic or ticks

    i'm making an exit on my strategy to where if 54 ticks of profit then a stop limit order gets put in for a 6 ticks of profit exit (if price drops back to that level). can i just put in the numbers? or, do i have to make an input or variable then have that 'set' in? and, does this stay active beyond the intrabar it calculated when the ticks of profit happens? what if the price goes by the 6 ticks of profit really fast, is there a chance it might not get filled?

    additionally, since i can't use stops and targets. i need to have an exit in the negative spectrum. i put if average position size with arithmetic of - 35 greater or equal to ask; exit long. does that make it where if its -35 from entry or greater negative number it will exit the long position? can i put a negative tick number. or, do i use arithmetic with a minus?

    is the stop price and the limit price. below the entry? are any of the selections default to be below entry? or, are they all above entry?
    Attached Files
    Last edited by SteveReiza; 02-12-2024, 06:35 PM.

    #2
    Hello SteveReiza,

    Thank you for your post.

    "do i have to make an input or variable then have that 'set' in?"

    You can just input the values, no need to have an input or variable to store the values.

    "does this stay active beyond the intrabar it calculated when the ticks of profit happens?"

    The default behavior for NinjaTrader is to cancel limit orders if the trigger conditions are no longer true. If you want the order to stay alive, it needs to be resubmitted on each bar.

    "does that make it where if its -35 from entry or greater negative number it will exit the long position? can i put a negative tick number. or, do i use arithmetic with a minus?"

    You would need to use Ticks (not Arithmetic) to offset the Position.AveragePrice by a number of ticks. You can input negative numbers for the ticks.

    "is the stop price and the limit price. below the entry? are any of the selections default to be below entry?"

    You'll need to enter values for the stop and limit price that make sense for the orders in order to avoid getting any rejection errors. There are no default selections for the stop and limit price.

    Order types that must be greater than the current ask price: Sell Limit, Sell MIT, Buy StopMarket
    Order types that must be less than the current bid price: Buy Limit, Buy MIT, Sell StopMarket​

    Please let me know if you have any further questions.
    Gaby V.NinjaTrader Customer Service

    Comment


      #3
      thanks for the reply. okay sweet. great to have clarification on those things!

      alright, so if i have a stop price of 102 and a limit price of 62. it would calculate bar to bar and if the price isn't at 102 or more anymore, then the 62 limit price isn't "on". so that won't work

      i think i need to set a bool to have a limit price for exit when the 102 gets touched. when 102. have bool go to true. then if long and bool true. exit limit 62.

      does that make sense? i'm trying to have a profit trigger. then a profit capture.

      Comment


        #4
        Hello Steve,

        Can you please explain what you mean by "if the price isn't at 102 or more anymore, then the 62 limit price isn't "on"?

        When using ExitLongStopLimit(), the order will exit at the specified price when either the stop price is hit or the limit price is hit.
        Gaby V.NinjaTrader Customer Service

        Comment


          #5
          thanks for the reply. okay cool. i think i'm tracking.

          i just mean if the ticks of profit isn't at or above 102 anymore. say, its 100 on the next bar. (which is alright. i just want an exit to where if the price drops to it there will be an exit then and there - i don't want it to move, i don't want it to frequency, etc). then the limit price isn't active anymore? because the trigger conditions aren't present anymore - the stop loss at 102 since its a new bar and lower than 102.

          Comment


            #6
            Hello,

            What are you conditions to submit the order? As long as this condition remains true, the order will be resubmitted on each bar (meaning the specified stop and limit price remain active).

            If the price hits or passes your stop or limit price, the order will be executed.
            Gaby V.NinjaTrader Customer Service

            Comment


              #7
              thanks for the reply. okay awesome. i'm going to use the stop limit order on profit target. i'm getting killed on slippage. 16-20 ticks. i'll set the limit price at 103 and the stop price at 102. that oughta help. i have a different concept that will work for the profit trigger and profit capture. i appreciate the clarification - major help!

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by burtoninlondon, Today, 12:38 AM
              0 responses
              10 views
              0 likes
              Last Post burtoninlondon  
              Started by AaronKoRn, Yesterday, 09:49 PM
              0 responses
              14 views
              0 likes
              Last Post AaronKoRn  
              Started by carnitron, Yesterday, 08:42 PM
              0 responses
              11 views
              0 likes
              Last Post carnitron  
              Started by strategist007, Yesterday, 07:51 PM
              0 responses
              14 views
              0 likes
              Last Post strategist007  
              Started by StockTrader88, 03-06-2021, 08:58 AM
              44 responses
              3,983 views
              3 likes
              Last Post jhudas88  
              Working...
              X