Support Board
Date/Time: Sun, 24 Nov 2024 20:46:15 +0000
[User Discussion] - simple code request
View Count: 1585
[2016-01-20 15:34:43] |
EuropeanTrader - Posts: 290 |
Hello everyone! Please see this chart: http://www.sierrachart.com/image.php?l=1453303947523.png There are 2 classic Sierra indicators: Averagetruerange(14) and SwingHIghandLow(10/2/yes) I want to see when a leg (difference between last swing high and low or vice versa) is bigger then 3xATR value shown. How can I see that on a chart? Can someone help me do this, please? Thank you! Date Time Of Last Edit: 2016-01-20 15:35:16
|
[2016-01-20 18:02:15] |
Sierra Chart Engineering - Posts: 104368 |
Sounds like you need to create an Alert Condition Formula for this. We recommend using the Color Bar Based on Alert Condition study: https://www.sierrachart.com/index.php?page=doc/doc_TechnicalStudiesReference.html#s245 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 |
[2016-01-21 14:03:53] |
EuropeanTrader - Posts: 290 |
Hello, thank you, I appreciate the advice. I am aware of those capabilities, however I find myself not equipped enough to write such alert. Is there anybody outhere that can write this alert line? Thank you!! |
[2016-01-21 14:41:10] |
Sawtooth - Posts: 4120 |
What you want to do is beyond the capability of Simple Alerts. It could be done with a spreadsheet study. |
[2016-01-22 09:30:37] |
EuropeanTrader - Posts: 290 |
Yes, I know "tomgilb" but I am not proficient enough in them. Can you help me make it in a simple efficient manner? |
[2016-01-22 13:38:27] |
Sawtooth - Posts: 4120 |
To make it as simple as possible, what are the ID#s of your ATR and Swing H&L studies?
Date Time Of Last Edit: 2016-01-23 14:24:14
|
[2016-01-23 17:34:53] |
Sawtooth - Posts: 4120 |
Attached is a spreadsheet file that will do this. Put it in your Sierra Chart \Data folder. Then do this: 1) Add the Spreadsheet System/Alert study -Click on the Select button next to the Spreadsheet Name field and choose ATRSwingHL -On the Subgraphs tab, set the Draw Style of 'Swing H-L > ATR*n' to Color Bar 2) Edit formulas in these cells: O3 & P3: change the ID#s to the one of your Swing High and Low study. S3: change the ID# to the one of your ATR study. The ATR multiplier is in cell S1 and can be edited. This setup will color the price bars when the most recent Swing H minus the most recent Swing L is greater than the ATR times its multiplier. |
ATRSwingHL.scss - Attached On 2016-01-23 17:32:10 UTC - Size: 145.8 KB - 501 views |
[2016-01-23 18:47:22] |
EuropeanTrader - Posts: 290 |
Hi, sorry for late reply. I was just about to write you. I did that now, and I can't make it work. I think I followed your instructions to the letter. Any suggestions? http://www.sierrachart.com/image.php?l=1453574855118.png And can you please explain what are all these Moving averages, Tenkan sen etc. numbers? I dont have any such indicator on my chart (pls see attached file also) Thanks! Date Time Of Last Edit: 2016-01-23 19:17:14
|
errrrrrrr.png / V - Attached On 2016-01-23 18:55:04 UTC - Size: 102.77 KB - 387 views |
[2016-01-23 21:52:34] |
Sawtooth - Posts: 4120 |
Go to the ATRSwingHL spreadsheet settings and: -Set the Chart Region to 1 -Set the Draw Styles of SG2, SG3, SG4 to Ignore Did you edit the formulas in cells O3, P3, S3 to the ID#s given to your ATR and Swing H&L studies? I forgot to delete the data in columns above AD. That is left over from testing my instructions on a chart with other studies. To remove that superfluous data, highlight columns AA and above and press DEL. |
[2016-01-24 10:07:32] |
EuropeanTrader - Posts: 290 |
Hi, ok, great! Yes I did all that. I want to see this with live data, markets are closed now http://www.sierrachart.com/image.php?l=1453630002320.png Thanks! Will get back to you. P.S. How can I open the .scss file and see what you wrote? :) |
[2016-01-24 14:35:23] |
Sawtooth - Posts: 4120 |
It looks like you have what you want. It will look the same with live data. P.S. How can I open the .scss file and see what you wrote? :)
-The spreadsheet will open when you open the chartbook.-If you want to look at the spreadsheet without opening the chartbook, go to File >> Open Spreadsheet. |
[2016-01-29 11:25:40] |
EuropeanTrader - Posts: 290 |
Hi, please see this: http://www.sierrachart.com/image.php?l=145406671590.png I assume red color should mark the overxtended swing? This is live swing and its not. Do I read it correctly? Its more then 3atr big. Thank you! |
[2016-01-29 13:16:59] |
Sawtooth - Posts: 4120 |
The previous Swing H is at about 9703, not 9770.
|
[2024-04-28 17:48:19] |
User411320 - Posts: 289 |
Hey Sawtooth, does this study work with the updates sierra? because I'm having issues setting it up. Most likely my error though
|
[2024-04-28 23:02:22] |
Sawtooth - Posts: 4120 |
does this study work with the updates sierra?
Yes, it does.Follow the directions in post #7 and post #9. |
[2024-05-03 17:31:19] |
User411320 - Posts: 289 |
Hey Sawtooth, so I think I finally got it working correctly. a couple questions if you have the time The length I have for SwingHL study is set to 1 because if I increase it, it ends ups coloring all the bars. is that how it's suppose to work? The length I have for ATR is at 2 because increasing it will also color all the bars. Is that normal as well? Also is there a way to select different colors (2 colors, swing and low)? Thanks |
Screenshot 2024-05-03 132717.png / V - Attached On 2024-05-03 17:31:14 UTC - Size: 54.56 KB - 53 views |
[2024-05-03 20:03:43] |
Sawtooth - Posts: 4120 |
The length I have for SwingHL study is set to 1 because if I increase it, it ends ups coloring all the bars. is that how it's suppose to work?
The length I have for ATR is at 2 because increasing it will also color all the bars. Is that normal as well?
Not necessarily, but some combinations of setting will color all of the bars.Also is there a way to select different colors (2 colors, swing and low)?
No, because this study is looking at the Swing HL range.
|
To post a message in this thread, you need to log in with your Sierra Chart account: