• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Confused with iDataSeries

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

    Confused with iDataSeries

    Yes, I've read the 1/2 page of the poor help file.

    It don't be helping me :-)

    I've not worked with iDataSeries before and wished i did not have to, but as i understand I have to pass a variable to an indicator and it requires it to be in iDataSeries.

    I am using BigMike Indicator which will allow me to pass variable to an excel spreadsheet. I can already do that via BigMike Indicator found on this site.

    The indicator takes as it's input iDataSeries IE placed on SPY chart and will output O-H-L-C-Vol to excel sheet.

    What I want to use it for is to pass a variable TO BigMike indicator from an indicator i have already written (it works just fine).

    The indicator i have written plots a 'double'. I need to pass that double to BigMike Indicator but need to do it in iDataSeries format??

    The input to BigMike indicator is (iDataseries, string, string, int) so me doing this..

    (mydouble, string1, string2, int) obviously causes a compile issue because of the double being passed.

    I can (and have) passed the double into a DataSeries and from there it too Plots just fine so if needed i've done that.

    How do i pass the DataSeries to iDataSeries and then to BigMike?

    Does this makes sense?

    I'm getting all confused.

    I would prefer BigMike indicator to just take a double value but i figure it would be harder to 'fix' that, but maybe not.??

    #2
    http://www.ninjatrader.com/support/forum/showthread.php?t=36938&page=7

    is the thread where "BigMike" indicator can be found, for further clarification.

    Comment


      #3
      Hi Steve, when you call your indicator script, just don't request a double value then but instead get the series by not applying the indexing - which would express which double value x bars back you wanted from the plot series.

      i.e. SMA(20)[3] > gives you the double value from 3 bars back.

      vs SMA(20) is just the series return then.
      BertrandNinjaTrader Customer Service

      Comment


        #4
        i think i need a little more coding help than that. I at least get what you're saying.

        so my double is 'mydouble'

        so when i plot it i would do: Plot0.Set(mydouble);

        when I pass it to BigMike indicator I do ???

        Do I need to first put mydouble into a Dataseries?

        If so then: myDataSeries.Set(mydouble);

        If I wanted to plot using the data series I would write: Plot0.Set(myDataSeries[0]);

        So then you're saying to pass the DataSeries into BigMike I should be writing:

        BigMike(myDataSeries, string, string, int);

        Is that correct?
        Last edited by Steve R; 07-18-2014, 04:28 AM.

        Comment


          #5
          Steve, just go by the SMA example I gave you. For any indicator method you call (same would be your custom indicator). So staying with the SMA, this call should be working -

          BigMike(SMA(20), string, string, int);

          So in the above call you do not get a specific double value from your series, as not [index] is applied.
          BertrandNinjaTrader Customer Service

          Comment


            #6
            yeah i was going by the example you gave but used my own variable names to be exactly clear and how i have it set up thus far with my code.

            Is what I wrote in my last post correct? (Yes/No)?

            double to Dataseries and then do not use the index, as i have written?

            myDataSeries.Set(mydouble);

            BigMike(myDataSeries, string, string, int);

            Comment


              #7
              That should compile as well, as your passing a series then, however I don't see value in assigning to a series first. If you call a custom indicator, it's return would already be a series to begin with, so you can just use that.
              BertrandNinjaTrader Customer Service

              Comment


                #8
                Originally posted by NinjaTrader_Bertrand View Post
                That should compile as well, as your passing a series then, however I don't see value in assigning to a series first. If you call a custom indicator, it's return would already be a series to begin with, so you can just use that.
                Maybe I misunderstand now, but i want to pass TO BigMike and it's going to do some work with what is in THIS indicator (indicator calling an indicator - only because BigMike is already an indicator even though I don't want it to be but since it is i have to pass it what it wants - the iDateSeries input).

                I know this does not work: BigMike(mydouble, string, string, int) as the error tells me i am passing a double when it should not be....

                I don't see any other way around it than what i have written in the pasts posts, assuming they'll work.

                I'm using BigMike as a method? in this case - which i have done before, but i can't do it exactly like that because BigMike doesn't like the double.

                As mentioned in the first post, i wish BigMike was just a "void" Method and not an indicator...but i did not write it and I cannot change it.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Papercut110, Yesterday, 09:08 PM
                0 responses
                4 views
                0 likes
                Last Post Papercut110  
                Started by iq200, 11-09-2019, 08:26 AM
                5 responses
                56 views
                0 likes
                Last Post koganam
                by koganam
                 
                Started by johng964, Yesterday, 02:57 PM
                1 response
                12 views
                0 likes
                Last Post NinjaTrader_RyanS  
                Started by spamula, Yesterday, 03:00 PM
                2 responses
                16 views
                0 likes
                Last Post spamula
                by spamula
                 
                Started by MARTIN MARTIN, Yesterday, 01:01 PM
                0 responses
                17 views
                0 likes
                Last Post MARTIN MARTIN  
                Working...
                X