Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CalculateMode.Price problem

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

    CalculateMode.Price problem

    Hello there,

    I'm new to NT though I have some expirence in proggraming. I have a problem with CalculateMode.Price mode. When I have a certain condition filled I assign Variable0 to Upper and Variable1 to Lower line of Keltner Channel. Then I use SetProfitTarget(CalculateMode.Price, Variable0) and SetStopLoss (CalculateMode.Price, Variable1). However when I backtest the strategy it ignores all sl and tp.
    What can be an issue here?

    Thank you for help

    #2
    Hello mikhailov_ruslan,

    In what method are you calling SetStopLoss() and SetProfitTarget()?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello,

      Yeah, I got it. Thanks. I used it in Initialize() method, cause I thought that dynamic change of a stop means dynamic change of stop for one particular order and not changes from order to order.

      Thank you.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      65 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      41 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      23 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      26 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      52 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X