Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Limiting the number of Bars for Active Limit

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

  • NinjaTrader_Ray
    replied
    By default, orders automatically cancel at the end of a bar therefore, you need to determine a way to *not* re-submit the order after three bars. One approach would be to create a private "int" variable outside the OnBarUpdate() method at the class level. Track the bar number the signal and order was placed (use CurrentBar) then track if the CurrentBar is greater than the bar number stored + 3 etc..

    Leave a comment:


  • TAJTrades
    started a topic Limiting the number of Bars for Active Limit

    Limiting the number of Bars for Active Limit

    I am suffering from a synapse meltdown!

    I want to enter a Buy Limit order 4 ticks below the signal bar Close. ( Close[0] ). How can I cancel the order if not triggered within the next 3 bars.

    I can even find documentation on this. Talk about a brain %$#@.

    Thanks

Latest Posts

Collapse

Topics Statistics Last Post
Started by Stanfillirenfro, Today, 05:35 AM
0 responses
2 views
0 likes
Last Post Stanfillirenfro  
Started by Taddypole, Yesterday, 12:56 PM
2 responses
9 views
0 likes
Last Post Taddypole  
Started by iq200, Today, 04:26 AM
0 responses
4 views
0 likes
Last Post iq200
by iq200
 
Started by Uregon, Today, 03:50 AM
0 responses
6 views
0 likes
Last Post Uregon
by Uregon
 
Started by eagleeye15, Today, 02:41 AM
0 responses
4 views
0 likes
Last Post eagleeye15  
Working...
X