Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Stop Trading after certain amount of losses

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

    Stop Trading after certain amount of losses

    Is there a way that trading can stop for the remainder of a month if a certain amount of losses in that month is attained? I cannot find any commands regarding months. Thanks

    #2
    Hello Chris001,

    Thank you for your post.

    You would need to track performance and then use Time[0].Month to track the month.

    For information on Performance in NinjaScript please visit the following link: http://www.ninjatrader.com/support/h...erformance.htm

    For information on Time please visit the following link: http://www.ninjatrader.com/support/h...s/nt7/time.htm

    Please let me know if I may be of further assistance.

    Comment


      #3
      Thank you. I think I need a little more help. I think I will need to know how to track the first day of the month, how can that be done?

      Comment


        #4
        I just had an idea to try out tomorrow. Hopefully it's on the right track

        Code:
        if (Bars.FirstOfSession
        && Time[0].Month != Time[1].Month)
        {do stuff}

        Comment


          #5
          Looks good Chris001!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          627 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          359 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          105 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          562 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          568 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X