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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      118 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      166 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      85 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      130 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      88 views
      0 likes
      Last Post PaulMohn  
      Working...
      X