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

Data Transfer between Strategies

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

    #16
    Ralph thanks,
    If I understand you correctly, if I want all my strategies with different names to share data btw them, I can lieve the "Member search pattern" empty or put in "a" for all strategies?

    Baruch

    Comment


      #17
      Hello Baruch,

      Sorry, that was a mistake from my side. What I ment was the following: Your strategies could share a single member list (the list) or even access separated member lists (a list).

      An empty search pattern detects nothing (or perhaps strategies without a name, I am not sure). If you would like to share a single member list among all strategies, I would apply a * as regular expression, this pattern should accept anything.

      Regards
      Ralph

      Comment


        #18
        Hello Ralph,
        Thanks a lot for helping me.
        I still have problems.
        1. I can not make 2 strategy instances to be together in a list.
        2. When I did make them together, only the last instance gave correct results.

        I attach a test strategy.
        I put it on 2 charts with different instruments and 1 min time frame.

        Can you see whats wrong please.

        Regards,
        Baruch
        Attached Files

        Comment


          #19
          Hello Baruch,

          I gave you an incorrect recommendation regarding a "universal" regular expression, because * is an illegal regex. The correct one to catch every possible strategy name is: .*

          I re-installed the test implementation from this thread (DataTransfer2) on my computer and instantiated 2 strategies on a single chart:
          I named the first one Test1 and applied the member search pattern .*
          I named the second one Test2 and applied the member search pattern .*

          Look at the log result attached below. It behaves like expected. The first strategy is instantated first and starts its member group including Test1 (itself). Then the second strategy is instantiated and is added to the member group of the first strategy. And at least the second strategy creates its own member group containing both strategies.

          If you would be able to replicate that on your side, that should be a good starting point for your own implementation.

          Regards
          Ralph
          Attached Files

          Comment


            #20
            Thanks Ralph,
            I think its working now.

            Baruch

            Comment


              #21
              Thanks everybody for sharing great infomation

              Comment


                #22
                Thank you again Ralph

                Ralph,

                Just wanted to take the time to thank you again for this helpful tutorial. Always appreciate your contributions.

                r2kTrader

                Comment


                  #23
                  Thank you for all explorations.
                  I am thinking about sharing Strategy data for all Indicators within.
                  like a shot in dark,have you any suggestion for me,it is so hard!

                  Comment


                    #24
                    Hello maorachow,


                    there are no such restrictions. The class implementations use their own namespace and are independent from the Indicator- and Strategy namespace. You can put the code somewhere, you always need to refer to that namespace in your application.


                    The example at the beginning of this thread transfers data between strategies. But a transfer between strategies and indicators follows the same rules, there is no difference.


                    Regards
                    Ralph
                    Last edited by Ralph; 04-14-2012, 02:30 AM.

                    Comment


                      #25
                      Thank you Ralph,
                      Glad to hear Class solution.
                      I am delving into the transfer2.cs code.
                      Let's discuss the question later.

                      Comment


                        #26
                        Great post! Thanks
                        mcosta72
                        NinjaTrader Ecosystem Vendor - Quant-Wise

                        Comment


                          #27
                          well explained topic.

                          Comment


                            #28
                            thanks for sharing this information

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by BarzTrading, Today, 07:25 AM
                            0 responses
                            1 view
                            0 likes
                            Last Post BarzTrading  
                            Started by i019945nj, 12-14-2023, 06:41 AM
                            5 responses
                            64 views
                            0 likes
                            Last Post i019945nj  
                            Started by ruudawakening, Today, 12:58 AM
                            1 response
                            8 views
                            0 likes
                            Last Post NinjaTrader_Jesse  
                            Started by thread, Yesterday, 11:58 PM
                            1 response
                            8 views
                            0 likes
                            Last Post NinjaTrader_ChelseaB  
                            Started by stafe, Yesterday, 08:34 PM
                            1 response
                            16 views
                            0 likes
                            Last Post NinjaTrader_ChelseaB  
                            Working...
                            X