Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Sequence of operations in NT

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

    Sequence of operations in NT

    Hi,

    I was wondering if there is any documentation regarding the sequence of operations of automated strategies.

    A little background info. I am running an automated system and enter long and shorts based on a candle close. These long / short triggers are entered based on specific IF statements in the OnBarUpdate statement.

    But, I've noticed that when an ExitLong or ExitShort or any order method is triggered, the following IF block where MarketPosition.Flat is checked is not triggered.

    So my question is, when does my MarketPosition actually become flat? Does the processing of orders happen AFTER or DURING the OnBarUpdate statements?

    #2
    siroki, that could be the case, since the position object would be updated in the OnPosition() update, which is guaranteed only then in your next OnBarUpdate().

    Comment


      #3
      Thanks for your prompt answer Bertrand, as always.

      Ok, that explains it then. I will work my way around it creating some variables.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by kinfxhk, 07-14-2026, 09:39 AM
      0 responses
      83 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 10:18 AM
      0 responses
      90 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 09:50 AM
      0 responses
      70 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 07:21 AM
      0 responses
      84 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-11-2026, 02:11 AM
      0 responses
      61 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Working...
      X