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 ender_wiggum, Today, 09:50 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by rajendrasubedi2023, Today, 09:50 AM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by geotrades1, Today, 10:02 AM
    0 responses
    4 views
    0 likes
    Last Post geotrades1  
    Started by bmartz, Today, 09:30 AM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by geddyisodin, Today, 05:20 AM
    3 responses
    26 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X