Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi time frame - how to add a ratio?

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

    Multi time frame - how to add a ratio?

    Does anybody know how to add the ratio between to instruments, rather than a single instrument when working in MTF?

    NT tutorial is very useful, but only does examples to add a single instrument, for example AAPL, what I would like to add AAPL/MSFT (ratio between Apple and Microsift), would this be possible, and if yes how do I do it?

    Thanks

    #2
    Hello sburtt,

    Thank you for your post.

    There is no method to call two instruments' ratio into your code similar to Add().

    You would need to add both instruments into your code and then calculate the ratio within your indicator or strategy.

    If you are looking for an example of using data from two instruments you can find a Spread indicator that plots the spread of two instruments at the following link: http://www.ninjatrader.com/support/f...d=4&linkid=512

    Please let me know if I may be of further assistance.

    Comment


      #3
      Originally posted by NinjaTrader_PatrickH View Post
      Hello sburtt,

      Thank you for your post.

      There is no method to call two instruments' ratio into your code similar to Add().

      You would need to add both instruments into your code and then calculate the ratio within your indicator or strategy.

      If you are looking for an example of using data from two instruments you can find a Spread indicator that plots the spread of two instruments at the following link: http://www.ninjatrader.com/support/f...d=4&linkid=512

      Please let me know if I may be of further assistance.
      ok that makes sense, I will build the ratio within the strategy, thanks

      Comment


        #4
        Originally posted by sburtt View Post
        Does anybody know how to add the ratio between to instruments, rather than a single instrument when working in MTF?

        NT tutorial is very useful, but only does examples to add a single instrument, for example AAPL, what I would like to add AAPL/MSFT (ratio between Apple and Microsift), would this be possible, and if yes how do I do it?

        Thanks
        Yes this is what I want also.

        Today I have some more time to study and, for me, this is very important for take some tests.
        Also, why not only divide two or more instruments?

        It is not even possible?

        Comment


          #5
          Hello jmagaia,

          Thank you for your post.

          You can divide multiple instruments if you wish. The SpreadCandlesticks indicator is a great example of plotting the spread of two instruments and you can use this as an example to create more spread indicators.

          For information on using multiple instruments in your code please visit the following link: http://www.ninjatrader.com/support/h...nstruments.htm

          Please let me know if you have any questions.

          Comment


            #6
            Thanks for the message, but if I understand, I have programme...and I am not in this stage. I expect, Ihope achieve ...

            I thought it possible more simple. Like stockcharts simple divide...
            like ES/Gold etc...
            Other example, it is easy, in Ninja plot several charts in same window... so why it is not possible for ratios, divide prices...

            It is possible someone develop such improvement? Or someone in this forum, with experience programme?

            Thanks

            Comment


              #7
              Originally posted by jmagaia View Post
              Thanks for the message, but if I understand, I have programme...and I am not in this stage. I expect, Ihope achieve ...

              I thought it possible more simple. Like stockcharts simple divide...
              like ES/Gold etc...
              Other example, it is easy, in Ninja plot several charts in same window... so why it is not possible for ratios, divide prices...

              It is possible someone develop such improvement? Or someone in this forum, with experience programme?

              Thanks
              Like this?

              Comment


                #8
                Originally posted by sledge View Post
                No.

                Like this:


                This a ratio between this ES e-mini ^ESM13
                divide for this futures gold ^GCM13

                Comment


                  #9
                  Originally posted by jmagaia View Post
                  No.

                  Like this:


                  This a ratio between this ES e-mini ^ESM13
                  divide for this futures gold ^GCM13
                  This should work?

                  Comment


                    #10
                    Hello jmagia,

                    Thank you for your response.

                    You can create custom plots from multiple instruments using custom programming in NinjaScript.

                    If you would like to take on learning NinjaScript on your own, we have a fully documented help guide which will help you get started with Ninja Script. You will find language references to all of the methods and functions you will be using. You will also see a tutorial section which will help you create your first indicator and get you started with some of these concepts.

                    A link to our Help Guide can be found below: http://www.ninjatrader.com/support/h...stribution.htm

                    I am also linking you to the Educational Resources section of the Help Guide to help you get started with NinjaScript: http://www.ninjatrader.com/support/h..._resources.htm

                    You will fine Reference Samples online as well as some Tips and Tricks for both indicators and strategies:
                    Click here to see our NinjaScript Reference Samples
                    Click here to see our NinjaScript Tips

                    These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.

                    There is a also a growing library of user submitted custom indicators (100+) that can be downloaded from our support form. Please look in the NinjaScript File Sharing section of our support forum as you may find what you are looking for there.

                    We have Premium Paid Educational events where you will join a NinjaScript expert for a pair of 6-8 hour long intensive courses designed to provide you with an in depth look at programming indicators and automated strategies through the use of NinjaScript: http://www.ninjatrader.com/PremiumEducation.php

                    If you have limited time or programming capabilities, you can discuss your requirements with any of our certified NinjaScript consultants.
                    Click here for a list of certified NinjaScript Consultants

                    I will forward your suggestion for these items as options on charts to our development team.

                    Comment


                      #11
                      Originally posted by sledge View Post
                      Thanks.
                      That's it..

                      I managed to do everything except the bollinger. I try choose Bollinger and after Ratio... but no be able. But the important with this Ratio I resolve the big problem.

                      I know that i try some abuse...but is possible modified this indicator and put a ratio more 2 instruments? For example be 3 or 4 ... type 1instrument/2instrument/3instrument ...

                      But, thanks again sledge. This resolve most my problems.

                      NinjaTrader_PatrickH, thanks for sugestions to learn the scripts... I expect to acchieve, but moment I try use base indicators in Ninja.
                      Last edited by jmagaia; 05-26-2013, 11:56 AM.

                      Comment


                        #12
                        Hello jmagaia,

                        Thank you for your suggestion on how we can improve our product. It has been inserted into our tracking system with the unique ID # 404.

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                        0 responses
                        649 views
                        0 likes
                        Last Post Geovanny Suaza  
                        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                        0 responses
                        370 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by Mindset, 02-09-2026, 11:44 AM
                        0 responses
                        109 views
                        0 likes
                        Last Post Mindset
                        by Mindset
                         
                        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                        0 responses
                        574 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by RFrosty, 01-28-2026, 06:49 PM
                        0 responses
                        576 views
                        1 like
                        Last Post RFrosty
                        by RFrosty
                         
                        Working...
                        X