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 GussJ, 03-04-2020, 03:11 PM
      11 responses
      3,221 views
      0 likes
      Last Post xiinteractive  
      Started by andrewtrades, Today, 04:57 PM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by chbruno, Today, 04:10 PM
      0 responses
      7 views
      0 likes
      Last Post chbruno
      by chbruno
       
      Started by josh18955, 03-25-2023, 11:16 AM
      6 responses
      438 views
      0 likes
      Last Post Delerium  
      Started by FAQtrader, Today, 03:35 PM
      0 responses
      9 views
      0 likes
      Last Post FAQtrader  
      Working...
      X