Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problem with EnterShortStopLimt

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

    Problem with EnterShortStopLimt

    Hello,

    I have a single time frame strategy that I am working on.

    Right now I have the following line of code that will not compile. I get an error that EnterShortStopLimit is not in context.

    Any ideas?

    entryOrderS = EnterShortStopLimt(0, true, iQuantity, (Close[0] - RANGE), (Close[0] + RANGE * 4), "E_Short");

    RANGE is a variable.
    iQuantity is an input.

    Also, I read that when you set the liveuntilcanceled to true, the order is live unless you cancel it, or the time in force has expired. I am using Gtc. What impact does that have on me?

    Thanks
    Anthony
    mrlogik
    NinjaTrader Ecosystem Vendor - Purelogik Trading

    #2
    There is a typo in your post below. Is that the issue?
    EnterShortStopLimit

    Comment


      #3
      ...

      Yes, what I silly problem.
      Thanks for the extra set of eyes.

      Now I get an error stating the stop price is <= the Close for a buy long. Why is that an error? I want to put a protective stop to my broker in the event that something goes wrong and I lose my internet connection.

      Thanks
      mrlogik
      NinjaTrader Ecosystem Vendor - Purelogik Trading

      Comment


        #4
        Most brokers will reject such an order. That's why NT rejects this order too.

        A protective order for a long position would e.g. by sell (not a buy!) stop order with stop price < Close.

        Comment


          #5
          Got it.

          Thanks for your help
          mrlogik
          NinjaTrader Ecosystem Vendor - Purelogik Trading

          Comment


            #6
            Hey Dierk,


            I have been playing with limit orders, usually using the Close[0] + / - some static value to allow from some slippage. Doing this and back testing, I get an entry on the chart but with an offset of the static value i used in the order.

            My question is this. If I use a limit order in real time with a static value of + 1 pip to go long, will the NT display the entry on the chart prior to the actual price bar getting to that point, or will it sit there and wait for the price to move through the Close[0] + 1 pip?

            Thanks
            mrlogik
            NinjaTrader Ecosystem Vendor - Purelogik Trading

            Comment


              #7
              Not sure I follow. If you place a live limit order at your broker it will get traded at that price or better. That's how limit orders work. Please make sure you fully understand the concept of limit/stop orders etc. before considering to automate your trading.

              Comment


                #8
                Thats right. It will get filled at that price or better.

                Consider this. The price is at 1.5600. I want to fill an order long at 1.5601.

                I want to send a limit order LONG for 1.5601 to the broker, which may or may not get filled. Basically I'm placing orders ahead of the market to keep the slippage as low as possible.

                I want to know; if the price on the NT chart never reaches 1.5601, will NT still generate a strategy signal on the chart?

                I'm trying to create a stop and reverse strategy. My strategy is such that I know where the price must go in order to create a signal, therefore I can have an order waiting in place prior to the price actually getting there.

                Does that make sense?

                Thanks,
                Anthony
                mrlogik
                NinjaTrader Ecosystem Vendor - Purelogik Trading

                Comment


                  #9
                  If you submit an order at that price and it is filled --> Then NT will display the fill on the chart. If it is not filled, you will not see it.
                  RayNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  608 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  355 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  105 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  560 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  561 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X