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

Price label on indicator horiz' line

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

    Price label on indicator horiz' line

    Hi all;
    Have been through a lot of threads and I know I'm not going to have been the only one to ask this but I want to put the price that a horizontal line is being PLOTTED (drawn as the day progresses) at the end of the line or above the end of the line. please see attached screen shot. Have looked at other indicators that do this but there must be a simple way as the label will be a fixed value - updated each day. (lines are prev close - current session open etc)
    Please can someone direct me to a reference.

    Thanks in advance;

    Ben
    Attached Files

    #2
    Hi Ben, we have adding such a label feature per default on our feedback list for future consideration.

    For a way to do this via code now, you could check into the (unsupported though) approach the default Pivots indicator would take for adding such a label.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      Hi Ben, we have adding such a label feature per default on our feedback list for future consideration.

      For a way to do this via code now, you could check into the (unsupported though) approach the default Pivots indicator would take for adding such a label.
      Thanks bertrand - As I thought, by the time I have figured all that out and used the bits I need just to put a couple of values on a line I will have lost the will to live and wasted days in the process.
      Will wait for it to be part of a new release.

      Thanks again.

      Comment


        #4
        Originally posted by stocktraderbmp View Post
        Thanks bertrand - As I thought, by the time I have figured all that out and used the bits I need just to put a couple of values on a line I will have lost the will to live and wasted days in the process.
        Will wait for it to be part of a new release.

        Thanks again.
        I am not sure that I see why the original question is a problem, You are either drawing the line or plotting it. That means you know the "y" value. Just do a DrawText() with that "y" value and an offset. Is there something deeper that I am missing?

        Comment


          #5
          Originally posted by koganam View Post
          I am not sure that I see why the original question is a problem, You are either drawing the line or plotting it. That means you know the "y" value. Just do a DrawText() with that "y" value and an offset. Is there something deeper that I am missing?
          Thanks once again 'K';

          I had been messing with DrawText for about an hour but couldn't get it to work properly so looked at the 'anapivots' and 'labelHorzLinesAlerts'. Both seemed to be excessivly complicated for what I wanted to achieve.
          I was looking for an example to see where I was going wrong but have worked it out now with a bit of trial and error - but worth the time if you know your in the right ball park !

          Still having a problem with 'Font' though. Don't want to change it or do anything fancy - gives me 4 options - 'FromHdc' 'FromHfont' etc etc

          What do i do here if I just want to use the same font as the label font in properties etc?

          Font.?????????

          Thanks once again;

          Ben.

          Comment


            #6
            Originally posted by stocktraderbmp View Post
            Thanks once again 'K';

            I had been messing with DrawText for about an hour but couldn't get it to work properly so looked at the 'anapivots' and 'labelHorzLinesAlerts'. Both seemed to be excessivly complicated for what I wanted to achieve.
            I was looking for an example to see where I was going wrong but have worked it out now with a bit of trial and error - but worth the time if you know your in the right ball park !

            Still having a problem with 'Font' though. Don't want to change it or do anything fancy - gives me 4 options - 'FromHdc' 'FromHfont' etc etc

            What do i do here if I just want to use the same font as the label font in properties etc?

            Font.?????????

            Thanks once again;

            Ben.
            I believe what you seek is the undocumented ChartControl.Font. The usual caveats apply: it is not documented for a reason, so NT may change it at any time, and your stuff will break, if they do. As always, use unsupported stuff only if you understand the risk.
            Last edited by koganam; 06-24-2012, 04:00 PM. Reason: Corrected spelling

            Comment


              #7
              Thanks for the warning - Whats the proper way to do it?

              Comment


                #8
                Originally posted by stocktraderbmp View Post
                Thanks for the warning - Whats the proper way to do it?
                I am not sure that I understand what you are asking. The label et.c., font is ChartControl.Font. Just use it. You can either use it directly, or assign it to a shorter name and use that.

                Maybe if you wrote what you have, I might be able to understand better?

                Comment


                  #9
                  ninjascript for horizonal line label

                  where is the download for this labeling of a horizonal line,pirce thereof,please ?

                  Comment


                    #11
                    Will not compile

                    Is anyone else having problems with this Indicator? I could not get it to compile in NT7.

                    Thanks in advance.

                    Comment


                      #12
                      No not had any problems - check your log - it will tell you were the problems are.

                      Comment


                        #13
                        tht download crashed my script indicator import function and never worked so yes is the answer

                        Comment


                          #14
                          Here is the file I used. I have deleted it from my NT platform tonight and re-imported it with no trouble at all.
                          Hope this helps you out.

                          Ben.
                          Attached Files

                          Comment


                            #15
                            nt

                            the message i get when trying to remove NT script assemby is "programmer errors" which must be resolved prior etc

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by ZenCortexCLICK, Today, 04:58 AM
                            0 responses
                            5 views
                            0 likes
                            Last Post ZenCortexCLICK  
                            Started by sidlercom80, 10-28-2023, 08:49 AM
                            172 responses
                            2,281 views
                            0 likes
                            Last Post sidlercom80  
                            Started by Irukandji, Yesterday, 02:53 AM
                            2 responses
                            18 views
                            0 likes
                            Last Post Irukandji  
                            Started by adeelshahzad, Today, 03:54 AM
                            0 responses
                            8 views
                            0 likes
                            Last Post adeelshahzad  
                            Started by Barry Milan, Yesterday, 10:35 PM
                            3 responses
                            13 views
                            0 likes
                            Last Post NinjaTrader_Manfred  
                            Working...
                            X