Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 12/5/2008 Posts: 70
|
I would like to have the volume bars on my price pane in the chart. I was able to reduce the height of the bars to a reasonable level but I would like to reduce the opacity level to make them transparent. I was not successful. Does this require real code? If so, can you help me? At present I'm using, in real code, red and black for the bar colors.
Thanks in advance
Todd A
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
QUOTE (tarabia1) At present I'm using, in real code, red and black for the bar colors.
If you are already using a RealCode Paint Brush, you might want to just use the fromARGB method for Color instead of Color.Red and Color.Black.
The fromARGB method allows you to define the degree of transparency using an alpha channel.
PlotColor = Color.fromARGB(255, 255, 255, 255)
The first number is the Alpha (and affects transparency) - 0 is transparent, 255 is solid.
The second number is Red - 0 means no red, 255 means max red.
The third number is Green - 0 means no green, 255 means max green.
The fourth number is Blue - 0 means no blue, 255 means max blue.
Each of the numbers is a byte and must be between 0 and 255 (inclusive).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Platinum Customer
Joined: 10/7/2004 Posts: 357
|
here is a site for the decimal color codes or BING RGB and get lots of hits.
http://www.tayloredmktg.com/rgb/
|
|
Registered User Joined: 12/5/2008 Posts: 70
|
I dont know an awful lot about realcode, just enough to be dangerous. The following are the original code code I was using and my interpretation of what you had suggested. In my versions I got errors on lines 6 and 9 which stated that boolean data was not compatible with system colors and integer type data was also not compatible with system colors.
Need help
Thanks again
Todd A
For i As Integer = 1 To price.Line.count - 1
If price.line.value(i) >= price.line.value(i-1) Then
MyBase.addtooutput(price.line.datevalue(i),color.black)
Else
MyBase.addtooutput(price.line.datevalue(i),color.red)
End If
Next
For i As Integer = 1 To price.Line.count - 1
If price.line.value(i) >= price.line.value(i - 1) Then
MyBase.addtooutput(price.line.datevalue(i), plotcolor = color.FromArgb(100, 0, 0, 0))
Else
MyBase.addtooutput(price.line.datevalue(i), plotcolor = color.FromArgb(100, 255))
End If
Next
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
tarabia1,
If you are using AddToOutput(), you don't need to use PlotColor = as they are different ways of doing the same thing (this is what it looks like in the Code tab, but there are other things going on in the Class tab that set up the AutoLoop = False and make it all work):
For i As Integer = 1 To price.Line.count - 1
If price.line.value(i) >= price.line.value(i-1) Then
MyBase.addtooutput(price.line.datevalue(i), color.fromARGB(100, 0, 0, 0))
Else
MyBase.addtooutput(price.line.datevalue(i), color.fromARGB(100, 255, 0, 0))
End If
Next
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |