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 placement question

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

    order placement question

    Working on a strat....I have the triggers set to go long or short as soon as the requirements are met.

    I would like to be able to place an order 5 ticks above or below (depending on the order) the trigger point. So instead of it just jumping right into a trade, it actually places that same buy or sell order 5 ticks from where it would have just jumped right in.

    Make any sense? Seems like it should be a simple code, but i'm not having any luck,

    Right now, I'm simply using
    SetStopLoss("", CalculationMode.Ticks, 20, false);
    SetProfitTarget("", CalculationMode.Ticks, 21);

    #2
    Hello Bobbybattles,

    Assuming you are using the managed approach, when the condition is true, place a buy limit order 5 ticks below the market price with EnterLongLimit(), or 5 ticks above the market price with a buy stop order with EnterLongStop() or a buy stop limit order with EnterLongStopLimit().
    Or place a sell limit 5 ticks above the market price with EnterShortLimit(), or 5 ticks below the market price with a sell stop order with EnterShortStop() or a sell stop limit order with EnterShortStopLimit().

    For example to place a limit 5 ticks below the current price:

    Code:
    if (/* conditions to enter here */)
    {
    EnterLongLimit(Close[0] - 5 * TickSize);
    }
    Below is a link to EnterLongLimit().


    On the left within the Managed Approach you will see the other help guide documents for the other order methods.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by jxs_xrj, 01-12-2020, 09:49 AM
    4 responses
    3,281 views
    1 like
    Last Post jgualdronc  
    Started by Option Whisperer, Today, 09:55 AM
    0 responses
    5 views
    0 likes
    Last Post Option Whisperer  
    Started by geddyisodin, 04-25-2024, 05:20 AM
    8 responses
    58 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by halgo_boulder, 04-20-2024, 08:44 AM
    2 responses
    22 views
    0 likes
    Last Post halgo_boulder  
    Started by mishhh, 05-25-2010, 08:54 AM
    19 responses
    6,189 views
    0 likes
    Last Post rene69851  
    Working...
    X