Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Open[1]

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

    Open[1]

    Hi,

    I am new in C#.
    I try to print Open[1], it is not generate a value.( could be "not a value or something else)
    However, if I do Open[Bars.BarsSinceSession-388], where Bars.BarsSinceSession=389, then it works.

    Why?

    #2
    make sure do a no. of bars check

    in OnBarUpdate

    Code:
    if (CurentBar < 1) return;
    
    Print(Open[1].ToString());

    Comment


      #3
      Yes,

      However, I think that Open[1]=Open[Bars.BarsSinceSession-388], if Bars.BarsSinceSession=389.

      If Open[Bars.BarsSinceSession-388] works, then Open[1] should also works. Because they represent the same thing.

      Right?

      Comment


        #4
        Of course, if I print "CurrentBar", then it is 0 at this monent.
        How come the Open[Bars.BarsSinceSession-388] give the value that it should be.

        Comment


          #5
          you are only considering the bar #389. think what would be the case in case of barssincesession #387 or #5. then you will realize.

          Comment


            #6
            Yes,

            Thank you very much.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Hwop38, 05-04-2026, 07:02 PM
            0 responses
            161 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Started by CaptainJack, 04-24-2026, 11:07 PM
            0 responses
            309 views
            0 likes
            Last Post CaptainJack  
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            245 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            349 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