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

How to split an automated order into single lots

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

    How to split an automated order into single lots

    Hi,

    So lets say I have a 2 target strategy that is 2 lot size, first target is 10 ticks, second target is 20 ticks, stop is 10 ticks

    I achieve the 10 tick target with 1 lot off, then decide to add 1 lot to my position at some point before the 20 tick target is hit.

    Now automatically I would have a 2lot stop and 2lot target, how do I split up those orders in the quickest way? Particularly on the stop, is there a way to break up that 2 lot stop into two separate 1 lot stops (say 1 at 10ticks from the original entry and the 2nd 8 ticks from its own entry point)? Or alternatively if I want the add to have a target of 30 ticks whilst the original stayed at 20. (obviously which order is the add and the original doesn't matter at all, just emphasizing that they were triggered at different times)


    What is seeming to happen is when I add, both the original position and the add has the same target and stop, consolidating the 2 orders. The problem I'm having is I want those positions to have individual stops and I don't want to have to cancel the current stop order to manually replace 2 stops. I trade fast paced conditions so the less I have to do manually the better and I never want to be in a no-stop position. What should I do?
    Last edited by GoldLinx; 11-09-2019, 06:56 PM.

    #2
    Hi GoldLinx, thanks for your note.

    Depending on the method being used to set the stop and target, the SetStopLoss and SetProfitTarget methods can take a "fromEntrySignal" string. If you give an order "SignalName1" and the stop and target also contain "SignalName1" then the stop and target prices will be unique to that order. These stack together so you can have multiple calls to SetStopLoss and SetProfitTarget, setting different signal names every time.

    Please let me know if this does not resolve your inquiry.
    Chris L.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by poplagelu, Today, 05:00 AM
    0 responses
    3 views
    0 likes
    Last Post poplagelu  
    Started by fx.practic, 10-15-2013, 12:53 AM
    5 responses
    5,407 views
    0 likes
    Last Post Bidder
    by Bidder
     
    Started by Shai Samuel, 07-02-2022, 02:46 PM
    4 responses
    98 views
    0 likes
    Last Post Bidder
    by Bidder
     
    Started by DJ888, Yesterday, 10:57 PM
    0 responses
    8 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by MacDad, 02-25-2024, 11:48 PM
    7 responses
    160 views
    0 likes
    Last Post loganjarosz123  
    Working...
    X