Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawText in Strategy

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

    DrawText in Strategy

    Please remind me what was to change in NT7 re draw objects from a strategy.

    Remember 6.5 had a dummy indicator that was used to do this?....which maybe we called from the strat?

    Can not remember

    thanks

    #2
    ATI user,

    Not sure what you mean by DrawText. DrawText has always worked in a strategy or indicator and will continue to work.

    If you mean plots, that would be the StrategyPlot reference sample. Though that was always more of a workaround with limitations. Strategies are generally not meant for plotting. If you want to plot you should use an indicator.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      thanks....yes that was plots.....of course....my 6.5 strats used DrawText a lot

      confusion comes from this strat code:

      //from NT7 indicator
      DrawText("tag", false, "TEXT" , 0, 10010,0, Color.Red,
      new Font("Arial",20), StringAlignment.Far, Color.Transparent, Color.Black,0);

      // from NT7 help guide
      DrawText("tag1", "Text to draw", 0, 10005, Color.Red);

      //from NT7 indicator DrawHorizontalLine("tag2",false,10000,Color.Cyan,D ashStyle.DashDotDot,5);

      Of the 3 lines of code, only the line plots....not even DrawText from NT7 help guide worked

      this is on a blank chart with only the strat running
      Attached Files
      Last edited by ATI user; 10-26-2009, 09:34 AM.

      Comment


        #4
        Suggest you check Control Center logs for errors.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          always look there first

          no errors in Log

          no errors in Output Window

          draws line...will not draw text

          Comment


            #6
            Seems to work here. Please try the attached indicator on your machine. Also, please be sure you are on NT7B3 now. Thanks.
            Attached Files
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              same issue in b3

              will try your test strat

              Comment


                #8
                Josh

                You exported an Indicator. I am having problem with DrawText in a Strategy

                Yours plots fine as ind....so do mine

                only horizontal line plots from my strat code plots...no text


                ..................

                put your drawtext line of code in my strategy and also would not draw text

                //////////

                all 4 lines (3 of mine, 1 of yours) plots fine in an ind.....only line plots in strat


                ..
                Last edited by ATI user; 10-26-2009, 11:20 AM.

                Comment


                  #9
                  Josh

                  To reproduce at your end:

                  add your DrawText code to your SampleAtmStrategy

                  and run it

                  that is what I get from doing same

                  the 'BarsDisplayText' error is a bug Dierk has solved for NT7b4....maybe they are related
                  Attached Files
                  Last edited by ATI user; 10-26-2009, 11:42 AM.

                  Comment


                    #10
                    simplest way to reproduce

                    go to Wizard....create a new Strategy....add only your line of DrawText code

                    compile, load to chart and enable ....no text

                    this proves bug is not related to AtmStrategyCreate issue Dierk is working on
                    Attached Files

                    Comment


                      #11
                      Seems to be working here. Please try attached strategy.
                      Attached Files
                      Josh P.NinjaTrader Customer Service

                      Comment


                        #12
                        not working here

                        I did a complete install of beta 3....no difference
                        Attached Files

                        Comment


                          #13
                          added horizontal line to your strat to show it plots

                          still no text
                          Attached Files

                          Comment


                            #14
                            I am not sure why it would not show up for you as it shows up on my end. Perhaps try reinstalling .NET?
                            Josh P.NinjaTrader Customer Service

                            Comment


                              #15
                              Guessing: may be you have issues with fonts on your machine. Josh's sample went with Arial,10. You could try different fonts to see if that would make any difference.

                              Comment

                              Latest Posts

                              Collapse

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