Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

auto vs manual positions

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

    auto vs manual positions

    I am making trades from my strategy and also manually

    Is there a way to have my strategy check for positions that are made manually?...or can it only check the status of positions originated by the strategy?

    I would like to check for any positions in the account so the strategy will not enter a new trade if I have a manual trade on.

    Would this code do the trick for instance?

    protected override void OnPositionUpdate(IPosition position)
    {
    if (position.MarketPosition == MarketPosition.Flat)
    {
    // Do something
    }
    }

    Thanks

    #2
    >> Is there a way to have my strategy check for positions that are made manually?
    Unfortunately not at this time. We'll consider improving the "sync strategy to live account" with NT7 though.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by MGHORBEL, Today, 06:25 AM
    1 response
    13 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by 1001111, Today, 01:35 AM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by tradingnasdaqprueba, Yesterday, 03:42 AM
    11 responses
    40 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by haas88, 03-21-2024, 02:22 AM
    14 responses
    177 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by Skifree, Yesterday, 11:41 PM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Working...
    X