Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Subscribe to OnPositionUpdate error

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

    Subscribe to OnPositionUpdate error

    Greetings,

    I get an error message "The name 'OnPositionUpdate' does not exist in the current context".
    account.ExecutionUpdate += OnExecutionUpdate;
    account.PositionUpdate += OnPositionUpdate;
    "OnExecutionUpdate" does not give the error and is working. What's the problem ?

    Thanks,

    Bruce

    #2
    Hello BGWTEX,

    Thank you for the question.

    Do you have a void method named OnPositionUpdate in your script? It sounds like you have one for OnExecutionUpdate, but may have missed or misspelled OnPositionUpdate.

    You would need a method like the following in your script:

    Code:
    private void OnPositionUpdate(object sender, PositionEventArgs e)
    {
    }

    I look forward to being of further assistance.

    Comment


      #3
      Hello NinjaTrader_Jesse,

      Thank you for the answer.

      "Do you have a void method named OnPositionUpdate in your script?"
      I do now, thank you again !

      Bruce

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      612 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      355 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      105 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      561 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      564 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X