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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      68 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      150 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      100 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      288 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X