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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      66 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      149 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      99 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      286 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X