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 Hwop38, 05-04-2026, 07:02 PM
            0 responses
            169 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Started by CaptainJack, 04-24-2026, 11:07 PM
            0 responses
            324 views
            0 likes
            Last Post CaptainJack  
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            250 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            351 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            180 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Working...
            X