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 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