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 carnitron, Today, 08:42 PM
    0 responses
    5 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Today, 07:51 PM
    0 responses
    6 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,974 views
    3 likes
    Last Post jhudas88  
    Started by rbeckmann05, Today, 06:48 PM
    0 responses
    8 views
    0 likes
    Last Post rbeckmann05  
    Started by rhyminkevin, Today, 04:58 PM
    4 responses
    58 views
    0 likes
    Last Post dp8282
    by dp8282
     
    Working...
    X