Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to activate a condition only once then disable it.

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

    How to activate a condition only once then disable it.

    Hello

    Looking for a code to once a buy/ sell signal triggered a buy or sell limit is sent and executed then at the conclusion of that trade the whole strategy is disabled. How do I go about programming this in ninja script. Any example logic or syntax I need to start with to accomplish this.I want this to happen automatically.

    Regards,
    George

    #2
    Hello George,

    Thank you for your post.

    You would need to track the position with Position.MarketPosition and then use Disable() to disable the strategy.

    For information on Position.MarketPosition please visit the following link: http://www.ninjatrader.com/support/h...etposition.htm

    For information on Disable() please visit the following link: http://www.ninjatrader.com/support/h...t7/disable.htm

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    21 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    120 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    175 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    92 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    134 views
    0 likes
    Last Post cmoran13  
    Working...
    X