Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error: "An Enter() method to submit an entry order... etc"

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

    Error: "An Enter() method to submit an entry order... etc"

    Hello All!!

    I've noticed my strategy has been hit or miss on the orders (currently in replay mode because the markets are closed). So I decided to check the logs... and sure enough... it's throwing an error... and at the end of the error, it instructs me to search on the term "internal order handling."

    So.... I did... and the information I found in the help guide really didn't... well... help.

    I've done a google search as well of the NinjaTrader site and its forum, but I've not come across anyone who has actually explained what is going on here... just a lot of recommendations to go look in the help guide.

    Either you guys have a different help guide than me, or I am just one of the thickest headed people on the planet.

    Here's my setup... I would love a bit more detail about this if you have the time.

    I'm using the strategy wizard. I've got a stoploss set at 6 ticks. Standard stoploss. Calculation mode "Ticks"

    Condition set 1:
    If cross one line above another
    Draw a dot
    EnterLong(DefaultQuantity, "")

    Set 2 is the short sell version of the above.

    Now... when I change the order type to "enter long position by limit order," that's when I get the error and the strategy doesn't place any orders. Here's what the code looks like:

    EnterLongLimit(DefaultQuantity, Close[0] + 1 * TickSize, "");

    That's the only thing that changes. When it is set to simple market order, it works fine, but as soon as I set a limit, I get the errors. I would love to be able to buy and sell with limit orders.

    Any idea what's going on? I know a lot of other people have had this issue. Maybe we could discuss it here and really break it down. What do you think?

    Thank you for having this forum. It's a wonderful resource.

    -V
    Last edited by Aurum; 07-19-2014, 06:55 PM. Reason: Forgot to mention I'm in "replay" mode on this.

    #2
    Hello V,

    Thank you for your post.

    Buy Limit Orders cannot be placed above the market, in this case it would need to be below the market or use GetCurrentBid(): http://www.ninjatrader.com/support/h...currentbid.htm

    If this does not resolve the matter, please provide the full error message.

    Comment


      #3
      Hi PatrickH!

      Thanks for your reply. After giving it a good think, I should have known better. To buy above the market, I need to use a stop order. Only a "sell" limit order can be placed above the market. A "buy stop limit order" is what I was looking for.

      I've created the following diagram for myself to help me remember this when I'm structuring strategy orders (maybe it can help others keep this all clear in the heat of NinjaScripting battle!!):

      >>>>>>---- BUY StopLimitOrder
      >>>>---- BUY stop Order
      >>---- SELL limit order

      ### CURRENT MARKET PRICE ###

      >>----BUY limit order
      >>>>---- SELL stop Order
      >>>>>>---- SELL StopLimitOrder
      Thank you again for your great reply and the link!

      V

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      648 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      369 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      109 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      573 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      575 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X