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

WaterMark

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

    WaterMark

    I made some changes to a watermark indicator I found here but can't figure out how to get it to print on the very top,top of chart like the SMA indicator does, any help would be greatly appreciated. Also is it possible to do a ZOrder to the back on this?

    Here is a screen shot and the indicator!

    Thank You
    Attached Files

    #2
    Hello geotabs,

    Thanks for your post.

    It would not be possible to customize the ZOrder in NinjaTrader 7, but your TextFixed drawing object is on top. You could consider drawing the object with an area color so it is more visible when bars are behind it.

    Setting ZOrder can be done programmatically in NinjaTrader 8 with SetZOrder.

    Let us know if you have any questions.
    JimNinjaTrader Customer Service

    Comment


      #3
      "You could consider drawing the object with an area color so it is more visible when bars are behind it."


      Thanks Jim but I wouldn't know where to start or how to program this, all I know how to do on this is change the font and size

      Comment


        #4
        Hello geotabs,

        You are already using the overload that will let you assign an area color. You just need to give it a color and an opacity value.

        Code:
         ITextFixed obj1 = DrawTextFixed("Instrument", instrumentName + " " + chartPeriod.Value + chartPeriod.Id.ToString()[0] , TextPosition.TopLeft, Color.DimGray, waterMarkFont, Color.Transparent, [B]Color.Transparent[/B], [B]0[/B]);
        Code:
        ITextFixed obj1 = DrawTextFixed("Instrument", instrumentName + " " + chartPeriod.Value + chartPeriod.Id.ToString()[0] , TextPosition.TopLeft, Color.DimGray, waterMarkFont, Color.Black, [B]Color.White[/B], [B]100[/B]);
        You can reference the DrawTextFixed Help Guide information to reference each overload and each parameter for each overload.

        DrawTextFixed - https://ninjatrader.com/support/help...wtextfixed.htm

        We look forward to assisting.
        JimNinjaTrader Customer Service

        Comment


          #5
          Thanks you so much Jim, works like a charm. Can you also do an opacity on text?

          Cheers

          Comment


            #6
            Happy to help, geotabs!

            There is only a parameter for area opacity in DrawTextFixed. It would be possible to draw text with transparency using custom plotting, but that gets a bit more complicated and we do not offer support for custom plotting in NinjaTrader 7. (Custom plotting is possible, but use at your own risk.) The CustomPlotSample indicator that comes with NinjaTrader 7 could be referenced to get you started.

            If you have any new inquiries, please don't hesitate to open a new ticket.
            JimNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Segwin, 05-07-2018, 02:15 PM
            14 responses
            1,789 views
            0 likes
            Last Post aligator  
            Started by Jimmyk, 01-26-2018, 05:19 AM
            6 responses
            837 views
            0 likes
            Last Post emuns
            by emuns
             
            Started by jxs_xrj, 01-12-2020, 09:49 AM
            6 responses
            3,293 views
            1 like
            Last Post jgualdronc  
            Started by Touch-Ups, Today, 10:36 AM
            0 responses
            13 views
            0 likes
            Last Post Touch-Ups  
            Started by geddyisodin, 04-25-2024, 05:20 AM
            11 responses
            63 views
            0 likes
            Last Post halgo_boulder  
            Working...
            X