Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CandleStick does not print on chart

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

    CandleStick does not print on chart

    Hi

    I tried a very simple strategy like

    Code:
    protected override void OnStateChange(){
                if (State == State.SetDefaults){
                    Description = @"Enter the description for your new custom Strategy here.";
                    Name = "MyCustomStrategy";
                    TrendStrength = 4;
                }
                else if (State == State.DataLoaded){
                    _candlestickPattern = CandlestickPattern(ChartPattern.BullishEngulfing, TrendStrength);   
                    AddChartIndicator(_candlestickPattern);
                    _sma = SMA(10);
                    AddChartIndicator(_sma);
                }
            }
    
            
    
            protected override void OnBarUpdate(){
                Print(_candlestickPattern.PatternFound[0]);
    but the CandleStick indicator does not print anything unless i remove the link in the OnBarUpdate method

    I must be missing something too basic or what?

    #2
    Hello tolisss,

    Thank you for your post and welcome to the NinjaTrader Support Forum!

    I am seeing the Prints in the Output window in my testing. I have attached my strategy to this response. Can you test this on your end and advise if you see the Prints?

    I look forward to your response.
    Attached Files

    Comment


      #3
      yeah the output window gets the messages however the _candleStick indicator was suppose to draw a text and nothing is drawn on the chart

      Comment


        #4
        when my strategy looks like
        Code:
               TrendStrength = 4;
                    }
                    else if (State == State.DataLoaded){
                        _bullishCandlestickPattern = CandlestickPattern(ChartPattern.BullishEngulfing, TrendStrength);   
                        AddChartIndicator(_bullishCandlestickPattern);
                    }
                }
        
                protected override void OnBarUpdate(){
                    if (CurrentBar<BarsRequiredToTrade)
                        return;
                    EnterLongOnFound();
                }
        
                private void EnterLongOnFound(){
                    if ((int) _bullishCandlestickPattern.PatternFound[0] == 1){
                        EnterLongLimit(999, GetCurrentAsk());
                    }
                }
        the chart is
        Click image for larger version

Name:	Charts1.png
Views:	1
Size:	14.3 KB
ID:	882074

        but when I comment the EnterLongOnFound call the CandleStick draws as expected to draw also before.

        Click image for larger version

Name:	charts2.png
Views:	1
Size:	7.8 KB
ID:	882075

        Comment


          #5
          Hello tolisss,

          Thank you for your response.

          I see what you are detailing. I will investigate further and follow up with you here.

          Comment


            #6
            Hello tolisss,

            Thank you for your patience.

            If you comment out the call to the PatternFound Series the strategy will show the indicator on the chart. Although, I have had tests where the indicator was still showing the text on the chart when calling this print. Commenting out this call will always allow the indicator to draw it's text on the chart.
            Code:
            Print(_candlestickPattern.PatternFound[0]);
            I am looking into this further on my end.

            Comment


              #7
              Hello tolisss,

              Thank you for your patience.

              I have confirmed our latest internal build is not experiencing this when printing the exposed Series (PatternFound).

              Comment


                #8
                Hi

                Good news but it that release public? does the app autoupdate or do I have to uninstall first

                Comment


                  #9
                  Hello tolisss,

                  Thank you for your response.

                  You can update the platform when the latest release is made available (currently this is only in the internal build). No need to uninstall the platform and there is no auto-update.

                  Please let me know if you have any questions.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by NullPointStrategies, Yesterday, 05:17 AM
                  0 responses
                  75 views
                  0 likes
                  Last Post NullPointStrategies  
                  Started by argusthome, 03-08-2026, 10:06 AM
                  0 responses
                  146 views
                  0 likes
                  Last Post argusthome  
                  Started by NabilKhattabi, 03-06-2026, 11:18 AM
                  0 responses
                  79 views
                  0 likes
                  Last Post NabilKhattabi  
                  Started by Deep42, 03-06-2026, 12:28 AM
                  0 responses
                  50 views
                  0 likes
                  Last Post Deep42
                  by Deep42
                   
                  Started by TheRealMorford, 03-05-2026, 06:15 PM
                  0 responses
                  54 views
                  0 likes
                  Last Post TheRealMorford  
                  Working...
                  X