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 sidlercom80, 10-28-2023, 08:49 AM
          166 responses
          2,233 views
          0 likes
          Last Post sidlercom80  
          Started by thread, Yesterday, 11:58 PM
          0 responses
          1 view
          0 likes
          Last Post thread
          by thread
           
          Started by jclose, Yesterday, 09:37 PM
          0 responses
          6 views
          0 likes
          Last Post jclose
          by jclose
           
          Started by WeyldFalcon, 08-07-2020, 06:13 AM
          10 responses
          1,414 views
          0 likes
          Last Post Traderontheroad  
          Started by firefoxforum12, Yesterday, 08:53 PM
          0 responses
          11 views
          0 likes
          Last Post firefoxforum12  
          Working...
          X