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

Switching from stop to trailing

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

    Switching from stop to trailing

    Hi Guys,

    Happy friday I'm looking at order management and I would like to code something useful to switch an order from stop order to trailing, any suggestion about it?



    Thanks in advance

    Marce

    #2
    imported post

    You can't switch between SetStopLoss() and SetTrailingStop() but you could simulate your trailing stop using the SetStopLoss() method.

    See the following post for code sample of how to dynamically change the price within OnBarUpdate() of the SetStopLoss() method.

    http://ninjatrader.mywowbb.com/forum20/1521.html

    Let me know if this does not make sense.

    Ray
    RayNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by swjake, Today, 12:04 PM
    0 responses
    1 view
    0 likes
    Last Post swjake
    by swjake
     
    Started by kevinenergy, Today, 12:01 PM
    0 responses
    2 views
    0 likes
    Last Post kevinenergy  
    Started by ETFVoyageur, 05-07-2024, 07:05 PM
    8 responses
    59 views
    0 likes
    Last Post ETFVoyageur  
    Started by Taddypole, 04-26-2024, 02:47 PM
    8 responses
    73 views
    0 likes
    Last Post eDanny
    by eDanny
     
    Started by quicksandatl, Today, 11:11 AM
    2 responses
    9 views
    0 likes
    Last Post quicksandatl  
    Working...
    X