• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DRAWTEXTFIXED in other than panel 1

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

    DRAWTEXTFIXED in other than panel 1

    Is there a way I can draw in other than panel 1 using the equivalent of DRAWTEXTFIELD?

    #2
    Hello Ct,

    Thank you for your post.

    You can draw in the Indicator Panel created when adding the Indicator to the chart or you can draw in the Price Panel.

    You can dictate which of the two Panels the objects are drawn on with DrawOnPricePanel and Overlay.
    Please let me know if I may be of further assistance.
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      Patrick

      Just as a test I tried

      Overlay = false;
      DrawOnPricePanel = false;
      DrawTextFixed("tag1", "XXX" , TextPosition.TopRight);


      The panel is blank, no plots are displayed and not even the test text "XXX" is shown. If I comment out the DrawTextFixed my plots are fine.

      I already had specified:
      Overlay = false;
      DrawOnPricePanel = false;

      Tried the following but got the same result.
      DrawText("tag1", "XXX", 0, 100, Color.Black);
      Last edited by ct; 06-10-2013, 05:41 AM.

      Comment


        #4
        Hello ct,

        Thank you for your response.

        This is working on my end, make sure you set Overlay and DrawOnPricePanel in the Initialize() method.

        Please let me know if you have any questions.
        Attached Files
        Patrick H.NinjaTrader Customer Service

        Comment


          #5
          Patrick

          Here is my an exact code snippet:

          protected override void Initialize()
          {

          Overlay = false;
          DrawOnPricePanel = false;
          // DrawTextFixed("tag1", "XXX" , TextPosition.TopRight);
          DrawText("tag1", "XXX", 0, 0, Color.Black);

          It just shows the indicator name on the far right of the panel with no parameters.

          I am on version 13.

          Wait................. Idiot on the receiving end. I was trying to draw in the initialize routine before I had a bar.
          Last edited by ct; 06-10-2013, 06:06 AM.

          Comment


            #6
            Patrick

            Works perfect when this moron waits for the bars to paint first.

            The ninja help text on DrawTExtField says "Draws text in one of 5 available pre-defined fixed locations on panel 1 (price panel) of a chart." so I assumed it could only be used for panel 1 but in actuality will draw in the panel specified.

            Many thanks.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by marwanco, Today, 10:54 AM
            1 response
            4 views
            0 likes
            Last Post NinjaTrader_ChrisL  
            Started by daqu40, Today, 11:01 AM
            0 responses
            0 views
            0 likes
            Last Post daqu40
            by daqu40
             
            Started by n8dogg59, Today, 09:55 AM
            2 responses
            4 views
            0 likes
            Last Post n8dogg59  
            Started by ren37, Today, 09:42 AM
            2 responses
            4 views
            0 likes
            Last Post ren37
            by ren37
             
            Started by Austiner87, Today, 08:16 AM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_ChrisL  
            Working...
            X