Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exiting position on first down tick

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

    Exiting position on first down tick

    I'm new to programming in Ninjascript, and I'm trying to implement a strategy that involves exiting the position on the first tick that moves against me. Does anyone know how to test for this condition?

    I've found OnBarUpdate, but it seems to test for bars rather than ticks. The help facility says, "This is the method where all of your strategy or indicator core calculation logic should be contained," so I think this is what I need.

    Do I need to turn off "evaluate on bar close" so I can isolate a single tick?

    Perhaps I need to use a training stop for this?

    Thanks.

    Eric

    #2
    Hello,

    Set CalculateOnBarClose to false and see if that helps:
    DenNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by frslvr, 04-11-2024, 07:26 AM
    9 responses
    123 views
    1 like
    Last Post caryc123  
    Started by rocketman7, Today, 09:41 AM
    4 responses
    16 views
    0 likes
    Last Post rocketman7  
    Started by selu72, Today, 02:01 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_Zachary  
    Started by WHICKED, Today, 02:02 PM
    2 responses
    16 views
    0 likes
    Last Post WHICKED
    by WHICKED
     
    Started by f.saeidi, Today, 12:14 PM
    8 responses
    21 views
    0 likes
    Last Post f.saeidi  
    Working...
    X