• 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 Bionian, Today, 02:47 PM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Kate  
      Started by RickB60, Today, 01:55 PM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_PaulH  
      Started by filopearson, Today, 01:18 PM
      6 responses
      11 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by kujista, Today, 12:28 PM
      3 responses
      14 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by mroberts_nos, Today, 11:47 AM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X