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 benmarkal, Yesterday, 12:52 PM
      3 responses
      22 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by helpwanted, Today, 03:06 AM
      1 response
      17 views
      0 likes
      Last Post sarafuenonly123  
      Started by Brevo, Today, 01:45 AM
      0 responses
      11 views
      0 likes
      Last Post Brevo
      by Brevo
       
      Started by aussugardefender, Today, 01:07 AM
      0 responses
      6 views
      0 likes
      Last Post aussugardefender  
      Started by pvincent, 06-23-2022, 12:53 PM
      14 responses
      244 views
      0 likes
      Last Post Nyman
      by Nyman
       
      Working...
      X