Support Board
Date/Time: Tue, 26 Nov 2024 22:37:52 +0000
[User Discussion] - Vertical line for engulfing bars
View Count: 3889
[2014-04-30 16:31:42] |
Dom7364 - Posts: 257 |
Is there a way to have an automatically drawned vertical bar each time we have an engulfing bar (red vertical if red engulfing candle and green for green candle)?
|
[2014-05-22 09:09:33] |
Dom7364 - Posts: 257 |
Was wondering if anyone had done that somehow. Might be the case of a simple alert, but might be easier/quicker if someone has doen this before. Many thanks. |
[2014-05-22 13:06:46] |
Sawtooth - Posts: 4120 |
Are you using the Outside Bar study to find the engulfing bars?
|
[2014-05-22 13:33:47] |
Dom7364 - Posts: 257 |
no, but open to any suggestion really..
|
[2014-05-22 13:44:09] |
Sawtooth - Posts: 4120 |
Try this: 1) Add the Outside Bar study, and check Hide Study, 2) Add the Color Bar Based On Alert Condition study, and put this formula on the Alerts tab: =AND(ID1.SG1>0,C>O) This is for up bars. 2) Add another Color Bar Based On Alert Condition study, and put this formula on the Alerts tab: =AND(ID1.SG1>0,C<O) This is for down bars. -The formulas assume the Outside Bar study is ID1. -Choose the Draw Styles and colors for up bars and down bars. Date Time Of Last Edit: 2014-05-22 13:45:27
|
[2014-05-22 13:57:16] |
Dom7364 - Posts: 257 |
Many thanks... But it doesn't seem to be working..In what sense does the outside study bar serve any purpose?
|
[2014-05-22 14:08:19] |
Sawtooth - Posts: 4120 |
The Outside Bar study finds the engulfing bars. You could instead include the formula for an engulfing bar within the color bar's formulas.
|
[2014-05-22 14:09:54] |
Dom7364 - Posts: 257 |
sure but how does the Color bar based study interacts with the Outside bar study?
|
[2014-05-22 14:12:46] |
Dom7364 - Posts: 257 |
sorry, being thick. Just had to change ID1 to the Outside bar study ID. Doen that but doesn't work though. No error or anything..
|
[2014-06-04 16:51:32] |
Dom7364 - Posts: 257 |
can't get this to work, damn!
|
[2014-06-04 17:12:48] |
Sawtooth - Posts: 4120 |
For a working example of this, use the attached Study Collection on a new blank chart. Up engulfing bars are cyan Down engulfing bars are magenta -Put the attached in your Sierra Chart \Data folder -Open a new chart (not a range bar chart) -click on Analysis >> Engulfing bars |
Engulfing bars.StdyCollct - Attached On 2014-06-04 17:12:37 UTC - Size: 27.98 KB - 446 views |
[2014-06-04 17:21:13] |
Dom7364 - Posts: 257 |
Many thanks..Much appreciated...Not possible to apply to a bar chart then?
|
[2014-06-04 18:11:31] |
Sawtooth - Posts: 4120 |
All bars are the same range on a range bar chart, so there will be no engulfing bars. It will work on any other bar type. |
[2014-06-04 18:48:46] |
Zosimus - Posts: 345 |
I think this custom study will do what you are looking for. This is the source file so you have to save it in the ACS_Source folder. Then you will have to build it on your machine: Analysis >> Build Custom Studies DLL >> Select File(s) choose the EngulfingBar_Vline file and press the Build Custom Studies DLL button. After the build is done (you will get a message "End of Build") you will find the study in the custom studies list (Analysis >> Studies >> Add Custom Study). I hope this helps. |
EngulfingBar_Vline.cpp - Attached On 2014-06-04 18:48:24 UTC - Size: 2.05 KB - 458 views |
[2014-06-05 13:26:14] |
Dom7364 - Posts: 257 |
Many thanks to you both, real class.. Tomgilb, apologies for my dumb question..Indeed a defined range bar is defined and won't engulf anything= :-) Thanks all the same.. |
[2014-06-05 13:30:05] |
Zosimus - Posts: 345 |
You're welcome, This version doesn't use different colors for Bullish/Bearish bars. If you want different colors let me know and also the rule that I use for the engulfing bar is that it's low has to be lower than the previous bar's low and it's high higher. if your rule is different let me know and I'll change it. |
[2014-06-05 13:37:46] |
Dom7364 - Posts: 257 |
Thanks, your help is much appreciated. In fact, yes ideally, I would have a red vertical line for bearish engulfin and green for bullish. Defintion-wise, well yes, the low mus be lower, the high higher, and the body, in short every part of the bar is engulfing the previous one. To be really technical about it, it normally should be considered as such, on a support or resistance zone, but the bar engulfing fully the previous one is good enough, I can determine and decide for myself if it occurs on a responsive buyng or responsive selling zone and act accordingly, or it might become rather difficult to code.. :-) Date Time Of Last Edit: 2014-06-05 13:39:37
|
[2014-06-05 13:44:53] |
Dom7364 - Posts: 257 |
Yon, not abusing your kindness, but how do we set to have those vertical bars? I was trying to combine and overlay charts and studies to get a green vertical bar growing in intensiveness each time the Nyse$ tick was below -600, -800, and -1000, and a red bar growing in intensiveness each time it went above 600, 800 and 1000, but it never worked.. The ideal way would have been to have it as a study to add to another charts, ecactly as you have built for the engulfing bar, but let's say that my programming skills are close to none... :-)
|
[2014-06-05 14:22:36] |
Zosimus - Posts: 345 |
Dom7364, First I am attaching an improved version for the Engulfing Bars. You can now have different colors and different line styles for Bullish/Bearish bars. You can change the settings in the Subgraphs setting. Also I adjusted the rules. As to your second question. The only way I know for getting a vertical line when certain conditions are met is programmatically but it might also be done with other methods. I am not sure that I understood what you wanted. If you want to get a vertical line when the Nyse Tick moves Higher or lower than certain values it can be done but it might take a few days before I find time for this. |
EngulfingBar_Vline.cpp - Attached On 2014-06-05 14:19:57 UTC - Size: 4.85 KB - 559 views |
[2014-06-05 14:28:09] |
Dom7364 - Posts: 257 |
Thanks a million Yon.. Strangely, it doesn't displays any vertical lines with the new version.. Not sure what I am doing wrong..?
|
[2014-06-05 14:34:43] |
Zosimus - Posts: 345 |
The new rules are pretty tough and you will not find many such bars. The current rules demand that the high will be higher and the low lower and the body will also be bigger (on both sides). |
[2014-06-05 14:39:01] |
Dom7364 - Posts: 257 |
I see.. :-) Can I just change the name of the initial version, and add it, so I have the "tough" last version, and the initial one where the candle encluding its wicks just has to engulf the prvious one? |
[2014-06-05 15:54:35] |
Zosimus - Posts: 345 |
Instead of using two different studies I added an option to choose the "Mode". Mode 1 - wicks only Mode 2 - Body too. Use the Settings and Inputs of the study to change the mode (the default is 1). |
EngulfingBar_Vline.cpp - Attached On 2014-06-05 15:54:20 UTC - Size: 6.4 KB - 546 views |
[2014-06-05 16:26:23] |
Dom7364 - Posts: 257 |
Many thanks indeed.. Brilliant, that's great, :-))) Really appreciate this.. |
[2014-06-07 16:36:43] |
Dom7364 - Posts: 257 |
If you ever got the chance to do something similar with Nyse tick, that would just be great, but of course, I do understand it takes time etc, so please no rush, only if you've some spare time. Either way, thanks very mch indeed Yon.. :-) |
To post a message in this thread, you need to log in with your Sierra Chart account: