• 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

Best way to create logic on current signal for open position(s)?

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

    Best way to create logic on current signal for open position(s)?

    Goal is to dynamically update my stop loss depending on time of day or other indicators. I'm running multiple entry signals and some signals could be used multiple times.


    #2
    This would be quite simple if something like 'Position' maintained the entry signal(s). I can accomplish this with OnOrderUpdate but hoping for a more of a minimalist way to accomplish this.

    Comment


      #3
      Hello Dragon989,

      Thank you for your note.

      This would be possible,

      You could see the following example which demonstrates how you can check in OnOrderUpdate if an order was filled by the name of "MyEntry". What you could do is set a bool to true if this order is filled. Then within OnBarUpdate you could check if this bool was true and if so adjust your stop/profit target. I'm not sure this approach is more minimalist but it would be one solution.

      https://ninjatrader.com/support/foru...tective-orders

      You also may be interested in,
      https://ninjatrader.com/support/foru...-orders?t=3222

      Please let us know if you need further assistance.
      Alan P.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Botan626, Today, 04:43 AM
      0 responses
      4 views
      0 likes
      Last Post Botan626  
      Started by xsgex, Yesterday, 09:46 PM
      0 responses
      3 views
      0 likes
      Last Post xsgex
      by xsgex
       
      Started by Steve L, Yesterday, 09:36 PM
      0 responses
      6 views
      0 likes
      Last Post Steve L
      by Steve L
       
      Started by krugman25, Yesterday, 09:34 PM
      0 responses
      4 views
      0 likes
      Last Post krugman25  
      Started by indy73, Yesterday, 04:42 PM
      0 responses
      15 views
      0 likes
      Last Post indy73
      by indy73
       
      Working...
      X