Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Reading a horizontal line "Y" value

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

    #46
    Opacity

    Hi Joydeep. I have a quick question on opacity I would appreciate some help. I've attached a chart which show the RTH session in dim gray and the ETH in black. Here is part of the code I'm using:

    PHP Code:
    if (ToTime(Time[0]) >= ((zn1HrSt * 10000) + (zn1MinSt * 100)) && ToTime(Time[0]) < ((zn1HrEn * 10000) + (zn1MinEn * 100)))
                    BackColor = Region1Color; 
    
    What I'd like to do is make the dim gray darker even more and was wondering how I could use some type of opacity setting to do this?

    Thanks in advance
    DJ
    Attached Files

    Comment


      #47
      Hello DJ,
      To adjust the opacity please use the below code
      Code:
      Color Region1Color = Color.FromArgb(100, Color.Gray);
      this.BackColor = Region1Color;
      100 is the opacity here and you can set a range from 0-255.

      Please let me know if I can assist you any further.
      JoydeepNinjaTrader Customer Service

      Comment


        #48
        Thanks Joydeep. I have another question in respect of transferring a ray to another chart using some code and would appreciate some help. So the story here is I've drawn a ray on the ES-30 minute chart. Now once I draw this line at a certain price I'd like it to mirror on say the ES5 Minute chart automatically. I know there is an option that lets you click a check box so it copies the line to all charts. The problem with this is there is a bug and it doesn't work properly. It also comes up with an @2 (see attachment) when I say attach to all charts. When I try to define it, I cannot and the @2 stays and I cannot access it.

        So instead I was wondering if there is some code where you can copy the drawn line to another chart or say All ES charts.

        Thanks in advance
        DJ

        DrawRay("PS1", false, alertLineDS1.Anchor1BarsAgo, Low[alertLineDS1.Anchor1BarsAgo], alertLineDS1.Anchor2BarsAgo, Low[alertLineDS1.Anchor1BarsAgo], Color.Cyan,DashStyle.Dot,2);
        What I'm trying to do now is use some code to transfer a manually drawn IHorizontal Line
        Attached Files
        Last edited by djkiwi; 05-31-2012, 01:41 AM.

        Comment


          #49
          Hello djkiwi,
          You cannot access a global draw object via NinjaScript. It is limited to manually drawn objects only. Unfortunately it is a limitation as of now.

          You cannot change the tag name of a global draw object.

          Please let me know if I can assist you any further.
          JoydeepNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          559 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          324 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          546 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          547 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X