Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ratio Chart

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

    #16
    OK thanks Josh... but your link doesn't work. Where in the code do I place that "myDataSeries" declaration?

    Thanks
    Shawn

    Comment


      #17
      Shawn,

      The link should work. Please try this again: http://www.ninjatrader-support.com/H...taSeriesObject

      The requirements for how to declare it are listed in that article. If for whatever reason you can't get it to load you can look it up in your internal help guide. Bring up the Index page and search DataSeries and you will be able to find the DataSeries object article.
      Josh P.NinjaTrader Customer Service

      Comment


        #18
        thanks Josh, that works fine now... but why doesn't my indicator get updated with current live data. For that matter, my whole stock chart is not getting updated with todays data (Feb 1)... the last bar of data is from Friday. The chart is is not updating live, that's weird. It's a regular stock chart of stock CSX for the last 365 days - I'm using a InteractiveBrokers paper trading live realtime data feed and I'm also using the NT7 beta.

        Thanks
        Shawn

        Comment


          #19
          Please disregard last stupid message Josh - I was not connected to my data feed in NT7... duh.

          Thanks
          Shawn

          Comment


            #20
            Sorry Josh, one more thing please - for all previous days except the current day, my calcs from the "myDataSeries" appear to be bang on. Why would I be getting wrong results for just the current day (today)?

            Thanks
            Shawn

            Comment


              #21
              Shawn,

              You will have to debug your values to figure out what it is doing and where the calculated values are coming from. Please use Print() throughout your code.
              Josh P.NinjaTrader Customer Service

              Comment


                #22
                thanks Josh, I found the problem, sorry to bother you.

                Cheers
                Shawn

                Comment


                  #23
                  Here's an updated Ratio indicator which fixes a potential synchronization problem. Please let me know any issues or comments.

                  With this, and all multi-instrument indicators, currently you must add the secondary data series to the chart before applying the indicator. There are currently bugs in NT7 which will cause problems if an indicator refers to instrument data series which are not displayed on the chart.

                  The indicator's "Symbol2" parameter defaults to the secondary instrument displayed on the chart, so you don't need to enter the symbol again.

                  Update 4/7/10: An updated version of this indicator is now posted in the "Indicators" area:
                  http://www.ninjatrader-support2.com/...d=1&linkid=288
                  Last edited by kdoren; 04-07-2010, 03:22 AM. Reason: Removed Ratio.zip file, please see Indicators area for updated version

                  Comment


                    #24
                    Great kdoren, thanks for sharing :-)

                    Can we also make something which calculates composite value based on 3 symbols?

                    Comment


                      #25
                      Do you mean a 3-instrument "Spread", i.e. like my spread indicator but with 3 symbols? (I don't know how to do a 3-instrument ratio!)

                      Comment


                        #26
                        Originally posted by kdoren View Post
                        Do you mean a 3-instrument "Spread", i.e. like my spread indicator but with 3 symbols? (I don't know how to do a 3-instrument ratio!)
                        The calculation part is already separated in a method. Anyone with C# skill can put his own formula in that method. Say I want to plot SPX against ($SPX*$USD/$DJIA)... Just another indicator which has stub for calculation based on 3 instruments will do the trick...
                        Last edited by TraderSU; 02-08-2010, 04:24 PM.

                        Comment


                          #27
                          @TraderSU, attached is a 3-instrument spread indicator which you can use as a basis for building your own 3-instrument indicator. It's heavily commented, and is intended as a prototype to show how to use my synchronization methods to build simple multi-instrument indicators.

                          Later on I intend to make a similar prototype to show how to make more complex multi-instrument indicators (i.e. math across missing bars) but for now anyone who is interested can look at the code in my Correlation or Beta indicators.
                          Attached Files
                          Last edited by kdoren; 09-24-2010, 08:17 PM. Reason: Updated Spread3.zip file

                          Comment


                            #28
                            Originally posted by kdoren View Post
                            @TraderSU, attached is a 3-instrument spread indicator which you can use as a basis for building your own 3-instrument indicator. It's heavily commented, and is intended as a prototype to show how to use my synchronization methods to build simple multi-instrument indicators.

                            Later on I intend to make a similar prototype to show how to make more complex multi-instrument indicators (i.e. math across missing bars) but for now anyone who is interested can look at the code in my Correlation or Beta indicators.
                            Thanks a lot. You rock :-)

                            Comment


                              #29
                              Thanks for the new updated Ratio indicator KDoren.

                              Cheers
                              Shawn

                              Comment


                                #30
                                Ratio indicator not working

                                Kdoren

                                I tried your ratio indicator on Ninja 7 beta 10. I used the DJIA and YM 03-10. However every time I applied the indicator it crashed Ninja. I set up the two data series on the charts first as instructed. Any ideas?

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                636 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                366 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                107 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                                0 responses
                                568 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                571 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X