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