• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

PriorDayOHLC() not returning correct values

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

  • prashanth09reddy
    started a topic PriorDayOHLC() not returning correct values

    PriorDayOHLC() not returning correct values

    Hi,
    I am using below code to get open and close values for i days ago bar. But due to some reason it is returning only close values

    open1 = PriorDayOHLC().PriorOpen[i];
    close1 = PriorDayOHLC().PriorClose[i];
    open2 = PriorDayOHLC().PriorOpen[i + 1];
    close2 = PriorDayOHLC().PriorClose[i + 1];

    But sometimes it is working perfectly. But most times it is returning wrong values. Can you please let me know what i am doing wrong


    open1 30.11
    close1 30.11
    open2 31.97
    close2 31.97

  • prashanth09reddy
    replied
    Thanks Harry, I changed the template from default to NSE now its working perfectly.

    Leave a comment:


  • Harry
    replied
    The indicator calculates the prior day's OHLC based on the selected session template. Please make sure that you use the correct session template for the instrument: I suggest to open all charts with <instrument settings>, never use the templates 24/7 or 24/5, as they do not match the trading times of any instrument that I know.

    Leave a comment:


  • NinjaTrader_Bertrand
    replied
    prashanth09reddy, on which symbol / chart intervals are you working with this? i would be just the bars ago for that particular chart - it would not mean you request x days ago for this intra-day chart only indicator.

    Leave a comment:


  • prashanth09reddy
    replied
    here i am using i = 14 and total bars in the chart = 253

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by NinjaCustomer, Today, 12:14 AM
1 response
5 views
0 likes
Last Post NinjaTrader_Marco  
Started by U0000999, Yesterday, 11:49 PM
0 responses
4 views
0 likes
Last Post U0000999  
Started by ahadari28, Yesterday, 04:01 PM
0 responses
6 views
0 likes
Last Post ahadari28  
Started by TazoTodua, Yesterday, 06:00 AM
2 responses
19 views
0 likes
Last Post TazoTodua  
Started by TazoTodua, Yesterday, 09:06 AM
1 response
12 views
0 likes
Last Post NinjaTrader_ChelseaB  
Working...
X