Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Programatically draw Ts

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

    Programatically draw Ts

    Hi, is it possible to draw a T (like the one shown below) via a script or at least when drawing a rectangle have it automatically duplicated next to it when the first rectangle is completed, if drawn in the indicator panel? if not may I suggest having Ts as a drawing tool.
    mahalo

    Last edited by frizshizzle; 09-12-2010, 12:15 PM.

    #2
    Hello frizshizzle,

    That T is essentially three separate lines, so it is possible to draw with custom programming.

    Note that if you want to draw in the future, you must use the advaced overload for DrawLine that allows you to draw at a date / time.

    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      That's a bit hard for me. Is there a way to fill a rectangle with two colors 50/50 without too much custom programming and am I correct to say that I would need to use gui.chart.chartcontrol? Any hints would be helpful.
      There is for some reason my drawings keep disappearing from my indicator even though I save the workspace.
      thanks
      Last edited by frizshizzle; 09-12-2010, 12:29 PM.

      Comment


        #4
        frizshizzle, drawing a rectangle with a 50/50 split would be even harder (if possible at all). When you draw your drawings, are you using a different tag each time? If not, then they would be "erased" and re-drawn when the conditions are right.
        Code:
        DrawDot("tag that doesnt change", ...) // this would be drawn over every time
        DrawDot("tag that does change" + CurrentBar, ...) // would draw a new dot every time
        AustinNinjaTrader Customer Service

        Comment


          #5
          The ones above are drawn manually and those get erased after closing and reopening the workspace on my indicator at least. Also what I mean by drawing Ts is similar to the Fibonacci time extension tool but drawing a T instead of vertical lines, not through conditions.

          Comment


            #6
            frizshizzle, you will have to save the workspace for the drawings to be saved.
            AustinNinjaTrader Customer Service

            Comment


              #7
              I did save them. The drawings on the chart don't get deleted, only on my indicator panel.

              Comment


                #8
                frizshizzlefrizshizzle, on which NT release version are you working as you see this happen (Help > About) ?
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  I'm on 7 beta 21.

                  Comment


                    #10
                    Thanks frizshizzle,

                    Please post the workspace you're having trouble with. You can find the xml file at:

                    My Documents\NinjaTrader 7\workspaces

                    Make sure there are only default system indicators applied.

                    To confirm the steps needed and to clarify the issue:
                    1) Manually place drawing objects on indicator panel
                    2) Save workspace
                    3) Restart NinjaTrader

                    You're then not seeing the objects on the indicator panel after a restart.
                    Ryan M.NinjaTrader Customer Service

                    Comment


                      #11
                      Drawings save on the default indicators but not on the one I wrote.

                      Comment


                        #12
                        Thanks. Please include as well the .cs file for your indicator in:
                        My Documents\NinjaTrader 7\bin\custom\indicator.

                        If you don't want to post to this forum, can also send to [email protected] and reference this thread:

                        Ryan M.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Aviram Y, Today, 05:29 AM
                        4 responses
                        11 views
                        0 likes
                        Last Post Aviram Y  
                        Started by algospoke, 04-17-2024, 06:40 PM
                        3 responses
                        27 views
                        0 likes
                        Last Post NinjaTrader_Jesse  
                        Started by bmartz, 03-12-2024, 06:12 AM
                        3 responses
                        30 views
                        0 likes
                        Last Post NinjaTrader_Zachary  
                        Started by gentlebenthebear, Today, 01:30 AM
                        1 response
                        8 views
                        0 likes
                        Last Post NinjaTrader_Jesse  
                        Started by cls71, Today, 04:45 AM
                        1 response
                        7 views
                        0 likes
                        Last Post NinjaTrader_ChelseaB  
                        Working...
                        X