Hi,
Is it possible to show an indicator value as Candles?
(Open, High, Low, Close values of the indicator through "Update on every tick").
Indicator value as Candle-Chart
- konstantin
- Posts: 69
- Joined: 24 Dec 2007
- Location: Europe
- Has thanked: 2 times
- Been thanked: 1 time
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
- konstantin
- Posts: 69
- Joined: 24 Dec 2007
- Location: Europe
- Has thanked: 2 times
- Been thanked: 1 time
Thanks TJ.
I'm not sure how to do this.
The indicator I want to plot has only one value.
I plot it e.g. below a 5 minute chart. Since I have set the "Update on every tick" to true, the indicator value changes constantly during the 5 min price bar is building.
So the indicator value has an open, high, low, close, but these values are not generated by the code, these values should be generated by the different indicator values during updating "tick by tick".
I hope this is understandable.
I'm not sure how to do this.
The indicator I want to plot has only one value.
I plot it e.g. below a 5 minute chart. Since I have set the "Update on every tick" to true, the indicator value changes constantly during the 5 min price bar is building.
So the indicator value has an open, high, low, close, but these values are not generated by the code, these values should be generated by the different indicator values during updating "tick by tick".
I hope this is understandable.
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Thanks TJ.
I'm not sure how to do this.
The indicator I want to plot has only one value.
I plot it e.g. below a 5 minute chart. Since I have set the "Update on every tick" to true, the indicator value changes constantly during the 5 min price bar is building.
So the indicator value has an open, high, low, close, but these values are not generated by the code, these values should be generated by the different indicator values during updating "tick by tick".
I hope this is understandable.
can you draw a picture?
with notes on the picture illustrating your thoughts?
- konstantin
- Posts: 69
- Joined: 24 Dec 2007
- Location: Europe
- Has thanked: 2 times
- Been thanked: 1 time
It's very simple:
On a 5 min candlechart:
The price-candlechart has open, high, low and close, but there is only one value which builds the candlechart during the 5 minutes, it is price.
I want the same with an indicator-value: Instead of price, the indicator value builds the indicator-candlechart during the 5 minutes (in an indicator pane).
On a 5 min candlechart:
The price-candlechart has open, high, low and close, but there is only one value which builds the candlechart during the 5 minutes, it is price.
I want the same with an indicator-value: Instead of price, the indicator value builds the indicator-candlechart during the 5 minutes (in an indicator pane).
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
it can be done...
may I suggest the first post in this thread:
http://forum.tssupport.com/viewtopic.php?t=6929
may I suggest the first post in this thread:
http://forum.tssupport.com/viewtopic.php?t=6929
- konstantin
- Posts: 69
- Joined: 24 Dec 2007
- Location: Europe
- Has thanked: 2 times
- Been thanked: 1 time
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
- konstantin
- Posts: 69
- Joined: 24 Dec 2007
- Location: Europe
- Has thanked: 2 times
- Been thanked: 1 time
- konstantin
- Posts: 69
- Joined: 24 Dec 2007
- Location: Europe
- Has thanked: 2 times
- Been thanked: 1 time
If anyone is interested, I made this code.
Maybe not perfect but it works.
Plot-Settings see attachment.
Maybe not perfect but it works.
Code: Select all
{Attention: Updates in Realtime only!
20090104
Konstantin }
inputs: UpColor( RGB(0,255,0)),DnColor( RGB(255,0,0) ), candlewickcol(blue);
vars: intrabarpersist indicatorvalue(0), intrabarpersist mycurrentbar(0), intrabarpersist IndClose(0), intrabarpersist IndOpen(0), intrabarpersist IndHigh(0),
intrabarpersist IndLow(0), intrabarpersist color(0), IndOpCl(0);
{Put any code for indicatorvalue here:}
indicatorvalue = Average(Close, 3);
if currentbar > mycurrentbar then begin
IndOpen = indicatorvalue;
IndHigh = indicatorvalue;
IndLow = indicatorvalue;
IndClose = indicatorvalue;
end;
mycurrentbar = currentbar;
If mycurrentbar = currentbar then begin
If indicatorvalue > IndHigh then IndHigh = indicatorvalue;
If indicatorvalue < IndLow then IndLow = indicatorvalue;
IndClose = indicatorvalue;
end;
if IndClose > IndOpen then
color = UpColor
else
color = DnColor;
IndOpCl = Indopen;
plot1(IndOpen, "O", color);
plot2(IndHigh, "H", candlewickcol);
plot3(IndLow, "L", candlewickcol);
plot4(IndClose, "C", color);
If Indopen = IndClose then plot5(IndOpCl, "OC", candlewickcol)
else
NoPlot(4);
- Attachments
-
- Settings.jpg
- (109.24 KiB) Downloaded 994 times