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

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 sofortune, Yesterday, 11:48 AM
          2 responses
          23 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by Zach55, 02-19-2024, 07:22 PM
          2 responses
          59 views
          0 likes
          Last Post lbadisa1  
          Started by JGriff5646, Today, 05:47 PM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by AlphaOptions, 06-18-2013, 08:24 AM
          9 responses
          2,200 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by ttrader23, Today, 09:33 AM
          3 responses
          23 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Working...
          X