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

stop limit order vs stop order vs limit order vs exit position

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

    stop limit order vs stop order vs limit order vs exit position

    i'm dialing in my exits on my strategy. and, i'm not sure which exit to use. what is the benefit of doing a stop limit order vs a stop order. does the stop limit order help on slippage? the stop price is triggering the limit price, correct? why would someone use that instead of just a stop order. is it a way to gain a tick or two? just put the limit price above the stop price by a tick or two i'm guessing (for a long strategy). is there a limit to the distance between the two or does only a tick or two make sense? i have a bool to trigger it so it would keep being true. technically i could have it far away as i want even into the next bars, right?

    if i have the ticks of profit in the conditions with a bool to another bool. then, that bool is the condition for an exit in the action with the signal name. for some reason just having the bool isn't enough to make the action happen on average price - ticks (the stop order) - which i don't get. price was moving fast in one of my orders so it placed it above the bid (i have a bollinger line as a second stop order as a backup) but - it got rejected. and, it happened again but went the wrong way in the market. it closed my position and added a new one right away. (i just realized i don't have my bool AllowTrade which is coupled with isfirsttickofbar on my stop orders - that could be why that happened). i'm using strategy builder. to me it doesn't make sense to use exit long by stop order. the action isn't connecting the signal name to the open position for the exit to happen. and, when it does it gets rejected because its above the bid.

    #2
    Hello SteveReiza,

    A stop market order becomes a market order when touched and will fill at market price. If the market is moving the order might fill a few ticks from the stop price.

    A stop limit order becomes a limit when touched. It will fill at the specified limit price or better and will not fill at all and will remain working. This means you cannot get a fill at a worse price, but might mean the order does not fill.

    The limit price must be equal to or ahead of the stop price (above the stop price for a buy, below the stop price for a sell).


    "if i have the ticks of profit in the conditions with a bool to another bool. then, that bool is the condition for an exit in the action with the signal name. for some reason just having the bool isn't enough to make the action happen on average price - ticks (the stop order) - which i don't get. "

    I'm not quite understanding what this means.

    The ticks of profit could be an int or a double (a type of number) while a bool is a true or false value.
    Do you just mean you are doing multiple conditions in the same condition set? (one comparing the profit in ticks and another comparing a bool to be true or false)

    If an order was rejected, this could be because the stop price was on the wrong side of the market. This would apply to stop market orders and stop limit orders which must both have the stop price ahead of the market (above the ask for a buy, below the bid for a sell)
    I am having a problem getting CalculationMode.Price to work with SetStopLoss. I attached the code and a screenshot of the errors, it seems to be ignoring the Lows[0][1] entry for the price, it will work if I type in an actual number. I'm not sure what I have wrong. This is the portion of the code that's erroring out....


    What is the fully error message on the rejected order?


    "the action isn't connecting the signal name to the open position for the exit to happen"

    Is the 'From entry signal' of the exit order matching the 'Signal name' of the entry?

    Is the exit order being submitted from a different condition set as the entry and checking the 'Current market position' is Market position > Long?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      thanks for the reply. i think i'm tracking.

      how do i know what price i'm receiving? i technically could be receiving the bid - the most someone would pay, right? when i'm saying close less than or equal to bollinger line. that might have already happened depending if the ask and prices close to it are somewhere else, correct?

      ""A stop limit order becomes a limit when touched. It will fill at the specified limit price or better and will not fill at all and will remain working. This means you cannot get a fill at a worse price, but might mean the order does not fill.""

      ..i have for a stop limit order. for a breakeven of 3 ticks. stop price average position price +3 ticks. so it triggers there. which would be the ask coming in as the price drops. then, as the limit price i have 'bid'. that makes the best sense, right? the highest someone would pay. so,i could technically get a pretty decent spread from the +3 ticks to the bid. and, since i have it as bid that means its not not going to be filled, correct?

      i think the market moved to fast and i was above the bid. i attached the image of the rejected message.

      i have current market position equals market position long in the same condition.

      yes, the entry signal name's are synced.

      when i check average position price and ticks +41. and, if i have a bool go off then - i'm getting the bid just as it happens at that moment, correct? is there a way to make it to where that is the ask? so, that way when i request the sale for, or at, the bid there is a decent spread. because the bid would be way up from the ask already since that's what i'm looking at or receiving as information to trigger.
      Attached Files
      Last edited by SteveReiza; 02-23-2024, 11:18 AM.

      Comment


        #4
        Hello SteveReiza,

        Buy orders fill at the ask, sell orders fill at the bid.

        A buy stop order must be above the ask. A sell order must be below the bid.

        An exit long position with a stop order is a sell stop order, this must be below the bid.

        Are you checking the price used for the stop is below the Price > Current bid?

        The error in your screenshot is a sell stop order with the stop price equal to or above the current bid.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          thanks for the reply. okay good to know. i'm sure why that would occur. i guess the market was moving too fast.

          are the bid and ask represented on a candle (say 35 second candle). with the top portion of the candle being the bids and the bottom portion being the asks? what fluctuation am i seeing on my end? bid then ask. but so many bids then so many asks? i'm seeing a candle on 'last' and am on tick update.

          how many ticks is the spread typically between ask and bid? its probably a range, right. so many ticks are the ask and so many ticks are the bid?

          i'm not sure what you mean, checking to see if price is below bid.

          Comment


            #6
            Hello SteveReiza,

            No, the bid and ask are not necessarily represented on a candle which is built with last data.

            You should be checking the price is less than the bid or greater than the ask directly.

            "how many ticks is the spread typically between ask and bid?"

            It would be impossible to say. This will be different from second to second and the spread is different for different instruments.
            Typically the higher the volume the closer the ask and bid spread will be.


            Whatever price you have calculated for the stop price and saved to a variable, compare this to be less than Price > Current bid price, and if true, submit the order with the saved price.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              thanks for the reply. right on, i'll do that. i think i'm tracking on all cylinders. appreciate the guidance.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by samish18, Today, 11:26 AM
              0 responses
              1 view
              0 likes
              Last Post samish18  
              Started by Trader146, 03-29-2024, 01:22 PM
              2 responses
              14 views
              0 likes
              Last Post Trader146  
              Started by tsantospinto, 04-12-2024, 07:04 PM
              7 responses
              127 views
              0 likes
              Last Post aligator  
              Started by futtrader, 04-21-2024, 01:50 AM
              5 responses
              56 views
              0 likes
              Last Post NinjaTrader_Eduardo  
              Started by PeakTry, Today, 10:49 AM
              0 responses
              2 views
              0 likes
              Last Post PeakTry
              by PeakTry
               
              Working...
              X