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

Order isn't placed at right time

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

    Order isn't placed at right time

    I'm trying to enter long at a specific price away from current price and my orders aren't placed. My strategy is set to update per tick and it doesn't always place the order. Why?
    I'm using this to enter:

    EnterLongStopMarket(HighestHigh[0]+5*TickSize);

    #2
    Hello ttrader23,

    You would need to debug the conditions to enter if it is not placing trades when you think it should be. You can add a Print into your entry condition to make sure the order is being submited.

    As a side note calling EnterLongStopMarket like you are now will expire after 1 tick if you do not continuously call EnterLongStopMarket until it fills. All orders will expire after 1 bar, or 1 tick in the case of using OnEachTick. To keep the order active you either need to keep calling that method or use IsLiveUntilCancelled true.

    EnterLongStopMarket(int barsInProgressIndex, bool isLiveUntilCancelled, int quantity, double stopPrice, string signalName)
    JesseNinjaTrader Customer Service

    Comment


      #3
      Also, note that if, every tick, you move your order to the highest high of the past X bars (including the current incomplete bar) plus five ticks, that order would never fill on any bar unless there were an intrabar gap of five ticks plus the spread between two consecutive trades. Depending on the instrument and trading hours, that might happen, but on something like ES during RTH that is improbable.
      Bruce DeVault
      QuantKey Trading Vendor Services
      NinjaTrader Ecosystem Vendor - QuantKey

      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
      1 view
      0 likes
      Last Post port119
      by port119
       
      Started by Philippe56140, Today, 02:35 PM
      0 responses
      3 views
      0 likes
      Last Post Philippe56140  
      Started by 00nevest, Today, 02:27 PM
      0 responses
      2 views
      0 likes
      Last Post 00nevest  
      Working...
      X