Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

priorClosePrice question

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

    priorClosePrice question

    I have this on my script trying to get yesterday,s close and day before yesterday close.
    But priorClosePrice and priorClosePrice1 have the same value, are equal.
    Any clue?

    if (BarsInProgress == 0)
    {
    priorClosePrice = PriorDayOHLC().PriorClose[0];
    priorClosePrice1 = PriorDayOHLC().PriorClose[1];
    }

    #2
    Hello,

    Thank you for the post.

    Out of context I would not be certain what could cause the same value, are you able to apply the PriorDayOHLC to the instrument in a chart and see the PriorClose plot changing?

    If so could you provide more details on the instrument used and the timeframes you are using?

    I look forward to being of further assistance.

    Comment


      #3
      I will work on it but first let me understand it clearer.

      Does PriorDayOHLC().PriorClose[0]; returns yesterday close price?
      And PriorDayOHLC().PriorClose[10]; would be the close price of 10 days ago?

      Comment


        #4
        Hello,

        This should return the value as you are asking, again I would be unsure out of context what may be occurring. Have you tried a simple test like the following?

        Code:
        protected override void OnBarUpdate()
        {
        	if(CurrentBar < 1)return;
          	Print(PriorDayOHLC()[0] +  "  " + PriorDayOHLC().PriorClose[1]);
        }
        I tried this on a ES minute chart and see the output like the following:


        2184 2205.25
        Could you provide the specifics of the test you are trying along with the syntax being used?


        I look forward to being of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by sjsj2732, Yesterday, 04:31 AM
        0 responses
        28 views
        0 likes
        Last Post sjsj2732  
        Started by NullPointStrategies, 03-13-2026, 05:17 AM
        0 responses
        284 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        281 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        132 views
        1 like
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        90 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Working...
        X