Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

PriorDayOHLC

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

    PriorDayOHLC

    Hi!

    Does anyone know if there is a way to get the bar number or bar times from the PriorDayOHLC.PriorHigh[0] or PriorDayOHLC.PriorLow[0] or PriorDayOHLC.PriorClose[0]?

    thanks

    #2
    trade.ripper, I believe you could attempt getting them with the LRO method - http://www.ninjatrader-support.com/H...urenceLRO.html
    BertrandNinjaTrader Customer Service

    Comment


      #3
      It sure would be nice if we could just call this..

      PriorDayOHLC().PriorHigh[0].Time[0]

      and it would return the time that the prior high happened.

      It appears that theres something wrong with my logic. I am getting a -1 for the value of the Low bar.

      PHP Code:
      int LowBar LRO(delegate {return Low[0]==PriorDayOHLC().PriorLow[0];}, 1PriorDayOHLC().Bars.Count); 
      Print(
      "   Low @ Bar: " +  LowBar.ToString() + " At: " Time[LowBar]);
      Print(
      "   Low: " +  PriorDayOHLC().PriorLow[0].ToString()); 
      Any idea of whats wrong?

      thanks

      Comment


        #4
        Thanks for the suggestion, the -1 would returned would mean the condition did not evaluate to 'true'. Is your lookback high enough?
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by GussJ, 03-04-2020, 03:11 PM
        16 responses
        3,279 views
        0 likes
        Last Post Leafcutter  
        Started by WHICKED, Today, 12:45 PM
        2 responses
        19 views
        0 likes
        Last Post WHICKED
        by WHICKED
         
        Started by Tim-c, Today, 02:10 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Taddypole, Today, 02:47 PM
        0 responses
        5 views
        0 likes
        Last Post Taddypole  
        Started by chbruno, 04-24-2024, 04:10 PM
        4 responses
        52 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Working...
        X