Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ohlc

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

    Ohlc

    My wish is to enter when some other conditions along with following occur:
    && CrossAbove(Close, PriorDayOHLC().PriorOpen, 4)

    I get a entry even thou the close did not cross above the PriorOpen within the last 4 bars
    In fact its no where near...

    The indicator is suppose to be Prior Open that is around mid night. I am trading the 6e
    So lets say the line the indicator draws is at 1.287 at 12 mid night
    I would assume during the day if the close crosses above that line it would be an entry.

    Any suggestions?

    #2
    bbucha,

    Could you post more of your code here or some screen shots of the behavior you are witnessing here?
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      OHLC Indicator

      If I simply do the following the output window prints a value of 0 for all

      Print(Time[0] + " PriorOpen "+ PriorDayOHLC().PriorOpen) ;
      Print(Time[0] + " PriorClose "+ PriorDayOHLC().PriorClose) ;
      Print(Time[0] + " PriorHigh "+ PriorDayOHLC().PriorHigh) ;
      Print(Time[0] + " PriorLow "+ PriorDayOHLC().PriorLow) ;

      Comment


        #4
        bbucha,

        Print(Time[0] + " PriorOpen "+ PriorDayOHLC().PriorOpen) ;

        PriorOpen is a dataseries so you would need to reference the index to get the actual value.

        PriorDayOHLC().PriorOpen[0]

        The crossabove function takes data series as inputs, however if you want to print the actual current value you need to use indices.
        Adam P.NinjaTrader Customer Service

        Comment


          #5
          Thanks I found the indicator goes awhile before printing I had tried with and without indices.
          The problem ended up being I was coding for Prior day and wanted current day OHL
          So all is good

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          56 views
          0 likes
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          143 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          160 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 05-10-2026, 08:12 PM
          0 responses
          96 views
          0 likes
          Last Post CarlTrading  
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          276 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Working...
          X