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

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 sidlercom80, 10-28-2023, 08:49 AM
          167 responses
          2,260 views
          0 likes
          Last Post jeronymite  
          Started by warreng86, 11-10-2020, 02:04 PM
          7 responses
          1,362 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by Perr0Grande, Today, 08:16 PM
          0 responses
          5 views
          0 likes
          Last Post Perr0Grande  
          Started by elderan, Today, 08:03 PM
          0 responses
          9 views
          0 likes
          Last Post elderan
          by elderan
           
          Started by algospoke, Today, 06:40 PM
          0 responses
          10 views
          0 likes
          Last Post algospoke  
          Working...
          X