Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NinjaPriceAction

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

    #16
    Looks good so far. As you mentioned already, you could now incorporate your own font-definition according to the code-snippet posted by Josh.

    Regards
    Ralph

    Comment


      #17
      Thanks Ralph, yes please use the overload provided in post 10 by Josh and it should work.

      Comment


        #18
        Bit hard for me, could you give me a hint or small example?

        Thanks for the help,

        Johan

        Comment


          #19
          You could copy the following example to your code and go through the parameters with Intellisense to see what the purpose is.

          Regards
          Ralph

          Code:
          [FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]
          DrawText(EntryText, [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2], PriceInstance.ToString(), CurrentBar - TriggerBar + Offset, ValueEntry, Color.Blue, TextFont, StringAlignment.Far, Color.Empty, Color.White, [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]5[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]);
          [/SIZE][/FONT][/SIZE][/FONT]

          Comment


            #20
            Hi jojotrader, you will need the second syntax from this link - http://www.ninjatrader-support.com/H.../DrawText.html

            All the needed parameters for the call are explained below it as well.

            Comment


              #21
              I gave it up guys, If anyone is able to adjust the ninjapriceaction indicator to have BOLD text, be my guest.

              For now, I stop looking, my head is almost looking tomato..

              Thanks,

              Johan

              Zipfile in first post.....

              Comment


                #22
                Copy the code line below and try to compile it.

                Regards
                Ralph

                Code:
                [FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]
                DrawText([/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000]"DT"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] + CurrentBar, [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2], [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000]"DT"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2], barsback, High[barsback] + toffset, Color.Gold, textFont, StringAlignment.Far, Color.Empty, Color.White, [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]5[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]);
                [/SIZE][/FONT][/SIZE][/FONT]

                Comment


                  #23
                  Thanks,

                  I was able to compile for now...
                  Text looking strange with ivory background, but I should be able to do that trick myself,

                  I let you know...

                  Thanks,

                  Johan

                  Comment


                    #24
                    Well well well,

                    Looks almost perfect except for the one tick lagging...
                    In example you see old indicator (regular font )
                    New is in bold, sure...

                    One little tweak could make this 100%

                    Already very thankfull.

                    Johan
                    Attached Files

                    Comment


                      #25
                      The reason for the offset is most likely caused by the StringAlignment parameter. The choises available are: Far, Center, Near. Don't know what that exactly means but you will find that out.

                      Glad to see you got your tomatos rolling.

                      Regards
                      Ralph

                      Comment


                        #26
                        Yep,

                        This is it man, changed to center did the trick.


                        DrawText("LL" + CurrentBar, "LL", barsback, Low[barsback] - toffset, Color.Red, textFont, StringAlignment.Center, Color.Empty, Color.Gray, 5);

                        Thanks again,

                        an thanks again..

                        Johan

                        Comment


                          #27
                          Hi Johan,

                          2 final thought:
                          • The last parameter (5) is the opacity, it is a value between 1 and 10. At one side your text appears dense, at the other side quite transparent. I don't remember which side was what.
                          • In case you are not aware of: To define your textFont instance you do not need to define a related property. That makes sense only if you realy would like to see the font in the properties-window for modification purpose.
                          Regards
                          Ralph

                          Comment


                            #28
                            It is set and I'm able to change Font in properties,

                            very nice.


                            Thanks, and have a good day.

                            Johan

                            Comment


                              #29
                              Really working well with that indicator, but...

                              I like to have a red dot, above or below, the FIRST LH occuring after a series of HH and LH's...vice versa for first HL after a series of LL and LH...

                              If that's possible, than I'm very thankfull.
                              I could move that to another indicator...


                              Johan
                              Attached Files
                              Last edited by jojotrader; 01-12-2009, 05:16 AM.

                              Comment


                                #30
                                Hi Johan,

                                store the values for HH and LL as they occure:

                                double LastHH;
                                double LastLL;

                                if this bar is HH then: LastHH = High[0];
                                if this bar is LL then: LastLL = Low[0];

                                If your conditions for LH or HL are met draw the dots accordingly:

                                if this bar is LH then: DrawDot("LH" + CurrentBar, false, 0, LastHH, Color.Red);
                                if this bar is HL then: DrawDot("HL" + CurrentBar, false, 0, LastLL, Color.Red);

                                Regards
                                Ralph

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                607 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                353 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
                                560 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                561 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X