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

Synching to Account with Multi-instrument strategy

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

    Synching to Account with Multi-instrument strategy

    Hello- I created a multi-instrument strategy and want to better understand sycncing the strategy to my account. For my entry orders I'm using the following structure: entryOrder = EnterLong(BarsInProgress, shares1[BarsInProgress],"BuyMkt1"+BarsInProgress); For exiting this particular order I'm using the following code: entryOrder = ExitLong("BuyMkt1"+BarsInProgress); I am declaring the following in my variables section: private IOrder[] activeOrders = new IOrder[100];

    So for syncing purposes, how exactly does the strategy identify or keep track of the exact market order entered in this case? Does it work by only remembering the tag "BuyMkt1"+BarsInProgress which it uses to associate it with other order parameters Market order, time, etc? If you notice, the exit statement doesn't indicate how many shares to sell but I verified from strategy backtest that it is correctly selling the quantity = shares1[BarsInProgress] so I'm thinking it must be remembering it only by the tag "BuyMkt1"+BarsInProgress".

    2nd question: If I make a benign tweak in my strategy -say adding print statements or graphics- later in time after I deploy and sync, will the strategy forget the shares that were previously bought and mess everything up?

    Thank you
    Last edited by ciro1963; 02-02-2019, 01:31 PM.

    #2
    Hello ciro1963,

    Just to confirm, are you referring to syncing with the account position?

    Below is a public link to the help guide.



    If you are asking about resuming a strategy when re-enabling and matching previously placed orders by that instance of the strategy you can read more about this here.

    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by magnatauren, 08-15-2020, 02:12 PM
    5 responses
    206 views
    0 likes
    Last Post RaddiFX
    by RaddiFX
     
    Started by rene69851, 05-02-2024, 03:25 PM
    1 response
    21 views
    0 likes
    Last Post rene69851  
    Started by ETFVoyageur, Yesterday, 07:05 PM
    5 responses
    45 views
    0 likes
    Last Post ETFVoyageur  
    Started by jpeep, 08-16-2020, 08:31 AM
    13 responses
    487 views
    0 likes
    Last Post notenufftime  
    Started by realblubb, 04-28-2024, 09:28 AM
    2 responses
    32 views
    0 likes
    Last Post realblubb  
    Working...
    X