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 futtrader, 04-21-2024, 01:50 AM
    4 responses
    41 views
    0 likes
    Last Post futtrader  
    Started by Option Whisperer, Today, 09:55 AM
    1 response
    11 views
    0 likes
    Last Post bltdavid  
    Started by port119, Today, 02:43 PM
    0 responses
    3 views
    0 likes
    Last Post port119
    by port119
     
    Started by Philippe56140, Today, 02:35 PM
    0 responses
    4 views
    0 likes
    Last Post Philippe56140  
    Started by 00nevest, Today, 02:27 PM
    0 responses
    2 views
    0 likes
    Last Post 00nevest  
    Working...
    X