Announcement

Collapse
No announcement yet.

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.

    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.

        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 CaptainJack, 05-29-2026, 05:09 AM
          0 responses
          239 views
          0 likes
          Last Post CaptainJack  
          Started by CaptainJack, 05-29-2026, 12:02 AM
          0 responses
          155 views
          0 likes
          Last Post CaptainJack  
          Started by charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          165 views
          1 like
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          247 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          199 views
          0 likes
          Last Post CarlTrading  
          Working...
          X