Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Import Custom Indicator for a signal

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

    Import Custom Indicator for a signal

    Hi everybody, im new here so bear with me:

    I have a strategy that uses two indicators:
    IndicatorA: my own custom daily value N indicator, that signals buy when it reaches a certain numeric level. This is a daily data series that i have in csv format
    IndicatorB: standard macd crossover which i know how to program in ninja

    Question: How can i import the IndicatorA data (its daily only) and how can i include it in the strategy

    Thanks for your time,

    #2
    maybe this thread will provide some info on importing the CSV data:


    Once imported you should programm your strategy to use this data.
    Do you use the strategyWizard to create your strategy ?

    Comment


      #3
      Thanks for the swift reply,
      Yes i use strategy wizard, i hope its possible to manage the custom data within that, if not ill probably would need some extra help.

      Heres a sample of IndicatorA dataset:

      Comment


        #4
        unfortunately this is not possible from the strategy wizard.You'll have to do some serious coding using the C# StreamReader. see



        You first have to create an indicator to read-in the daily data from your CSV file and put it in a dataseries. Then you create a strategy which is using this indicator.

        Since you haven't got experience in C# coding (I assume, excuse me if I'm wrong) I think our best option would be to skip the whole CSV file readout part, and recreate the values of the CSV file in the NT strategy itself. Where do the values in the CVS come from ? How are they calculated ?

        Marco

        Comment


          #5
          Thats makes sense since the indicator has only a few buy signals year - how would you go about recreating the values in the NT strategy ?

          Thanks

          Comment


            #6
            What i mean is that your indicator probably does some internal calculations before outputting a value each day. What exactly are these calculations ? Or do you create these values manually ?

            Comment


              #7
              The values are already pre calculated from out prop. software, so theres no additional calculation necessary.
              Basically i have two columns:
              A: Date (daily)
              B: Value of the indicator (double not int.), ie. 0.86

              Thanks

              Comment


                #8
                But do you know what calculations this proprietary software makes ?
                What input(s) does it have, and how does it create the output value?

                Comment


                  #9
                  I know what you have in mind and it sadly does not work since we use a market internals computation that has several data inputs and that we can not recreate in NT.

                  The easyest way would be to somehow manually punch in the buy signals and let the backtest do the rest. Would that be possible ?

                  Comment


                    #10
                    JTramm, what you could consider doing as well would be creating a custom indicator for displaying the signals, where you would just manually add the dates and the signal state and then use this plot in your strategy conditions to backtest.
                    BertrandNinjaTrader Customer Service

                    Comment


                      #11
                      I know what you have in mind and it sadly does not work since we use a market internals computation that has several data inputs and that we can not recreate in NT.
                      If you know the calculations and inputs that are used, you can recreate everything in NT, you''ll be amazed what can be done. And since you use the word "we" I assume you exactly know the internals of this proprietary indicator

                      The easyest way would be to somehow manually punch in the buy signals and let the backtest do the rest. Would that be possible ?
                      That doesn't sound like a good idea to me.

                      I think you have 2 options on this one:
                      1) recreate the indicator in NT so you don't need to read the CSV file.
                      2) create the indicator in NT -using the C streamreader object - which reads the values from the csv-file into a dataseries.

                      #1 is by far the easiest solution if you can recreate the indicator in NT.

                      Again, if you have zero programming experience in NT - and I mean C-coding, not the strategy wizard - #2 in definitely not an option.
                      If you understand and can modify the code in the SampleStreamReaderNT7.zip from here http://www.ninjatrader.com/support/f...ead.php?t=3476 then you''ll be fine.Create an indicator that reads the CSV file, and use this indicator in the final strategy.

                      As a last resort, you also could contact a NT consultant to create the indicator that reads your csv file.


                      Marco

                      Comment


                        #12
                        Hi, Well try the first option, how can i add breadth inceces like JI5T.Z (Nas 100 net issues) to a strategy (we are Kinect paid subscribers)

                        Thanks so much dor the help

                        Comment


                          #13
                          Maybe a stupid question, but is Kinect a dataprovider ?
                          I suspect you'll need a seperate dataprovider like Kinetick.
                          I believe Kinetick supports the NAS100 net issues (JI5T.Z) instrument, does it ?
                          If you use additional symbols in your indicator, I advice you to first do research if the dataprovider has marketdata for each of them.

                          If you've got a dataprovider that is supported by NT, here's how to add your instrument, before you can use it in NT:

                          First step is to add the JI5T.Z instrument to NinjaTrader. To do this, open the instrument manager (Tools--> Instrument Manager) and in the "available master instruments" window click the NEW button to add a new instrument.
                          The instrument editor window will open. In the first blank window (Master Instrument) fill in the exact symbol name of the instrument as it is in your dataprovider, and click OK. Selct the instrument you just created in the list, and on the bottom click the arrow that points to the left to add the newly created instrument to the default instrument list.
                          Connect Ninjatrader to your dataprovider, and open a chart of the JI5T.Z.

                          Once you've got a chart of JI5T.Z running - all the symbols you use- with the next step will be to create a strategy.

                          Marco

                          Comment


                            #14
                            Hi, the provider is Kinetick, sorry for the typo(s).
                            What i meant was how can i apply for example a breadth indicator like ADD (Nyse advande/decline issues) to a strategy so that the buy signals would come from ADD but would be applied to another instrument ie. SPY. Basically how can i use one price stream as an "indicator" to be used in a strategy thats applied to another instrument. Thanks

                            Comment


                              #15
                              In that case you would run the strategy on a SPY chart (SPY is the primary dataseries) , and add the ADD instrument as a secondary dataseries.
                              Then programm the strategy so that it checks if for example ADD crosses above a certain level (0.5), and if so, EnterLong on the primary dataseries SPY.
                              I'm not familiar with the ADD and if your indicatorA makes additional calculations on this, but for clarity in this example I assume the ADD ranges from 0 to 1.

                              So assuming the chart your strategy is running on is 1Min SPY

                              in the initialize section of the code you add a 1day ADD series
                              Code:
                              Add("ADD", PeriodType.Day, 1);
                              in the OnBarUpdate section of the code you then add something like :

                              Code:
                               
                              if (BarsInProgress == 0)
                              {
                                if ( Closes[1][0] > 0.5 )   // mark the [1][0], this refers to the close of the secondary dataseries
                                 EnterLong();                 // Submits a buy market order for SPY 
                              }
                              Basicly this says: When a new bar is completed on the primary dataseries (1min SPY) check if the latest value of the secondary dataseries in this strategy -which is daily ADD - is higher then 0.5. If it is, enter a long position on the SPI.


                              please take a very good look at http://www.ninjatrader.com/support/helpGuides/nt7/index.html?multi_time_frame__instruments.htm
                              and make sure you fully understand what is explained here.

                              By the way, did you succeed in creating charts in NinjaTrader with all the symbols (ADD, JI5T.Z ) your IndicatorA uses ?


                              Marco
                              Last edited by marcow; 08-21-2012, 02:16 PM.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Kaledus, Today, 01:29 PM
                              1 response
                              7 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by frankthearm, Yesterday, 09:08 AM
                              13 responses
                              45 views
                              0 likes
                              Last Post frankthearm  
                              Started by PaulMohn, Today, 12:36 PM
                              2 responses
                              16 views
                              0 likes
                              Last Post PaulMohn  
                              Started by Conceptzx, 10-11-2022, 06:38 AM
                              2 responses
                              55 views
                              0 likes
                              Last Post PhillT
                              by PhillT
                               
                              Started by yertle, Yesterday, 08:38 AM
                              8 responses
                              37 views
                              0 likes
                              Last Post ryjoga
                              by ryjoga
                               
                              Working...
                              X