Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Submit an order one bar after the signal

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

    Submit an order one bar after the signal

    Hello,

    Would you please help figure out how to place an order one bar after the signal was triggered? I have tried few ways but it does not work. I wonder if there is any example or guide


    #2
    Hello, thanks for writing in.

    You can use the CurrentBar property for this e.g.

    Code:
    private int conditionBar = -1;
    ...
    OnBarUpdate()
    {
    
    if(<EntryCondition>)
    {
        conditionBar = CurrentBar;
    }
    
    if(CurrentBar == conditionBar+1)
    {
        EnterLong();
    }
    
    }
    Please let me know if I can assist any further.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Thank you Chris

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by lmatiukas, Today, 07:09 PM
      1 response
      6 views
      0 likes
      Last Post lmatiukas  
      Started by ComfyCouch, Today, 06:04 PM
      0 responses
      13 views
      0 likes
      Last Post ComfyCouch  
      Started by Ousher, Today, 04:35 PM
      0 responses
      4 views
      0 likes
      Last Post Ousher
      by Ousher
       
      Started by Rugosoft, 11-17-2020, 08:22 AM
      3 responses
      38 views
      0 likes
      Last Post Shansen
      by Shansen
       
      Started by hpolthof, Today, 03:48 PM
      0 responses
      7 views
      0 likes
      Last Post hpolthof  
      Working...
      X