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

Strategy exit

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

    Strategy exit

    Hello,
    please, know correct this syntax to exit from a long position strategy:

    else if (Close[0] < stopLoss)
    ExitLong();

    Note: the stop loss is a variable that I have said so:

    private double stopLoss = 1.3275 (example);

    Thanks
    germano

    #2
    germano,

    What exactly are you trying to do? Right now you have it exit your long position when the closing price is below your stop price.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Josh,

      I have solved the problem.
      However, thank you for your answer.

      germano

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by somethingcomplex, Today, 10:36 PM
      0 responses
      3 views
      0 likes
      Last Post somethingcomplex  
      Started by sofortune, Yesterday, 10:28 AM
      5 responses
      22 views
      0 likes
      Last Post sofortune  
      Started by ETFVoyageur, Today, 10:13 PM
      0 responses
      5 views
      0 likes
      Last Post ETFVoyageur  
      Started by guyonabuffalo, Today, 10:01 PM
      0 responses
      2 views
      0 likes
      Last Post guyonabuffalo  
      Started by cre8able, 05-09-2024, 09:15 PM
      3 responses
      21 views
      0 likes
      Last Post cre8able  
      Working...
      X