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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      44 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      56 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      35 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      95 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      57 views
      0 likes
      Last Post PaulMohn  
      Working...
      X