Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

LongLimit

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

    LongLimit

    Hello. I have a doubt. I would like to enter a limit order between the close and the low of the bar..

    //vela Bajista
    if (Open[0] > Close[0])
    {

    //Suelos
    if ((Close[0] - Low[0]) / TickSize >= Distancia)
    {
    EnterLongLimit(??????);
    }

    When the Price is rejected, I would like to establish a limit order between the close and the low of the bar...

    Thanks a lot...
    Attached Files

    #2
    Hello brokerbombero,

    Thanks for your question.

    For placing a limit order at that price level between the Low and the Close, you could choose any price level between Close[0] - (Close[0] - Low[0]). If you added a multiplier, you could enter within that range in terms of a percentage of that range.

    For example:

    double PriceToEnter = Close[0] - (Close[0] - Low[0]) * Percent;

    Where Percent is a double between 0 and 1.

    As for placing another order upon order rejection, you could change the RealtimeErrorHandling of the strategy so the strategy is not aborted and then to catch the occurrence in OnOrderUpdate() to place a new limit order.

    Please be sure to also review the documentation on the Managaed Approach so the Limit order is submitted properly with the IsLiveUntilCancelled overload if you desire this behavior.

    I'll provide links to our publicly available documentation on the items discussed.

    RealtimeErrorHandling - https://ninjatrader.com/support/help...orhandling.htm

    OnOrderUpdate() - https://ninjatrader.com/support/help...rderupdate.htm

    Managed Approach - https://ninjatrader.com/support/help...d_approach.htm

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    88 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    135 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    69 views
    0 likes
    Last Post PaulMohn  
    Working...
    X