Login Page - Create Account

Support Board


Date/Time: Sat, 23 Nov 2024 11:16:35 +0000



[User Discussion] - Colour Price Bars.

View Count: 1833

[2013-07-03 09:27:41]
User74484 - Posts: 6
I use Renko bars and want to colour them when price reverses x number of points.
For instance, if a 4 Renko bar closes and then reverses 12 points I want the bar to change colour -
and then so on etc.
What colour bar study should I use and how do you write the code etc.
Many thanks.
[2013-07-03 11:07:58]
Sierra Chart Engineering - Posts: 104368
For this you need to use the Color Bar Based On Alert Condition study:

http://www.sierrachart.com/index.php?l=doc/doc_TechnicalStudiesReference.html#s252

We do not write formulas. You will need to work out the formula.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2013-07-03 13:19:17]
Sawtooth - Posts: 4118
Try this:

Add two instances of the Color Bar Based On Alert Condition study, one for each color/direction.

Put this in the Alerts tab of the 'go long' instance:
=AND(C[-2]<O[-2],C[-1]>O[-1],C>O)

Put this in the Alerts tab of the 'go short' instance:
=AND(C[-2]>O[-2],C[-1]<O[-1],C<O)

This only works if the reversal amount is 3 times the renko bar size.
[2013-07-03 19:20:40]
User74484 - Posts: 6
tomgilb - Many thanks for your reply, but I cannot get it to work. I get an error message "Invalid formula".
But thanks for trying. ( Which is more than can be said for SC support!!)
[2013-07-03 23:27:21]
M5amhan - Posts: 468
it does work i just checked it

see attached picture
Date Time Of Last Edit: 2013-07-03 23:29:02
imageCL.PNG / V - Attached On 2013-07-03 23:29:00 UTC - Size: 33.45 KB - 554 views
[2013-07-03 23:43:19]
Sawtooth - Posts: 4118
User74484, don't type the formulas; copy/paste them. That way there will be no typos.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account