Login Page - Create Account

Support Board


Date/Time: Thu, 28 Mar 2024 17:43:09 +0000



[User Discussion] - Bars forming outside keltner channel

View Count: 2854

[2013-11-08 11:43:46]
User70152 - Posts: 20
I want to place arrow and audio alert on a candle forming outside a keltner channel. High and low of the candle should be outside the channel. Up arrow at the low of the candle outside upper channel and down arrow on high of the candle outside lower channel. I want to change color of the candle too. It should work on all time frames like minute, tick, volume and range bars. How can I achieve this?
[2013-11-08 13:51:52]
Sawtooth - Posts: 3952
1) Add 2 instances of the Color Bar Based On Alert Condition study.

Put this in the Alerts tab of the High alert instance:
=AND(H[-1]<ID1.SG2[-1],H>ID1.SG2)
Put this in the Alerts tab of the Low alert instance:
=AND(L[-1]>ID1.SG3[-1],L<ID1.SG3)

This will color the price bars.

2) Add 2 more instances of the Color Bar Based On Alert Condition study.
-set the Output When Condition True to Use Input Data
-set the Input Data to Low in the High alert instance
-set the Input Data to High in the Low alert instance
-set the Draw Style to Arrow Up in the High alert instance
-set the Draw Style to Arrow Down in the Low alert instance
-use the same formulas from 1) above.

This will place arrows at the colored bars

The formulas assume the Keltner is ID1.
[2013-11-08 16:01:31]
User70152 - Posts: 20
Unfortunately it did not work. I am showinga picture at link below. your solution paints the candle at wrong spot. what I want is in red circles. I dont know how to insert images in posts yet. Thanks

https://dl.dropboxusercontent.com/u/6786038/keltner.PNG
[2013-11-08 16:10:37]
Sawtooth - Posts: 3952
The formulas I gave only alert on the first crossing. If you want every bar's crossing, use these instead:

=H>ID1.SG2
=L<ID1.SG3


[2013-11-08 16:17:28]
User70152 - Posts: 20
I am not talking about crossings. I want high, low , open and close of a bar to be above the upper channel and vice versa for lower channel. Please see my picture.
[2013-11-08 17:38:09]
Sawtooth - Posts: 3952
Then use these:
=L>ID1.SG2
=H<ID1.SG3

It would be useful for you to examine the formulas I've given to understand the syntax so that you can create/modify your own. Another place to look at is the documentation for alerts:
http://www.sierrachart.com/index.php?l=doc/doc_AlertCondAndScan.html
[2013-11-08 18:00:23]
User70152 - Posts: 20
got it. It worked. How do I trigger it on first bar only.
[2013-11-08 23:39:11]
Sawtooth - Posts: 3952
Modify the formulas in post #2. Swap H for L, and L for H.

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

Login

Login Page - Create Account