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

Confused with iDataSeries

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

  • Steve R
    replied
    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.

    Leave a comment:


  • NinjaTrader_Bertrand
    replied
    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.

    Leave a comment:


  • Steve R
    replied
    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);

    Leave a comment:


  • NinjaTrader_Bertrand
    replied
    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.

    Leave a comment:


  • Steve R
    replied
    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, 05:28 AM.

    Leave a comment:


  • NinjaTrader_Bertrand
    replied
    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.

    Leave a comment:


  • Steve R
    replied
    http://www.ninjatrader.com/support/forum/showthread.php?t=36938&page=7

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

    Leave a comment:


  • Steve R
    started a topic Confused with iDataSeries

    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.??

Latest Posts

Collapse

Topics Statistics Last Post
Started by yertle, Yesterday, 08:38 AM
7 responses
28 views
0 likes
Last Post yertle
by yertle
 
Started by bmartz, 03-12-2024, 06:12 AM
2 responses
21 views
0 likes
Last Post bmartz
by bmartz
 
Started by funk10101, Today, 12:02 AM
0 responses
4 views
0 likes
Last Post funk10101  
Started by gravdigaz6, Yesterday, 11:40 PM
1 response
8 views
0 likes
Last Post NinjaTrader_Manfred  
Started by MarianApalaghiei, Yesterday, 10:49 PM
3 responses
11 views
0 likes
Last Post NinjaTrader_Manfred  
Working...
X