Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Range Bars : SetStopLoss and SetProfitTarget not working as expected

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

    Range Bars : SetStopLoss and SetProfitTarget not working as expected

    I'm working on the CL startegy with 6 Range bars.
    Initialize routine is as follows :


    protected override void Initialize()
    {
    SetProfitTarget("LongPosition", CalculationMode.Ticks, 5);
    SetStopLoss("LongPosition", CalculationMode.Ticks, 7, false);

    SetProfitTarget("ShortPosition", CalculationMode.Ticks, 5);
    SetStopLoss("ShortPosition", CalculationMode.Ticks, 7, false);

    CalculateOnBarClose = false;
    }

    When a signal is true, I get in a position, however, SetProfitTarget and SetStopLoss is not getting me out!! CL moves 7 ticks is matter of seconds or minutes but I keep staying in the trade. What am I doing wrong?

    #2
    Hello afshinmoshrefi,
    Please send the log and trace files to support[AT]ninjatrader[DOT]com so that I can take a look of what might has happened.
    • You will find the log file in the Documents > NinjaTrader 7 > Log folder.
    • The log file will be named "log.YYYYMMDD.txt"

    • You will find the trace file in the Documents > NinjaTrader 7 > Trace folder.
    • he trace file will be named "trace.YYYYMMDD.txt"



    Please append Attn:Joydeep in the subject line of the email and give a reference of this thread in the body of the email.

    I look forward to assisting you further.
    JoydeepNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    25 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    115 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    69 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    225 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    411 views
    0 likes
    Last Post CaptainJack  
    Working...
    X