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

Long limit order filling instantly although price hasn't hit the level

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

    Long limit order filling instantly although price hasn't hit the level

    Hello,

    I'm hoping I'm just doing something stupid but I cannot figure out what I'm doing wrong. I have a reversal strategy that's meant to place a limit order below the previous candle close. In my log I can see it trying to place the order at the correct price but it's instantly filling instead of placing the order at the correct price.

    I'm using this code to find what the entry limit price should be

    EntryLimitPrice=Low[1]-TickSize;

    This is my trade entry line ...

    myEntryOrder = EnterShortLimit(1, EntryLimitPrice, "RobReversal");

    If I print EntryLimitPrice​ before the entry, it says it's 17609.

    But it's entering incorrectly at 17611.5. Almost straight after the candle closes.

    Here is a snippet from my log, it looks like it should be entering it at the correct price - 17609, but you'll see the fill price is 17611.50

    Click image for larger version

Name:	image.png
Views:	21
Size:	98.6 KB
ID:	1296091

    As you can see from the image below, the it should never have filled as the price never hit 17609.

    Click image for larger version

Name:	image.png
Views:	31
Size:	33.5 KB
ID:	1296090
    Hopefully I'm missing something and this is an easy fix! please let me know if this should be working or what I can check!

    Thanks

    Andy

    #2
    Ignore me ... of course it would enter ... I should have used sell stop limit/market

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by pibrew, Today, 06:37 AM
    0 responses
    4 views
    0 likes
    Last Post pibrew
    by pibrew
     
    Started by rbeckmann05, Yesterday, 06:48 PM
    1 response
    14 views
    0 likes
    Last Post bltdavid  
    Started by llanqui, Today, 03:53 AM
    0 responses
    6 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    11 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    16 views
    0 likes
    Last Post AaronKoRn  
    Working...
    X