Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SetProfitTarget not working ... don't know why

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

    SetProfitTarget not working ... don't know why

    I've been working on this issue for 3 hours, maybe someone can help me.

    In my initialize, I included :
    SetProfitTarget(CalculationMode.Price, 2.5);

    and for some reason, it's not exiting my position when it reaches a 2.50 $ increase in price.

    I also tried : SetProfitTarget(CalculationMode.Percent, 1);

    nothing works...

    here is my ZIP. thank you
    Attached Files

    #2
    Hello louisecote12,

    Thank you for your post and welcome to the NinjaTrader Support Forum!

    If you want a value in currency you would use the following syntax: SetProfitTarget(2.5);
    Using CalculationMode.Price is an absolute price value on the scale. I am not sure why the CalculationMode.Percent with 1 would not work. Are there any errors in your Log tab of the NinjaTrader Control Center when attempting to run this strategy?

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    648 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    369 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    109 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    573 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    575 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X