Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trouble with stop loss in strategy

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

    Trouble with stop loss in strategy

    Using the stategy wizard I am not able to use the stop loss I would like to use. Such as the low -2 ticks of the entry candle. I have tried to edit the ninja script but have had no success

    #2
    Hello Kudos,

    Thank you for your post.

    The syntax for this would be the following:
    Code:
    SetStopLoss(CalculationMode.Ticks, Low[0] - (2*TickSize));
    For information on SetStopLoss() please visit the following link: http://www.ninjatrader.com/support/h...etstoploss.htm
    For information on TickSize please visit the following link: http://www.ninjatrader.com/support/h...7/ticksize.htm

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

    Comment


      #3
      Patrick Thank you for your reply

      Testing the code in a very basic program it compiled just fine but it changed the program.. The test was a long only entry but now it goes short and long. The only part of code changed was the stop loss.

      SetProfitTarget(
      "long", CalculationMode.Ticks, 6);
      SetStopLoss(
      "long", CalculationMode.Ticks, 2, false);
      Is what the wizard compiled. I changed the script to

      SetProfitTarget("long", CalculationMode.Ticks, 6);
      SetStopLoss(
      "long", CalculationMode.Ticks, Low[0]-(2*TickSize), false);

      The basic test with the wizard was if

      low[0]<low[1]
      and
      close[0]>close[1]

      go long and then profit of 6 nd the the stop loss
      Thanks

      Comment


        #4
        Hello kudos,

        Thank you for your response.

        Did you change the strategy to now go short and long intentionally or the Stop Loss change has had this effect on the strategy?

        I look forward to your response.

        Comment


          #5
          The only thing I did was change the stop loss in the editor

          Comment


            #6
            Hello kudos,

            Thank you for your response.

            Can you attach your strategy to your response so I may test this on my end?

            I look forward to your response.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            105 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            53 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            36 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            38 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            74 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X