Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

how to have my script automatically disable

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

    how to have my script automatically disable

    I'm writing a script in which I wish the strategy to disable itself upon execution of the first losing trade. How do I code this instruction into my script.

    I have stop losses set in the Initialize() section, and I'm assuming that there is some value or method that i can call to let me know when the stop loss is executed. I'm also assuming that to disable it would be the disable() method.. how would i go about this?

    thanks in advance!

    #2
    Hello,

    Welcome to the NinjaTrader support forum.

    I beleive I just answered this question via email. In this case no need to post to multiople locations one is fine.

    PLease see this sample on how to stop a strategy after a set of losses. In your case would only be one loss.

    http://www.ninjatrader.com/support/forum/showthread.php?t=19289

    Let me know if I can be of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by kujista, Today, 05:44 AM
    0 responses
    5 views
    0 likes
    Last Post kujista
    by kujista
     
    Started by ZenCortexCLICK, Today, 04:58 AM
    0 responses
    5 views
    0 likes
    Last Post ZenCortexCLICK  
    Started by sidlercom80, 10-28-2023, 08:49 AM
    172 responses
    2,281 views
    0 likes
    Last Post sidlercom80  
    Started by Irukandji, Yesterday, 02:53 AM
    2 responses
    18 views
    0 likes
    Last Post Irukandji  
    Started by adeelshahzad, Today, 03:54 AM
    0 responses
    8 views
    0 likes
    Last Post adeelshahzad  
    Working...
    X