Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Resetting values?

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

    Resetting values?

    How do I reset a stored value after each entree?

    #2
    relogical, you could for example check your position in OnBarUpdate() or OnPositionUpdate() and then reset your tracking variable to a default value.

    http://www.ninjatrader.com/support/h...etposition.htm

    Another approach would be doing that directly in the condition then where the entry triggered...

    if (someCondition)
    {
    EnterLong()
    trackingVar = 0;
    }
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by t.kelly4149, Today, 05:36 PM
    1 response
    8 views
    0 likes
    Last Post bltdavid  
    Started by SilverSurfer1, Today, 06:29 PM
    0 responses
    17 views
    0 likes
    Last Post SilverSurfer1  
    Started by trader3000a, Today, 01:06 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by marcus2300, Today, 11:45 AM
    3 responses
    31 views
    0 likes
    Last Post marcus2300  
    Started by pel11, Today, 11:06 AM
    0 responses
    13 views
    0 likes
    Last Post pel11
    by pel11
     
    Working...
    X