Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

storing temporary data

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

    storing temporary data

    Hello,
    what is the best way to store a date temporarily? Lets say i would like to store a trigger level where I want the strategy enter a position but when the setup is not valid any more (or have entered a position) I would like to reset the value to null and give it a value again when another setup arises.
    Thanks
    LazKz

    #2
    Are you looking to store DateTime value or just a price trigger level you had calculated? For the trigger level you could just use a double variable to store it...

    Comment


      #3
      Hi Bertrand,
      I'm looking for a price level. I've tried to use a double variable but cannot assign null value to it therefore I had to set zero value for shorts and an extreme (or impossible) value for longs when the setup is not valid. I guess FloatSeries cannot be used for this purpose.

      Comment


        #4
        You could work with a DataSeries object holding doubles, you can set null values for those... http://www.ninjatrader-support.com/H...iesObject.html

        Comment


          #5
          Thanks, and the exact syntax to reset the value to zero would be

          mySeries.Set(null);

          Is that correct?
          Thanks

          Comment


            #6
            For the current bar just call the Reset() method for the dataseries - http://www.ninjatrader-support.com/H...iesObject.html

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            639 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            366 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            107 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            569 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            572 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X