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

Candlestick recognition for barsinprogress

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

    Candlestick recognition for barsinprogress

    if (CandlestickPattern(ChartPattern.BullishEngulfing, 4)[0] == 1)

    how do we identify the member of the array or barsinprogress for the candlestick indicator as in the following example for OHL? It is not clear in your literature how that is done.

    PriorDayOHLC(Closes[0]).PriorClose[0]

    Regards and many thanks

    #2
    Hello everington_f,

    Thank you for the post.

    I wanted to ask, are you asking how to pass a series to the CandlestickPattern indicator like the example you provided? If so that would be like the following:

    Code:
    CandlestickPattern(Closes[0], ChartPattern.BullishEngulfing, 4)
    Otherwise, I am not certain I understand the question as written, could you detail this further?

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      && (CandlestickPattern(ChartPattern.BullishEngulfing, 0)[1] == 0)

      Thanks Jesse - Indeed needs the barinprogress identifier...

      Comment


        #4
        Hello everington_f,

        The BarsInProgress identifier is not produced by the indicator, this is a property of the indicator or strategy where you are calling the CandlestickPattern from.

        Can you detail further what your concern here is?

        Also, passing series like shown to indicators only works in certain cases if the indicator uses Input in its syntax. For the CandleStickPattern you will very likely need to use the syntax you have shown surrounded by a BarsInProgress check for the series you want to check:
        Code:
        if(BarsInProgress == 1)
        {
            if (CandlestickPattern(ChartPattern.BullishEngulfing, 4)[0] == 1)
            {
            }
        }
        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          I am testing this code right now in the array to check if it correctly blocks that pattern. I shall report for other users benefit. Regards and thanks


          && (CandlestickPattern(Closes[0],ChartPattern.InvertedHammer, 0)[1] == 0)

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by andrewtrades, Today, 04:57 PM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by chbruno, Today, 04:10 PM
          0 responses
          5 views
          0 likes
          Last Post chbruno
          by chbruno
           
          Started by josh18955, 03-25-2023, 11:16 AM
          6 responses
          436 views
          0 likes
          Last Post Delerium  
          Started by FAQtrader, Today, 03:35 PM
          0 responses
          7 views
          0 likes
          Last Post FAQtrader  
          Started by rocketman7, Today, 09:41 AM
          5 responses
          19 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X