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 lightsun47, Today, 03:51 PM
    0 responses
    4 views
    0 likes
    Last Post lightsun47  
    Started by 00nevest, Today, 02:27 PM
    1 response
    8 views
    0 likes
    Last Post 00nevest  
    Started by futtrader, 04-21-2024, 01:50 AM
    4 responses
    44 views
    0 likes
    Last Post futtrader  
    Started by Option Whisperer, Today, 09:55 AM
    1 response
    13 views
    0 likes
    Last Post bltdavid  
    Started by port119, Today, 02:43 PM
    0 responses
    8 views
    0 likes
    Last Post port119
    by port119
     
    Working...
    X