• 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 indy73, Today, 04:42 PM
      0 responses
      9 views
      0 likes
      Last Post indy73
      by indy73
       
      Started by Italianforex, Today, 06:20 AM
      2 responses
      12 views
      0 likes
      Last Post gplatis
      by gplatis
       
      Started by alextrd, Today, 01:51 PM
      1 response
      13 views
      0 likes
      Last Post NinjaTrader_JoshG  
      Started by Boonfly8, Today, 12:10 PM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by NinjaTrader_PaulH, Today, 11:24 AM
      0 responses
      7 views
      0 likes
      Last Post NinjaTrader_PaulH  
      Working...
      X