![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
|
tying to include an option in the "Parameters" section of the Indicator Window to select the DashStyle options along with the Color options that I already have which work correctly
Code:
#region Variables // Wizard generated variables private Color lineColor = Color.Cyan; privateint line_Size = 1; private DashStyle style = DashStyle.Custom; Code:
// Serialize our Color object
[Browsable(false)]
publicstring StyleSerialize
{
get { return NinjaTrader.Gui.Design.SerializableDashStyle.ToString(style); }//SerializableColor
set { style = NinjaTrader.Gui.Design.SerializableDashStyle.FromString(value); }
}
|
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
duck_CA,
Unfortunately this is outside the scope of what we can offer support for. Thank you for understanding.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
|
I understand Josh...Ninja has been extremely helpful and appreciate it...
Can you tell me if this is even possible? Thanks again |
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Technically, yes, but unfortunately I just don't have any information on how you could proceed to realize it though.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
|
where this is a will...there's a way...lol
|
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Jul 2008
Posts: 527
Thanks: 0
Thanked 9 times in 6 posts
|
DashStyle is an enumeration, is that true, duck_CA? If so, wouldn't an enumeration serialised by the C#- compiler automaticaly? I thought so. Have you tried just to define a property for your dash style to see, how it works?
Regards Ralph |
|
|
|
|
|
#7 |
|
Senior Member
|
Sorry but I can't seem to understand what you mean as this stuff is very challenging for me...
I need somehow to try and do what you had mentioned but not sure where to start thanks |
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Jul 2008
Posts: 527
Thanks: 0
Thanked 9 times in 6 posts
|
I understand. In the reference sample section is an example, how to define an own enum to be used with the property grid. I would try to install it and to modify it for your dash style.
http://www.ninjatrader-support2.com/...ead.php?t=3420 Regards Ralph |
|
|
|
|
|
#9 |
|
Senior Member
|
Thank you for pointing me in the right direction Ralph !
|
|
|
|
|
|
#10 |
|
Senior Member
Join Date: Jul 2008
Posts: 527
Thanks: 0
Thanked 9 times in 6 posts
|
If you don't get it working that (simple) way, post it again. We will find a solution.
Regards Ralph |
|
|
|
|
|
#11 |
|
Senior Member
|
Ralph...
Thanks for everything...This seems to work jason Code:
#region Variables private DashStyle hlinestyle = DashStyle.Solid; Code:
protectedoverridevoid OnBarUpdate()
{
DrawHorizontalLine("Current_price",Close[0],LineColor,HorizLineStyle,line_Size);
}
Code:
#region Properties
[Description("Horizontal line style")]
[Category("Parameters")]
public DashStyle HorizLineStyle
{
get { return hlinestyle; }
set { hlinestyle = value; }
}
|
|
|
|
|
|
#12 |
|
Senior Member
Join Date: Jul 2008
Posts: 527
Thanks: 0
Thanked 9 times in 6 posts
|
Looks good, I would have done the same.
Regards Ralph |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to use Gridlines DashStyle - Custom. | shawnj | Charting | 3 | 09-18-2010 12:19 PM |
| Syntax for Adding DashStyle and Width for plot | commodity_trader | Miscellaneous Support | 3 | 09-04-2008 10:17 AM |
| 6.5 Bug GridLines DashStyle Custom | shawnj | Charting | 10 | 06-03-2008 11:35 PM |
| DashStyle within Plot Method | whitmark | Suggestions And Feedback | 1 | 12-11-2007 08:23 AM |
| DashStyle.Custom...? | funk101 | Indicator Development | 3 | 05-06-2007 08:34 AM |