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.
    https://ninjatrader.com/support/help..._positions.htm


    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.
    http://ninjatrader.com/support/forum...117#post463117
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by 309338, Today, 12:06 PM
    0 responses
    6 views
    0 likes
    Last Post 309338
    by 309338
     
    Started by AaronKoRn, Yesterday, 08:38 PM
    2 responses
    51 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by rocketstock, 08-05-2022, 09:36 PM
    2 responses
    75 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by ronyggg83, Yesterday, 03:48 PM
    4 responses
    52 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by preqc, 08-05-2022, 09:10 AM
    1 response
    36 views
    0 likes
    Last Post NinjaTrader_Jim  
    Working...
    X