Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Long Recognition

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

    Strategy Long Recognition

    Is MarketPosition.Long triggered/active once your strategy places an EnterLongLimit/MIT or only after the order is filled?

    I had some strategy logic that looked to be triggered when the order was placed but before filled.

    Thanks

    #2
    Hello mlprice12,

    The Position will only be update once you are actually in a position. When you submit an order it will remain flat until that order has filled/position is changed.

    If you have some logic which happened in between the submission and position changing you likely will need to add additional logic to prevent that. In most cases you can control that by using a variable to know the order had already been submitted or in more advanced cases you may be able to use the OnOrderUpdate override to find the order and assign that to a variable. Knowing the order had been submitted can be used logically to prevent further submissions if the condition was still true.


    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    45 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    31 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X