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 bortz, 11-06-2023, 08:04 AM
    47 responses
    1,603 views
    0 likes
    Last Post aligator  
    Started by jaybedreamin, Today, 05:56 PM
    0 responses
    8 views
    0 likes
    Last Post jaybedreamin  
    Started by DJ888, 04-16-2024, 06:09 PM
    6 responses
    18 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by Jon17, Today, 04:33 PM
    0 responses
    4 views
    0 likes
    Last Post Jon17
    by Jon17
     
    Started by Javierw.ok, Today, 04:12 PM
    0 responses
    12 views
    0 likes
    Last Post Javierw.ok  
    Working...
    X