Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to make a limit order that follows price.

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

    How to make a limit order that follows price.

    How to make a limit order that follows price:
    EX: the price is 19100.00
    I place a sell limit order at 19098.00 and if the price goes up by X ticks then the order also goes up by X ticks. On the other hand, if the price falls, the order does not move and is executed.
    vice versa for buy order.
    THANKS

    #2
    Hello Tim-c,

    The logic for this behavior would be the same as trailing stop but using a buy limit order instead of a sell stop order.

    Set a variable to hold the next trigger price (number of ticks from average price, or last trail price), set a variable to hold the current limit price (number of ticks below entry price or last trail price). If the close price is greater than the next trigger price, set the next trigger price variable to the close price plus the number of ticks the trigger should occur, and set the limit price variable to close minus the number of ticks the limit should be below the market price.

    Below are links to examples that demonstrate this logic with a sell stop order. The logic would remain the same, but order type would be a buy limit order.

    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    161 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    81 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    125 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    206 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    184 views
    0 likes
    Last Post CarlTrading  
    Working...
    X