• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Order + Chart Trader - Move stops etc..

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

    Strategy Order + Chart Trader - Move stops etc..

    Hello,

    I have a strategy that places stop and target orders once an order is executed. However, when i see the orders on the chart trader and I want to move them manually, the stop orders move back to where it's suppose to go based on bar close. What functions / order code should i be using so that I can move the orders once the strategy places them?
    For example, i want to move my target up based on what i see on the chart to keep locking in more profits but my strategy takes over and moves it back down.

    Do you have some sample code i can reference?

    #2
    Hello priceisking,

    Thanks for your inquiry.

    Using Set methods will update the stop loss in relation to bar updates, and calling order methods in OnBarUpdate will update that order back to the level with the code when the logic in OnBarUpdate reaches that order method.

    I have attached a modification of the SampleOnOrderUpdate strategy which can demonstrate how this goal can be achieved.

    SampleOnOrderUpdate - https://ninjatrader.com/support/help...and_onexec.htm

    Please let us know if we can be of further assistance.
    Attached Files
    JimNinjaTrader Customer Service

    Comment


      #3
      Thank you.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by lavalampmj, Today, 05:25 PM
      0 responses
      2 views
      0 likes
      Last Post lavalampmj  
      Started by Antares66, Today, 05:19 PM
      0 responses
      2 views
      0 likes
      Last Post Antares66  
      Started by jmneto, Today, 05:18 PM
      0 responses
      3 views
      0 likes
      Last Post jmneto
      by jmneto
       
      Started by Bobbyj78, Today, 02:21 PM
      2 responses
      12 views
      0 likes
      Last Post bltdavid  
      Started by EnveousColnago, Today, 02:10 PM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Ariana  
      Working...
      X