View Full Version : Candle Clear
Gumphrie
08-12-2007, 03:45 PM
This is an indicator that attempts to correct several things I hear people complaining on the forum they can't do with candle sticks.
1. If you have too many indicators on the chart and can't see the candles / prices any more. Note for this to work you need to add this indicator last in your list of added indicators.
2. If you want your candles to be strictly OHLC which by default on NT they are not.
3. If you want a thicker wick on your candles. You need to change the default input parameter for this to work.
4. If you have changed your chart background colour but can't work out what to set the wick colour to, this will automatically set the border/wick colour for you.
I would post a screenshot, but the idea is it looks just like normal candle sticks, taking on the up/down colour settings in properties, but with these added features or 'properties'.
ChangeLog: Updated 14th Aug 2007 - Vers 0.2 - I had left a debug line in the code which meant that down bars were always red, rather than being the colour set in chart properties.
Updated 18th May 2008 - Vers 0.4 - Now comes with configurable wick and outline colour options.
Updated 19th May 2008 - Vers 0.5 - Fixed lower wick out by one pixel problem.
To import:
- Download the file contained in this thread to your desktop
- From the Control Center window select the menu File > Utilities > Import NinjaScript
- Select the downloaded file
NinjaTrader_Josh
08-12-2007, 03:50 PM
Thanks Gumphrie. A nice temporary workaround solution for having the databars on top of the indicators.
Gumphrie
08-12-2007, 04:04 PM
Note it only attempts to do this stuff with candlesticks, not OHLC bars or anything else.
exdmd
08-18-2007, 02:11 AM
Thanks for this, really makes a difference on my candlestick charts.
barabba
01-18-2008, 04:15 AM
Thank you, it's exactly what I was looking for.
However, on my NT 6.5, the bars were all plotted one pixel down comparing to the original NT candles.
I found that subtracting 1 from the variables y1, y2, y3 and y4, ClearCandles exactly match NT candles.
Just add these lines after y1,y2,y3,y4 initialization inside the paint() method:
y1--;
y2--;
y3--;
y4--;
Sergio66
02-08-2008, 02:25 PM
Gumphrie, thanks a lot for this useful tool!!
Regarding the point 4:
4. If you have changed your chart background colour but can't work out what to set the wick colour to, this will automatically set the border/wick colour for you.
How can I disable the function to set automatically the color with the chart backgound'
What script I need to change/replace to hold my preferred wick colour?
Thank you
Sergio
Gumphrie
02-08-2008, 04:46 PM
Hi Sergio,
Here's a version that works the way you require by not automatically creating the candle border colour from the background, but just inheriting the present settings.
I've also added the fix that was contributed by barabba.
I'll leave this posted here and won't update the original post for now in case that fix is a 6.0 or 6.5 issue and as someone may still want the auto colouring facility.
To import:
- Download the file contained in this thread to your desktop
- From the Control Center window select the menu File > Utilities > Import NinjaScript
- Select the downloaded file
Sergio66
02-09-2008, 01:47 AM
Thank you very much!
Sergio
jojotrader
02-14-2008, 04:28 AM
Hello,
Is it possible to have the wicks ticker?
That would be a nice addition to the outlines in black....
Thanks, Jojotrader
Gumphrie
02-14-2008, 08:23 AM
Is it possible to have the wicks ticker?
That would be a nice addition to the outlines in black....
Thanks, Jojotrader
You mean thicker than the thick wick=true option??
jojotrader
02-14-2008, 08:46 AM
Yes,
If I can add something like WickTickness = Wick 2px.....(possible pixel adjustment) that would be awesome, then my charts are perfect...
This is what I use now for my candles.
BarColor = Color.Lime;
CandleOutlineColor = Color.Black;
Thanks for the comment,
Jojotrader.
Gumphrie
02-14-2008, 09:10 AM
Well the thick wick=true pixel width is set on line 123 of the version I last posted. If you specify a thick wick it gives you a pixel width of 3, it has to be an odd number or the wick is drawn to one side of the candle. Playing with that should give you what you want I guess...
jojotrader
02-14-2008, 10:02 AM
Can't get it done, but anyway thanks for the advice.
Maybe I'm looking for some easy doing here.....
Jojotrader
Sergio66
04-05-2008, 03:44 AM
Hello Gumphrie,
May I ask you if it's possible to set an individual color for:
1) Wick of Candle Up
2) Wick of Candle down
3) Outline Candle Up
4) Outline Candle down
Thank you
Sergio66
04-06-2008, 03:16 AM
I 've attached a picture of what I mean
Sergio66
05-18-2008, 12:42 AM
Gumphrie,
can you tell me if you are able to do it, or you have no time for this?
Thank You
Gumphrie
05-18-2008, 06:08 AM
Hi Sergio,
Apologies, I'd forgotten about this as had been busy. Please find updated in first post..
jojotrader
05-18-2008, 01:42 PM
Hi,
I saw the post from baraba, but if I'm looking in my scripts, I already have that changed version.
But, it don't make any difference, I have still wicks that are printing one pixel lower than original candles.
What can I do about it....
If you have an answer, please reply .
Thanks for the effort.
jojotrader
Gumphrie
05-18-2008, 02:32 PM
Hi jojotrader,
I don't get that problem, are you running NT 6.5?
Does anyone else have this problem?
jojotrader
05-19-2008, 05:09 AM
Yes Sir,
I do have Ninja 6.5.0.10
Example in attachement but you barrely see it 100%....
jojo
Gumphrie
05-19-2008, 05:38 AM
Hi jojo,
Sorry, having difficulty seeing this. So if you have a cross hair cursor, do single tick bars not overlap with the cross hair horizontal line?
Thanks.
Gumphrie
05-19-2008, 05:41 AM
Ah, you mean the bottom wicks? I think I see that now. Are your top wicks ok?
jojotrader
05-19-2008, 07:12 AM
Yes,
Tops wicks are ok, only bottem wicks are one pixel lower.
Thanks
Jojo
Gumphrie
05-19-2008, 07:29 AM
Hi jojo,
Updated first post. Phew, you must have good eyesight to spot that!
Regards,
Gumphrie
jojotrader
05-19-2008, 07:33 AM
Yeah, and you have to be a very fast scriptbuilder to do that....
Thank you again,
Have a good one.
Jojotrader :)
Sergio66
05-21-2008, 01:14 AM
Great! Thank You very much! :)
Sergio
zw888
05-27-2008, 10:58 PM
Thanks, it's great
jasonf
11-07-2008, 07:49 PM
is it possible to paint the inside of the candle black for an inside bar?
Gumphrie
11-07-2008, 08:39 PM
Sure, if you look within the Plot override function in the code you will see that it references "ChartControl.ChartStyle.UpColor" and "ChartControl.ChartStyle.DownColor". You would change these to the colour you want, so in your case "Color.Black".
Within the Plot method 'while loop' you can reference OHLC values of the current bar by calling "open.Get(index)", "high.Get(index)","low.Get(index)", close.Get(index)". If you want to look at the previous bar's values use 'index-1', but always make sure that index is at least 1 to begin with.
As an example please find attached "ModCandleClear", the code of which you can compare to the original. It in effect runs the following pseudo code :
if High[0]<High[1] && Low[0]>Low[1]
color = black
cipher4d
06-01-2009, 03:22 PM
Has anybody modifed this indicator to allow the user to adjust the thickness of the wicks? Thx
Gumphrie
06-01-2009, 04:45 PM
Has anybody modifed this indicator to allow the user to adjust the thickness of the wicks? Thx
That's in there as a parameter.
cipher4d
06-01-2009, 06:55 PM
That's in there as a parameter.
sry, I should have worded my question better. :D
Has anybody moded this indicator so you can adjust the thickness of the wicks beyond the true/false wick parameter, so the user has more control
over the width through a numbers input.
Gumphrie, I just want to thank you for sharing this wonderful indicator. Much appreciated.
Gumphrie
06-02-2009, 02:11 AM
No problem, the reason why its only true/false is that you can only really use odd numbers as the wick width, 1,3,5 etc.. or you end up with a lop-sided wick and as 5 is too thick that just leaves 1 or 3, which is what the true/false corresponds to.
T2020
07-25-2009, 12:07 PM
Just wondering what it would take to make this work on bar charts as well ?
I use it to cover up longer term Ma's .
thx
Gumphrie
07-26-2009, 05:13 PM
Just wondering what it would take to make this work on bar charts as well ?
You can do that already with the right settings on my MTF indicator posted here - http://www.ninjatrader-support2.com/vb/showthread.php?t=3185
You'll need remove the original bars by setting the colors to transparent in chart properties. then in the MTF properties change the following :
multiplier : 1
Panel : 1
Plot Override: True
Plot Override Type: OHLC
You can edit the Up/Down colors in the MTF properties as well.
Happy Trading!
T2020
07-26-2009, 07:06 PM
You can do that already with the right settings on my MTF indicator posted here - http://www.ninjatrader-support2.com/vb/showthread.php?t=3185
You'll need remove the original bars by setting the colors to transparent in chart properties. then in the MTF properties change the following :
multiplier : 1
Panel : 1
Plot Override: True
Plot Override Type: OHLC
You can edit the Up/Down colors in the MTF properties as well.
Happy Trading!
Hummm . Not having any luck so far . Any thing else need to be
changed ? thx
Gumphrie
07-26-2009, 07:14 PM
Hummm . Not having any luck so far . Any thing else need to be
changed ? thx
Sorry, you're right, I forgot one:
Price Indicator Scale: False
T2020
07-26-2009, 09:43 PM
Sorry, you're right, I forgot one:
Price Indicator Scale: False
There it is . Thanks much .