Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarsSinceEntryExecution with AdoptAccountPosition

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

    #16
    Originally posted by koganam View Post
    As I needed to myself personally check this out, AdoptAccountPosition itself being MY suggestion in the first place, I finally stopped theorizing and wrote a strategy to test this out.

    That stratetgy is attached to this post, and as you will see when you look in the Output Window, it perfectly tracks the number of bars of the last exit. If your code is not doing so, then you have a different problem: there is nothing wrong with what I suggested.
    koganam,

    Thank you for the strategy - it indeed works on my end and is very similar to what I have. My issue as I've discovered was my interpretation of how OnExecutionUpdate() worked. I assumed it would catch the event of the strategy "adopting" my account position. I was wrong. It purely catches the event when the trade was originally placed, which brings me to where my issue was - my strategy was real-time only. Once I included historical data, it worked as you described. Thank you again.

    So for the past week I've been attempting to make AdoptAccountPosition work for my needs (strategy recognizes its strategy-generated position upon re-enable), but now am wondering if there is another way to achieve the same result. If you don't mind me asking koganam, which starting behavior do you use? I'm beginning to research and test the others, but would value any inputs you may have.

    Comment


      #17
      Originally posted by ak5745 View Post
      koganam,

      Thank you for the strategy - it indeed works on my end and is very similar to what I have. My issue as I've discovered was my interpretation of how OnExecutionUpdate() worked. I assumed it would catch the event of the strategy "adopting" my account position. I was wrong. It purely catches the event when the trade was originally placed, which brings me to where my issue was - my strategy was real-time only. Once I included historical data, it worked as you described. Thank you again.

      So for the past week I've been attempting to make AdoptAccountPosition work for my needs (strategy recognizes its strategy-generated position upon re-enable), but now am wondering if there is another way to achieve the same result. If you don't mind me asking koganam, which starting behavior do you use? I'm beginning to research and test the others, but would value any inputs you may have.
      I prefer to use AdoptAccountPosition at all times. That is why I suggested it as a NT8 facility in the first place.

      I did have some settings finagled in NT7, that approximated the ability to try to sync to the account position, with some manual intervention as necessary. So far AdoptAccountPosition seems to be everything that I had hoped for, but there is time yet left before we get to the release version. We shall have to wait and see what gives.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by judysamnt7, 03-13-2023, 09:11 AM
      4 responses
      59 views
      0 likes
      Last Post DynamicTest  
      Started by ScottWalsh, Today, 06:52 PM
      4 responses
      36 views
      0 likes
      Last Post ScottWalsh  
      Started by olisav57, Today, 07:39 PM
      0 responses
      7 views
      0 likes
      Last Post olisav57  
      Started by trilliantrader, Today, 03:01 PM
      2 responses
      22 views
      0 likes
      Last Post helpwanted  
      Started by cre8able, Today, 07:24 PM
      0 responses
      10 views
      0 likes
      Last Post cre8able  
      Working...
      X