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 kinfxhk, 07-14-2026, 09:39 AM
            0 responses
            129 views
            0 likes
            Last Post kinfxhk
            by kinfxhk
             
            Started by kinfxhk, 07-13-2026, 10:18 AM
            0 responses
            105 views
            0 likes
            Last Post kinfxhk
            by kinfxhk
             
            Started by kinfxhk, 07-13-2026, 09:50 AM
            0 responses
            87 views
            0 likes
            Last Post kinfxhk
            by kinfxhk
             
            Started by kinfxhk, 07-13-2026, 07:21 AM
            0 responses
            106 views
            0 likes
            Last Post kinfxhk
            by kinfxhk
             
            Started by kinfxhk, 07-11-2026, 02:11 AM
            0 responses
            86 views
            0 likes
            Last Post kinfxhk
            by kinfxhk
             
            Working...
            X