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

OCO to Trailing stop - How to?

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

    OCO to Trailing stop - How to?

    Hi,
    I enter 4 contracts with EnterLong/Short etc. Following that I set up an OCO pair with 4 contracts StopLoss, and 2 contracts target. Then as the first target gets filled, i set the second single contract target, and finally the third one. All works fine. Sometimes however, I'd like to trail the last single contract (depending on strategy outlook). I thought that if I just don't submit the final target's order, and keep adjusting the the existing stop loss it will work fine, but somehow it doesn't.
    I can adjust the stop loss while the orders are in pair (take profit is on the market with stop loss), but if I don't submit the final take profit order, stop loss does not want to adjust.
    Could you please let me know what is the best way to work with this scenario? Do I need to cancel the existing stoploss and setup another? or is there some other way?

    Cheers,

    Roman

    #2
    Hi again...

    I've worked it out, and also had a tiny bug ">" facing the wrong way...

    Now, all is working fine, but is there a smart/quick way of doing it?

    Thanks in advance


    Roman

    Comment


      #3
      Roman,

      Glad you got it worked out. Unfortunately there is no quick way to do this. To scale-out you will need to scale-in.
      Josh P.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Tin34, Today, 03:30 AM
      1 response
      6 views
      0 likes
      Last Post brucerobinson  
      Started by ETFVoyageur, Today, 12:52 AM
      1 response
      10 views
      0 likes
      Last Post Leeroy_Jenkins  
      Started by lollers, Today, 03:26 AM
      0 responses
      8 views
      0 likes
      Last Post lollers
      by lollers
       
      Started by aliyahany, Today, 03:16 AM
      0 responses
      1 view
      0 likes
      Last Post aliyahany  
      Started by mariajvillarrealr, Today, 02:57 AM
      0 responses
      1 view
      0 likes
      Last Post mariajvillarrealr  
      Working...
      X