Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

problem with profit target

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

    problem with profit target

    I have a simple strategy I made with the wizard, but when I backtest it, instead of adding the profit target to the entry price, it uses the target price as the exit price. I have no user defined inputs.
    The condition is HeikenAshi().HAClose[0]>HeikenAshi().HAClose[1] + 0.001
    The action is Enter Long(DefaultQuantity,"")
    The profit target is
    SetProfitTarget("",CalculationMode.Price, 0.001) There is no stop loss.
    I ran this on eur.usd with stock settings except I used a 30 min chart. I had 17 trades each with a profit of -99.92% and a cumulative profit of -100% When I checked the executions It would buy at 1.3116 and sell at .0010. When I looked at the chart, most of my entries should have exited at a profit. I must be doing something wrong. Any comments?

    #2
    Hello snotrag12,

    Welcome to the NinjaTrader Support Forums!

    When using SetProfitTarget() and using the CalculationMode.Price it will be an absolute price, so when it is set to "0.001" is going to set your Profit Target at that Price so that is why it is filled at "0.0010" price..

    If you wanted to have "0.0010" Profit you may want to use CalculationMode.Ticks as it will be a number of ticks away from your Entry Price. For example: "SetProfitTarget("". CalculationMode.Ticks, 10).

    This will put the Profit Target 10 ticks above your entry price or a price value of "0.0010".
    JCNinjaTrader Customer Service

    Comment


      #3
      Hi, JC
      Thanks for your help. It works much better that way!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      633 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      364 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      105 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      567 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      568 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X