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

Stop loss quantity is not updated after partial profit target execution

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

  • NinjaTrader_Jesse
    replied
    Hello akuntysh,

    I reviewed the updated case notes and it does appear this is expected how this currently works. Partially filled non OCO exit orders on simulator do not reduce quantity consistently with EntrySignal tied exits. You could try to monitor this yourself from OnExecutionUpdate and change the order if necessary in that situation. If you are unable to work around this please provide a specific example of the logic you used which demonstrates the problem and I will attach that to the case for development to review further.


    Please let me know if I may be of further assistance.


    Leave a comment:


  • akuntysh
    replied
    Hello,

    I would like to check if there is any update on this matter? Should the default behaviour of "Exit" methods be considered as non-OCO or this is something that is planned to be updated in upcoming NT versions?

    Best regards,
    Alexei

    Leave a comment:


  • razeus
    replied
    Originally posted by akuntysh View Post
    Hello,

    I am facing a problem with automated trading strategy, when stop loss quantity (lot), that is set using ExitLongStopMarket method, is not updated once partial profit target (that is set using ExitLongLimit method) is filled.

    The strategy works as follows:

    1. Upon some predefined conditions it enters long position using EnterLong method with quantity = 3
    2. In OnExecutionUpdate method once Long trade is executed, it sets stop loss and profit target using ExitLongStopMarket and ExitLongLimit. For ExitLongStopMarket quantity it uses 3, for ExitLongLimit it uses quantity 2.
    3. As I understand, on Profit Target execution, the strategy should automatically update Stop Loss quantity to remained amount of lots (to 1) since Managed Approach is used. However, this doesn't happen, and when stop loss is filled, it is filled with quantity = 3 and position becomes 2 short, instead of being flat.

    Is there anything I am missing with using ExitLongStopMarket and ExitLongLimit methods?

    Best regards,
    Alexei
    Hi, I have the same problem. It is very important fix it. Thanks.

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello akuntysh,

    I wanted to provide an update. Development is currently reviewing this situation further and assigned the tracking id of: 13774

    If any changes are made, they will be listed in the change log under this ID.

    I look forward to being of further assistance.

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello akuntysh,

    I am unaware of anything specific that may be the cause here, I will research this further and reply back here once I have explored this further.

    I look forward to being of further assistance.

    Leave a comment:


  • akuntysh
    replied
    Hi Jesse,

    Thank you for your reply!

    I am a NinjaTrader Vendor and I develop automated trading systems for my customers and in 99% of cases Exit methods update the quantity of the related orders automatically upon position change, but then once in a while I face a NinjaTrader platform instance, tat doesn't update orders (placed with Exit methods) automatically upon position update. Is there any specific setting within the platform itself that may be responsible for such behaviour?

    Best regards,
    Alexei

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello

    I believe in this case this is expected based on the order types being used. The Set methods do work as you have described because they are OCO but the general Exit methods would not automatically be updated/paired. You can watch for the fill of the target in OnExecutionUpdate and then issue a ChangeOrder to update the stop orders quantity as a solution.


    I look forward to being of further assistance.

    Leave a comment:


  • Stop loss quantity is not updated after partial profit target execution

    Hello,

    I am facing a problem with automated trading strategy, when stop loss quantity (lot), that is set using ExitLongStopMarket method, is not updated once partial profit target (that is set using ExitLongLimit method) is filled.

    The strategy works as follows:

    1. Upon some predefined conditions it enters long position using EnterLong method with quantity = 3
    2. In OnExecutionUpdate method once Long trade is executed, it sets stop loss and profit target using ExitLongStopMarket and ExitLongLimit. For ExitLongStopMarket quantity it uses 3, for ExitLongLimit it uses quantity 2.
    3. As I understand, on Profit Target execution, the strategy should automatically update Stop Loss quantity to remained amount of lots (to 1) since Managed Approach is used. However, this doesn't happen, and when stop loss is filled, it is filled with quantity = 3 and position becomes 2 short, instead of being flat.

    Is there anything I am missing with using ExitLongStopMarket and ExitLongLimit methods?

    Best regards,
    Alexei

Latest Posts

Collapse

Topics Statistics Last Post
Started by chbruno, Today, 04:10 PM
0 responses
3 views
0 likes
Last Post chbruno
by chbruno
 
Started by josh18955, 03-25-2023, 11:16 AM
6 responses
436 views
0 likes
Last Post Delerium  
Started by FAQtrader, Today, 03:35 PM
0 responses
6 views
0 likes
Last Post FAQtrader  
Started by rocketman7, Today, 09:41 AM
5 responses
19 views
0 likes
Last Post NinjaTrader_Jesse  
Started by frslvr, 04-11-2024, 07:26 AM
9 responses
127 views
1 like
Last Post caryc123  
Working...
X