Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to run 2 Algos with the same real account?

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

    How to run 2 Algos with the same real account?

    Hi Ninjas,

    I have 2 Algos with the best backtest. Each one has a different Range Bar period. Before coming here, I tried put them to work together in the same code, using Add() and its: closes[1][0], opens[1][0]...etc. I must got something wrong because the results are non-sense, maybe with more debuggs I could find the error. But I was wondering later, if NT might have such capability working with two codes. I'm sure this request has been done before, but I'd like to set all key details in my case.

    This is the set of features:

    - NT version: 7.0.1000.15

    - IB TWS version: 9.38.1.e April-22

    - The Algos run different range bar periods

    - Each one of the Algos has custom methods declared within codes

    Given those, I wonder:

    - How can I run two Algos at the same real money account in order to optimize my trading?
    - How should the configuration be in the options field ?
    - Must I sync strategy and account positions?
    - Is reliable technically to have 2 Algos working simultaneously ? or have you been report several issues about it?

    I really need to dip into this to strength my platform, therefore your help will be highly appreciated as always.
    Last edited by pstrusi; 09-15-2013, 08:40 AM.

    #2
    It's really pretty simple. Personally, I prefer to run all my strategies from charts, so I have the visual input (as opposed to running only from the strategy tab).

    So, to answer your question the way I do it, simply set up a different chart for each strategy and run one strategy in one chart and the other strategy in the other chart. Ninja will nicely handle variations in positions and keep track of things accurately. For example, let's say strategy A goes long and your account is then long. Then, strategy B goes short. Ninja will send the sell order to the broker so you'd be flat with the broker, but strategy A would still be long (in a virtual sense) and strategy B would still be short (in a virtual sense).

    Hope that helps!

    Comment


      #3
      Thank you for your response coolmos.

      I always run my algo from chart to have a better view about what's happening, and always with synced accounts. I imagine that working with two Algos need then to have accounts non-synced in order to have different strategies and account positions working simultaneously.

      I've done this request, cause I watch that Algos's results help to compensate each other, but whenever I coded and ran together, the results that I got weren't as simple as the sum of separated results, totally different. I've been debugging this issue but still not resolved.

      Thanks for your help, and whenever I got this ready, I´ll post it.

      Regards
      Last edited by pstrusi; 09-15-2013, 03:14 PM.

      Comment


        #4
        Ninjas,

        I'll be testing under simulation, working with two different strategies in different charts as suggested by a senior member. Few minutes ago I began to do it and it appears to go smoothly. I tried today to code these two different strategies in just one code, but I must have something wrong that the results that came out, have no sense,comparing to each one of those algo's results by separated.

        So, my question:
        In your experience, the best way to deal with these subject, is simply running algos by separated but simultaneously? or is it worth to code them in just one code ? ( i mean avoiding any issue with the other way to work )

        I'm looking forward for your answer.

        Thanks for your help

        Comment


          #5
          Hello pstrusi,

          Thank you for your post.
          How can I run two Algos at the same real money account in order to optimize my trading?
          As coolmoss suggested you can run two separate strategies to achieve this.
          How should the configuration be in the options field?
          Must I sync strategy and account positions?
          Syncing the strategy and account positions is still an item that you must focus on for your preferences for each strategy running. For information on syncing account position please visit the following link: http://www.ninjatrader.com/support/h..._positions.htm
          Is reliable technically to have 2 Algos working simultaneously ? or have you been report several issues about it?
          Within the same strategy and separately in two strategies running two algos on the same instrument will work in NinjaTrader.
          In your experience, the best way to deal with these subject, is simply running algos by separated but simultaneously? or is it worth to code them in just one code ? ( i mean avoiding any issue with the other way to work )
          This is going to be a preference item, if you wish to have all logic and code in one strategy then you can do so.

          If you are running into items with two algos in one strategy I recommend reviewing the information at the following link for multiple time frames in your strategy and ensuring all bars in progress indexes are correct: http://www.ninjatrader.com/support/h...nstruments.htm

          Please let me know if you have any questions.

          Comment


            #6
            Hi Patrick, thanks for your response.

            I have clear now all points that you called but one: if I understand well, working with two different strategies-algos, each one in its chart, it's expected to have different strategies or virtual positions at the same time, which it's played in your real account as Flat or the double of your original individual position; having in mind this feature, what do you mean by:

            Syncing the strategy and account positions is still an item that you must focus on for your preferences for each strategy running. For information on syncing account position please visit the following link: http://www.ninjatrader.com/support/h..._positions.htm
            If I sync accounts and suddenly Algos have different strategies, how will NT solve this conflict between them and my real account ?
            Last edited by pstrusi; 09-16-2013, 12:40 AM.

            Comment


              #7
              Hello,

              Thank you for your response.

              If the sync is to be done on both strategies the strategies will sync the account on start up of the strategy but not after start up. Please be aware that these options will only help you sync your Account Position to your Strategy Position once on startup. These options will not guarantee your Account Position remains in sync afterwards. Any active orders you may have had on your account prior to strategy start that was not generated by your strategy would not have been cancelled on start and can lead to your Account Position being out of sync from your Strategy Position. Placing manual trades or running multiple strategies on the same instrument can also lead to your Account Position being out of sync from your Strategy Position.

              Please let me know if you have any questions.

              Comment


                #8
                This means thenif you have two strategies working together, the logic due choice ( once trading time has begun ) is to have your strategies and account non-synced.

                Anyway I´ll try to code 'em together once I have issues solved

                Thanks for your attention

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by warreng86, 11-10-2020, 02:04 PM
                7 responses
                1,360 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Started by Perr0Grande, Today, 08:16 PM
                0 responses
                5 views
                0 likes
                Last Post Perr0Grande  
                Started by elderan, Today, 08:03 PM
                0 responses
                9 views
                0 likes
                Last Post elderan
                by elderan
                 
                Started by algospoke, Today, 06:40 PM
                0 responses
                10 views
                0 likes
                Last Post algospoke  
                Started by maybeimnotrader, Today, 05:46 PM
                0 responses
                14 views
                0 likes
                Last Post maybeimnotrader  
                Working...
                X