Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw.TextFixed

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

    Draw.TextFixed

    I'll start a new thread on this subject.

    I am able to draw my text going forward for my purposes and I'm using "\n " + "\n " + "\n " + "\n, for one line but continuously in the script.
    How do I go about dropping down with another, not line but another { }, like below. Because this one line could go very long even though it would look good on the chart.

    if (WinRate_Instructions == true )
    {
    Draw.TextFixed(this, "","EMA1 " + "\nEMA2 " + "\nEMA3 " + "\nHi" + "\n
    }

    I did try a second, another { }

    {
    Draw.TextFixed(
    }
    with two "\n\n " + ""\n\n " + but it just made additional spacing

    I could make that one line a mile long in the script but anyone coming along later looking at the script will be like, what!

    Forgot to add this pic
    Click image for larger version

Name:	2024-12-13 12_23_35-Chart - 5m ETH.png
Views:	115
Size:	95.1 KB
ID:	1327715
    Last edited by trdninstyle; 12-13-2024, 11:58 AM.

    #2
    Hello,

    Thank you for your post.

    Apologies, I'm not clear on what you're asking. Are you trying to use two Draw.TextFixed() objects in the same area without having them overlap?

    Comment


      #3
      Sorry, I did make it complicated.

      In the script I have one long line using the "\n + and of course this gives me another line on the chart, but in the script it's all one very long line.

      I have this part accomplished: I made something up while testing it.
      Click image for larger version  Name:	2024-12-13 14_01_33-Chart - 5m ETH.png Views:	0 Size:	12.8 KB ID:	1327727

      Here's my one line (Script) thus creating the above:
      Click image for larger version  Name:	2024-12-13 14_04_49-2024_12_13_14_03_19_NinjaScript_Editor_Strategy_Channels_.png - Paint.png Views:	0 Size:	47.4 KB ID:	1327728

      At some point I want to start another line in the script, could I nest it within the same logic block? Or start a 2nd line within the same logic block but I tried that with "\n\n two of them, but that just made the gaps between the words wider.

      "in the same area without having them overlapping" Do you mean, like this:
      Click image for larger version  Name:	2024-12-13 14_14_43-fetch (498×419) - DuckDuckGo.png Views:	0 Size:	5.4 KB ID:	1327729
      This is what I was getting until I used a single line I read about, the "\n " "\n " instead of stacking them.
      If thats what u meant, overlapping.

      Comment


        #4
        Are you trying to use two Draw.TextFixed() objects in the same area without having them overlap?

        I just understood what you asked me, yes, thats what I'm trying to do. Thanks you, sorry I was slow.

        Comment


          #5
          Hello trdinstyle,

          No worries, unfortunately, this would not be possible with Draw.TextFixed. You can only place the object in a certain pre-determined spot, so if you try to place two of these in the same spot they are going to overlap.

          Consider instead using custom rendering to custom render text on the chart wherever you want.



          SampleCustomRender in the platform also demonstrates custom rendering text on the chart.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Today, 05:17 AM
          0 responses
          46 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          126 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          66 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          42 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          46 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X