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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    328 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    210 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    196 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    285 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    241 views
    0 likes
    Last Post CarlTrading  
    Working...
    X