Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to Print CandleStickPattern

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

    How to Print CandleStickPattern

    Hello,

    I am looking to have NT print to an output some data for an analysis of mine. So far I have that working and it is doing great for a number of indicators I am interested in. Currently, I am attempting to have NT include in this same print something which lets me know if it detects one of the 25 or so candle stick patterns found here https://ninjatrader.com/support/help...ickpattern.htm

    Is this possible?

    Kenson

    #2
    Hello Kensonprib,

    With how the indicator reports you would have to make individual conditions for the patterns you are interested in. For example:

    Code:
    string pattern; 
    if (CandlestickPattern(ChartPattern.BullishEngulfing, 4)[0] == 1)
    {
        pattern = "BullishEngulfing";
    }
    else if (CandlestickPattern(ChartPattern.MorningStart, 4)[0] == 1)
    {
        pattern = "MorningStart";
    }
    // other conditions like the one above

    Print(pattern);

    On any bar where a pattern is found it would print the name of that pattern. You would have to manually repeat the condition a few times for the ones you wanted but you can simplify it like shown by using a variable for the found pattern name and printing once at the end of all your conditions.

    I look forward to being of further assistance.

    Comment


      #3
      Perrrrrfect! Thank you Jesse. I will try it out.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      571 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      330 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      548 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      548 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X