![]() |
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 |
|
Junior Member
Join Date: Dec 2007
Posts: 4
Thanks: 0
Thanked 0 times in 0 posts
|
Hello, I am trying to edit/develop a simple indicator which will plot colored bars instead of lines.(so when its an up cross all bars are one color and when its a down cross bars are another color.
I was looking at editing the heikenashi, cut out the code and enter something like "if ma1 cross over ma2, plot green".. you get the point. I did this on tradestation, however it will take me a little while to get used to ninjascript any advice how to convert ma crosses into bars? thank you |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Instead of PlotStyle.Line use PlotStyle.Bars when you are adding the plot in the Initialize() method.
http://www.ninjatrader-support.com/HelpGuideV6/Add.html http://www.ninjatrader-support.com/H...deV6/Plot.html
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Dec 2007
Posts: 4
Thanks: 0
Thanked 0 times in 0 posts
|
thank you, yes thats what I tried before.
However the lines go all over the screen and not on the bars ... I must be doing it wrong. |
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Are you trying to just paint the price bars a different color? If thats the case then you want to use BarColor = Color.Green. Or something like that.
http://www.ninjatrader-support.com/H.../BarColor.html
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Dec 2007
Posts: 4
Thanks: 0
Thanked 0 times in 0 posts
|
Right on the money! thank you there Josh. TradeStation spoiled me I guess. haha.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Multi Color Plot Question | TraderGuy | General Programming | 2 | 11-12-2007 04:39 PM |
| Use Indicator plot color in DrawLine() | MJT | Indicator Development | 1 | 06-01-2007 03:13 PM |
| Color Plot Problem on Modified CCI Indicator | KBJ | Indicator Development | 5 | 04-18-2007 01:21 PM |
| Changing Plot color within code | tquinn | Indicator Development | 8 | 02-19-2007 08:27 AM |
| How to plot text (outside of bars) | richard | Indicator Development | 1 | 06-07-2006 08:31 PM |