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

Offset TickSize

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

    Offset TickSize

    Hi,

    If I'd like to write a code manually (not using the Strategy Builder), with the following context:

    If my conditions are met, then place a limit buy position that is 24 ticksize greater than current high

    Here's how I wrote it (it should be very straightforward )

    EnterLongLimit(Convert.ToInt32(DefaultQuantity), (High[0] + (24 * TickSize)) , "");

    However, it executes, but not on the same exact price I specified. Can you please advise what's wrong?


    Thanks..










    #2
    Hello Abdullah_KSA,

    Thanks for your post.

    A buy limit order is to be placed below the current price. If it is placed above the current price then it would fill immediately as a limit order will fill at the limit price or better and in this case of entering a long position when you place the order above the current price, the current price is a better price.

    The correct order types to use to enter long above the current price are EnterLongStopLimit or EnterLongStopMarket.

    References:


    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thank you, Paul
      EnterLongStopMarket was the solution to my problem
      It worked

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by RideMe, 04-07-2024, 04:54 PM
      5 responses
      28 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by f.saeidi, Today, 08:13 AM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by DavidHP, Today, 07:56 AM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by kujista, Today, 06:23 AM
      3 responses
      9 views
      0 likes
      Last Post kujista
      by kujista
       
      Started by Mindset, Yesterday, 02:04 AM
      2 responses
      18 views
      0 likes
      Last Post NinjaTrader_RyanS  
      Working...
      X