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 argusthome, 03-08-2026, 10:06 AM
    0 responses
    74 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    45 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    26 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    32 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    62 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X