Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Put order in High[1]

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

    Put order in High[1]

    I have a strategy with a button that places an order at High[1] + 2 ticks. If I want to place the order at the high of the current bar I have to wait for it to finish and sometimes the price goes away. How could I press the button while the bar[0] is being created and the order is placed when it closes at its high + 2 ticks? Thanks.

    #2
    Hello julifro,

    Below is a link to an example of placing an order when clicking a button. See regions 'Use case 2, submitting a limit order with limit price updated to indicator plot value'.


    For the bar price to update before the bar closes, Calculate must be set to OnPriceChange.

    TriggerCustomEvent() must be called to synchronize the bar series from the button Click event handler method.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    47 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    23 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    33 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    51 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X