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

Running same strategy across multiple accounts

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

    Running same strategy across multiple accounts

    Hello,

    I am currently running a strategy script through 3 different accounts, 3 different charts, 1 micro chart and 2 mini charts, but all the same instrument (aside from MNQ/NQ), but all running the same script applied on each chart. I have had no issues with doing this for the last 3 weeks but today had more variability between the micro and mini charts, and logs showed that some of my doubles (variables) within the code were being reset at different times.

    Per NinjaTrader's recommendations:
    1) Is it advisable to create duplicates of the script and run each copy on a different chart? Or perhaps only duplicate the script and run that separately on the MNQ chart and leave the NQ charts running the same strategy (applied individually to each chart/account)?
    2) If running strategies in different charts, is there a way to script so that the prints go to different output windows? If so, please share an example and also how many unique output windows are possible at any given time?

    Thanks,
    J


    #2
    Hello wisdomspoon,

    You can run the strategy as many times as you would like across different accounts, strategies are not going to interfere with each other on seperate accounts. If you are seeing differences in how the strategy is running you would have to use prints to find out what specifically was different in your logic to get a better idea of what caused that. Something as simple as enabling the strategies at different times could change their outcome and cause differences.

    There are only 2 output window tabs so you could only split 2 of the strategies prints up. I would suggest adding some unique identifier to the begging of the print so you can see which strategy printed the data or you can also have each strategy write to its own individual text file instead of printing.

    JesseNinjaTrader Customer Service

    Comment


      #3
      Hi Jesse,

      This response is not helpful. I'm already using prints to identify issues. There is no difference in logic between scripts/charts. The script has the same start time and is enabled before that start time.

      I'll ask again, can you provide an example of how to output to a different print window for a different script running at the same time?

      Thanks,
      J

      Comment


        #4
        Hello wisdomspoon,

        Using prints would be the only way to observe how your logic is working to know what's causing differences. Posting that you are seeing differences won't help to understand the problem because we cant test your script for you and observe the prints. We would have to recommend that you use prints and then make comparisons to make sure the strategies logically worked identically. Even if they work identically you may still see differences because you are using different accounts which may fill at different times. Its generally not expected that a strategy will work exactly identically when run multiple times, each strategy is its own instance which can have variance from other instances. Those differences can be amplified based on different use cases, for example if you use Tick series there is no expectation that the strategy should be identical because even 1 tick of data difference between them will cause differences that get larger and larger the longer it runs.

        The platform only has 2 output tabs, you can specify which output tab a script using by using the PrintTo property. https://ninjatrader.com/support/help...ghtsub=PrintTo


        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Haiasi, 04-25-2024, 06:53 PM
        2 responses
        17 views
        0 likes
        Last Post Massinisa  
        Started by Creamers, Today, 05:32 AM
        0 responses
        5 views
        0 likes
        Last Post Creamers  
        Started by Segwin, 05-07-2018, 02:15 PM
        12 responses
        1,786 views
        0 likes
        Last Post Leafcutter  
        Started by poplagelu, Today, 05:00 AM
        0 responses
        3 views
        0 likes
        Last Post poplagelu  
        Started by fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,407 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Working...
        X