Login Page - Create Account

Support Board


Date/Time: Fri, 29 Nov 2024 21:59:00 +0000



[Programming Help] - Programming Help - Candle identification

View Count: 1034

[2022-12-29 03:43:05]
SnowLeopard - Posts: 6
Hello, I am trying to build (sorry rookie here) Hieken Ashi based system. I am using Candle stick pattern identified study, but i couldn't find Spinning bearish/bullish top & Marubozu candle patterns in it.

Can you please help me build a program that alerts when marubozu candle prints after a spinning top.
Date Time Of Last Edit: 2022-12-29 03:46:02
imageScreenshot 2022-12-28 224451.png / V - Attached On 2022-12-29 03:45:25 UTC - Size: 2.33 KB - 149 views
Attachment Deleted.
[2022-12-29 05:09:56]
User183724 - Posts: 183
The Marubozu candle is pretty easy to define but the Spinning top is where i think you'll run into problems... this is what i got off the internet...

What Is a Spinning Top Candlestick?
A spinning top is a candlestick pattern that has a short real body that's vertically centered between long upper and lower shadows.

computers cant use vague language like 'short' or 'shadows'. you'd have to come up with numbers... a shadow is x number of ticks big and a small body is x number of ticks big. as soon as you do that, you start missing signals because the limits you assigned may be too big or too small.

so the smallest spinning top has one tick upper shadow, one tick body size, and a one tick lower shadow ... but what if it had a 10 tick body or a 20 tick lower shadow? are those still spinning top candles?

and what about the postion of the candles relationship to each other? in your picture, the Marubozu is higher than the spinning top. what if they arent in those positions? what if the Marubozu is lower than the spinning top? does it matter...

so it would be on you to first define what your limits are and then its pretty easy to program the alert. one of the easiest ways would be to use the Color Bar Based on Alert Condition study and just put your formula in the alert window
[2022-12-29 18:55:38]
SnowLeopard - Posts: 6
First of all thank you for your reply. :)

The spinning top candles are of 7 ticks. 3 tick upper shadow / 3 tick lower shadow and 1 tick is body. This is fixed for now. Marbozu can be lower or upper, All i am looking for is a marubozu print after a spinning top. Do i have to take direction in account? Attached an example where marubozu is in downtrend after spinning top candle.
imageScreenshot 20.png / V - Attached On 2022-12-29 18:54:19 UTC - Size: 866 B - 118 views
[2022-12-31 05:43:16]
User183724 - Posts: 183
Color Bar Based on Alert Condition

after youve read all that, and want to give it a try... look near the top left of the screen and find ... Analysis... click it then click Studies... under the Studies Available: window, find and click on Color Bar Based On Alert Condition. note... there are several studies with simular names so double check you have this one selected.

click... Add... button at the upper center of this window. Color Bar Based On Alert Condition should appear under the Studies to Graph window. Click on it and a new window opens.

near the top is a line of tabs. click ...Subgraphs. near the middle of the window is a ...Color: button. Its default color is Magenta (Pink). click the button and change the color by clicking Yellow (or anyother color you like...I like yellow because its easy for me to find the bars) and click OK. While your there, in the Draw Style: block next to Color, make sure it reads... Color Bar... which is default. if not, you'll need to click the little down arrow and find Color Bar.

Back up at the top, click Alerts tab


In the Alert Condition: type the following:

C>O

that reads "the close is greater than the open ... green bar". ensure the Enabled square is checked. if not click the little square and a check should be in it. Near the bottom of the window click APPLY. then click OK. after the Studies window comes up, near the bottom, click Apply and then Ok.

All the green candles (except for Doji bars) on your chart should be your new color. This alert only affects this chart. if you want it on other charts you'll need to repeat this exercise on each chart.

By changing the ... C>O ... to another formula, you will identify bars that meet your formula. just repeat the steps above. try ... O>C "open is greater than the close .. red bar" ... that makes all the red bars change... all except Doji bars.. they require their own formulas.

you can hide this study by returning to the studies window, select Color Bar Based On Alert Condition in the Studies to Graph window, and click the 'Hide' box on the middle right side of the window. near the bottom of the window, Click Apply and Ok. the green bars should have their orginal color.

The specific formula you need for your situation is a two bar formula. Its a little complex because you need to identify both green bars and red bars of both types you want to find and then combined them together. you'll also need to use the ticksize key word to set the tick limits for the bars.

Id recommend completing this little exercise first to get a feel for the process before tackling those formulas. for more information:

Study/Chart Alerts And Scanning
Date Time Of Last Edit: 2022-12-31 06:02:37

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

Login

Login Page - Create Account