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 NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    54 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    72 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X