Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 22:04:44 +0000



[User Discussion] - paint candles

View Count: 2609

[2013-08-01 05:02:28]
Jim - Posts: 31
Hello,

Is there a study where a candle can be painted only after 3 consecutive higher closes in a row? Same goes for three consecutive lower closes. Thanks in advance for your help.
[2013-08-01 05:21:17]
Sawtooth - Posts: 3976
You can color the candle based on these conditions using the Color Bar Based On Alert Condition study. This would be the formula to use on the Alerts tab:

=OR(AND(C>C[-1],C[-1]>C[-2],C[-2]>C[-3]),AND(C<C[-1],C[-1]<C[-2],C[-2]<C[-3]))
[2013-08-01 23:13:28]
Jim - Posts: 31
Thanks Tom for the reply. I inputed the formula and at times there are multiple paint candles in a row. I need the candle that opens after 3 consecutive lower closes or 3 consecutive higher closes to be painted. Once condition is met and a candle is painted, the process resets. (I included a screenshot) Again, I appreciate your help.
imagepaint candle.PNG / V - Attached On 2013-08-01 23:12:30 UTC - Size: 34.4 KB - 547 views
Attachment Deleted.
[2013-08-02 00:25:43]
Sawtooth - Posts: 3976
Your 3rd arrow points to the 4th lower close, and the 'first one painted' arrow points to the 5th lower close. Please clarify.

Do you want the 4th candle painted after 3 lower closes, even if it's not a lower close?
Do you want 4 lower closes and only paint the first occurrence?
[2013-08-02 05:12:15]
Jim - Posts: 31
Apologies for the confusion. I hope this clear things up. This example is a short setup. Need the reverse for a long setup. Thanks for your patience.
imagepainted 2.PNG / V - Attached On 2013-08-02 05:11:50 UTC - Size: 19.16 KB - 535 views
[2013-08-02 14:34:12]
Sawtooth - Posts: 3976
That is not the same as your original post. Try this:

=OR(AND(C>C[-1],C[-1]>C[-2],C[-2]>C[-3],C[1]<L,C[2]<L[1]),AND(C<C[-1],C[-1]<C[-2],C[-2]<C[-3],C[1]>H,C[2]>H[1]))
[2013-08-02 18:27:17]
Jim - Posts: 31
There are times when the conditions have been met but no candles are being painted. In the attachment, at the left the signal worked, and that was the last candle that painted. Occurrences 2-4 should have created a paint candle but didnt. Thanks again for help.
imagepaint candle 3.PNG / V - Attached On 2013-08-02 18:27:11 UTC - Size: 51.54 KB - 643 views
[2013-08-02 18:49:11]
Sawtooth - Posts: 3976
Your conditions are increasingly complex and are now beyond the ability of a 'Simple Alert'.

It could probably be done with a spreadsheet study, and certainly with custom ACSIL programming.

Here is a list of programmers that could do this for you:
http://www.sierrachart.com/index.php?l=doc/SierraChartStudyAndSystemProgrammers.html
Date Time Of Last Edit: 2013-08-02 18:51:25
[2013-08-02 19:56:04]
Jim - Posts: 31
Ok, I will check them out. Thank you for your efforts. Have a great weekend.

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

Login

Login Page - Create Account