Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

dataseries integer values?

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

    dataseries integer values?

    Hi,

    I'm using the following code to store values into dataseries classes, the values being stored are "CurrentBar" numbers, thus they are integers. This seems to cause a problem (errors) with my code because the dataseries values should be "double" values (??)...can I get a clarification?...is it possible to setup "integer dataseries"??

    private DataSeries HI_StoK;
    HI_StoK = new DataSeries(this);
    ...
    if((VarStoch(3, 5, 3, 3).VarStoK[1] < 97) && (VarStoch(3, 5, 3, 3).VarStoK[0] >= 97))
    {NEW_HIGH = CurrentBar; HI_StoK.Set(NEW_HIGH);} //set "last high" (bars)
    ...
    if(HI_StoK[AI_index] < NEW_RISE){LO_CONSTRAINT = HI_StoK[AI_index];}

    #2
    Sure, please see this reference for IntSeries class.

    RayNinjaTrader Customer Service

    Comment


      #3
      Thank you, that helped.

      Comment


        #4
        Sorry, I have a follow-up question. It seems that my .Set commands are not properly being populated with the correct information (CurrentBar #)...my code is as follows, it seems the dataseries .Sets are all "0" instead of the CurrentBar number? Anybody got an idea as to why?

        private IntSeries LO_StoK;
        LO_StoK = new IntSeries(this);
        ...
        if((VarStoch(3, 5, 3, 3).VarStoK[1] > 3) && (VarStoch(3, 5, 3, 3).VarStoK[0] <= 3))
        {NEW_LOW = CurrentBar; LO_StoK.Set(NEW_LOW);}
        //set "last low" (bars)

        BTW: the integer value for "NEW_LOW" seems to store the correct value, however it is not updating to the LO_StoK dataseries...

        Comment


          #5
          Any errors in the Control Center logs?
          Josh P.NinjaTrader Customer Service

          Comment


            #6
            No, however I believe I got this straightened out, thanks for the reply...

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            558 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            324 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            545 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            547 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X