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 mattbsea, Today, 05:44 PM
            0 responses
            3 views
            0 likes
            Last Post mattbsea  
            Started by RideMe, 04-07-2024, 04:54 PM
            6 responses
            31 views
            0 likes
            Last Post RideMe
            by RideMe
             
            Started by tkaboris, Today, 05:13 PM
            0 responses
            2 views
            0 likes
            Last Post tkaboris  
            Started by GussJ, 03-04-2020, 03:11 PM
            16 responses
            3,282 views
            0 likes
            Last Post Leafcutter  
            Started by WHICKED, Today, 12:45 PM
            2 responses
            20 views
            0 likes
            Last Post WHICKED
            by WHICKED
             
            Working...
            X