Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

SetStopLoss() rejected

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

    SetStopLoss() rejected

    Hello, good morning!

    My method is in an buy order

    SetStopLoss () first
    SetProfitTarget () second in order
    And then EnterLong ()
    If the entry price was 3000
    My Profit was 3100
    And my StopLoss 2950
    If the price reaches 3050, I immediately move the StopLoss to 3001, this SetStopLoss () doesn't work, and sends this message "order submitted was ignored" in real time.

    With the strategy analyzer does not happen.

    Why?

    Thanks
    Mariano

    #2
    Hello mbcito,

    Is this the full message you are getting in the log for the ignore? If not can you select the warning and control + C to copy it then paste it here?

    Are you also seeing any rejection per your posts title or are you just seeing an ignore?

    Do you currently have TraceOrders enabled and are you seeing any other details in the NinjaScript output window?

    When using the analyzer you are using both the historical fill engine and historical data so this could be a difference between realtime and historical. I would need to know more about the ignore situation to better understand why that would have occurred.

    The general reasons a SetStopLoss might be ignored would be:

    Set() methods that generate orders to exit a position will be ignored if:

    •A position is open and an order submitted by an enter method (EnterLongLimit() for example) is active and the order is used to open a position in the opposite direction

    •A position is open and an order submitted by a non market order exit method (ExitLongLimit() for example) is active
    From the provided details I don't see that either of these would apply, can you check if your logic is otherwise running into one of these managed order handling rules?


    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by elderan, Today, 08:03 PM
    0 responses
    2 views
    0 likes
    Last Post elderan
    by elderan
     
    Started by algospoke, Today, 06:40 PM
    0 responses
    10 views
    0 likes
    Last Post algospoke  
    Started by maybeimnotrader, Today, 05:46 PM
    0 responses
    9 views
    0 likes
    Last Post maybeimnotrader  
    Started by quantismo, Today, 05:13 PM
    0 responses
    7 views
    0 likes
    Last Post quantismo  
    Started by AttiM, 02-14-2024, 05:20 PM
    8 responses
    169 views
    0 likes
    Last Post jeronymite  
    Working...
    X