Support Board
Date/Time: Tue, 26 Nov 2024 08:41:34 +0000
In need of some scanner help
View Count: 559
[2023-12-15 13:52:12] |
User209431 - Posts: 108 |
Good morning, I got a decent amount done last night on my scans but need a few things and likely will have some questions pop up through the day. Preface: Building a scan which will have multiple =AND logic conditions that all must be true. 1) I cannot find a way to access the days range? I need to know where in the range price is for a studies alert. = C > .33%(of todays range) . 2) "On Pace Volume" - Not anything to do with "Pace of tape" or the likes. This one is a little more difficult than above. I was able to code something for NT to do it so hopefully i can here. I need to create an alert that shows how volume is trading and if it is on pace to hit say 10 million by end of day. I did this in NT by creating a 1 period SMA and then it has to go through the logic of bars since open and it did some basic math logic. 10,000,000 / 13 = 769,230 so by 10 o clock the value produced needs to be = C > 769.230 and it would continue through the day. Here is my original NT code if it helps: MyPlot1[0] = (SMA(Volume, Bars.BarsSinceNewTradingDay + 1)[0]);
3) There would have been a 3 here but you guys have an amazing "relative volume" indicator so kudos for that. TIA Date Time Of Last Edit: 2023-12-15 13:55:33
|
[2023-12-15 16:42:27] |
User209431 - Posts: 108 |
Here is my attempt at some color bar alert code. = HODay - C / HODay - LODay* -100 I feel like something like this would work |
[2023-12-15 17:43:18] |
John - SC Support - Posts: 36286 |
1. You need to add a study that will give you what you want. It depends on what you want in terms of the range. There are a few studies such as the following: Average Daily Range Or you can use the "Daily OHLC" and then take the difference between the High and the Low. Refer to the following: Daily OHLC Using the Basic Arithmetic Studies 2. There are lots of ways to do what you want, you just have to figure out how. You could figure out how to do the same formula you had previously, but you may need to use the Spreadsheet Study to do it. Another option would be to use the Numbers Bars Calculated Values study as there is a subgraph for "Volume per Second", which you could use to determine an average volume per second over a time period and then extrapolate that. Refer to the following: Numbers Bars: Displaying Numeric Information Below Numbers Bars For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2023-12-15 17:49:15] |
User209431 - Posts: 108 |
Thanks as always John, Here si the code I am trying to work with in "Spreadsheet study" but it will not plot. (CLOSE - LOW) / (HIGH - LOW) * 100
I have went through it a few times from the "Step By Step spreadsheet" instructions. any advice is appreciated. Date Time Of Last Edit: 2023-12-15 17:50:09
|
[2023-12-15 18:03:03] |
John - SC Support - Posts: 36286 |
CLOSE, LOW, HIGH, etc are not recognized as special items. The O/H/L/C that can be used with the Alerts is also not recognized by the Spreadsheets. Although Spreadsheets and Alerts do share some common functions, the syntaxes are slightly different. Within the spreadsheet you can either reference the bar items by referencing the columns (column B is Open, Column is High, etc.) or by using the Subgraph nomenclature where the Main Price Graph is ID0 and SG1 is the Open, SG2 is the High, etc. (if you expand the columns in the Spreadsheet you will see these items listed). You would then use the Study/Subgraph reference for spreadsheets by entering an item as ID0.SG1@3. Refer to the following: Working with Spreadsheets: References to Study Subgraph Columns when using the Spreadsheet Study For the Main Price Graph what method you use is not terribly important, but for other studies you should use the method outlined in the link above, as this will keep the references correct if the order of the studies is changed (or a study is added) as that will change the columns that the data is in. This all said, your formula for the above in a spreadsheet is the following =(ID0.SG4@3 - ID0.SG3@3) / (ID0.SG2@3 - ID0.SG3@3) * 100 For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2023-12-15 18:10:20] |
User209431 - Posts: 108 |
Thanks so much John. I do believe I understand most of what you say. "or by using the Subgraph nomenclature where the Main Price Graph is " When you say above, are you referencing the dailyOHL indicator itself? If so, does it have to be loaded into the studies column with the "spreadsheet studies"? |
[2023-12-15 18:25:54] |
User209431 - Posts: 108 |
Oh man, this works!! Your a God Send! I will work on my On Pace volume and see if I can get it. Actually I should ask, I can now create a "color based bar alert" for this? I see it is placed on My "Analysis" window as well. Can I remove it from there? Do I access it from "CW" Sorry for all the questions, just very close. EDIT: Okay I am see how you referenced the High Low Close data. It is directly above the columns of the spreadsheet, I assume I can access previous values through (-1) functions? ' |
[2023-12-15 18:39:26] |
John - SC Support - Posts: 36286 |
Any study that is on the same chart will have that data in the Spreadsheet Study starting in column AA (by default, it depends on how many Calculation Columns you specify in the Inputs to the Spreadsheet Study). But as we said, it is best to reference any data that you need within the Spreadsheet study using the IDx.SGy@n nomenclature, otherwise things can change and you will have a mess to clean up. To access previous values within a spreadsheet, you need to reference the actual row values. When needing to reference previous values for a particular study/subgraph, you need to change the value after the @. For example, to get the value for the bar prior to the current bar, for the High, it would be ID0.SG2@4, as 4 is the row number of the second bar in the chart. Note that the row data starts in row 3. This is what are referring to when we say that the Alerts and Spreadsheets use different syntax. We are not sure what you are asking about in terms of the Color Bar Based on Alert Condition, or the reference to the Analysis window. If you need help with these, we need more information. For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2023-12-15 18:51:19] |
User209431 - Posts: 108 |
Okay thanks for the explanation. Still a bit lost but I will reread and go over it all. I am starting to get it but just get lost and confused. On the position in range we have been working on and for the Change color bar study I am just trying to create a color bar alert siganl to check everything is working or going to work as planned. So I am wanting to add something like : C > ID1.SG1 but I am unsure how to reference the ID1.SG1 value. Hope that makes sense. |
[2023-12-15 18:56:53] |
John - SC Support - Posts: 36286 |
A alert condition like "C > ID1.SG1" is perfectly valid, where the 1 in ID1 is the ID of the study you want to reference and the 1 in the SG1 is the Subgraph number you want to reference. What study are you using that you want to reference? For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2023-12-15 19:05:00] |
User209431 - Posts: 108 |
Yes, but for example the code you just helped me with : =(ID0.SG4@3 - ID0.SG3@3) / (ID0.SG2@3 - ID0.SG3@3) * 100 That is what I am attempting to reference through the "spreadsheet study" we created. I am unsure how to reference the value. The code create a line plot on the chart, so I need to say the C > the 67 value of that line plot. Hope that makes sense. *** don't worry about the bar color alert. I have been using that to check my logic on other items that will be part of this string of =And events. But since I can see the plot and it works and it is your code not mine I am sure I am fine. Date Time Of Last Edit: 2023-12-15 19:06:54
|
[2023-12-15 19:10:24] |
John - SC Support - Posts: 36286 |
What do you mean by "67 value of that line plot"? And what do you want to happen when the condition is true? Is it enough for the condition to just be true? For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2023-12-15 19:16:47] |
User209431 - Posts: 108 |
No, the code you created makes SG1 plot a line. The line has a value of 1 through 100 (1 being the low and 100 being the high) The SG1 line plot on the chart will show a value where the current price is. So if current price is at 50% of the range the SG1 line drawing value is 50. I want C > 67 as that will be trading in the top 1/3 of it's range. From there I will have the "True" value I can use in a scan. Hope this make sense. Date Time Of Last Edit: 2023-12-15 19:17:45
|
[2023-12-15 19:20:58] |
John - SC Support - Posts: 36286 |
Then it would just be the following in the Spreadsheet: =(ID0.SG4@3 - ID0.SG3@3) / (ID0.SG2@3 - ID0.SG3@3) * 100 > 67 This will return a value of 1 when the line is above 67 and 0 otherwise. For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2023-12-15 19:30:48] |
User209431 - Posts: 108 |
Oh wow, very interesting. Okay so spreadsheet is the best way to do these forms of logic? What I attempted to do here would have to be done in spreadsheets and could not be done with the color bar study correct? ID.1 is the ID of the spreadsheet study I added to "Chart Studies" Is that what I use to reference True and Fales values? So an alert for the "color bar alert" study would be ID1.SG1 = 1 |
[2023-12-15 19:43:32] |
John - SC Support - Posts: 36286 |
Okay so spreadsheet is the best way to do these forms of logic?
It depends on what you are trying to do and how complex it gets. Spreadsheet Study is a good solution, but not the only answer. You could definitely do this particular item in the "Color Bar Based on Alert Condition" where your Alert Condition would be the following: =(C - L) / (H - L) * 100 > 67 And there is also the "Spreadsheet System for Alerts" and the "Spreadsheet Formula", although the Spreadsheet Formula uses the Alert syntax, despite it's name. So an alert for the "color bar alert" study would be ID1.SG1 = 1
Yes. For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2023-12-15 19:48:43] |
User209431 - Posts: 108 |
Okay, getting it more. Does this look like % change from open > 3 ? ID0.SG1 - ID0.SG4 / ID0.SG4 * 100 > 3 |
[2023-12-15 20:07:50] |
John - SC Support - Posts: 36286 |
What you have will not work, most due to arithmetic ordering (what you have would evaluate as ID0.SG1 - 1 * 100 > 3, since you have ID0.SG4/ID0.SG4). It depends on what you want in terms of percentage. A Simple percentage would be: ID0.SG4 / ID0.SG1 * 100 > 3 A Percent Difference would be: (ID0.SG4 - ID0.SG1) / ID0.SG1 * 100 > 3 For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2023-12-15 20:20:08] |
User209431 - Posts: 108 |
OKay , got it. Now I have created a "study colection" of things and references and a "Color Bars Alert" where carries the stirng of =AND events. =AND(ID1.SG1 > . 200, ID2.C > 3, ID4.C > previousDaysHigh, (C - L) / (H - L) * 100 > 67) I have created a watchlist of symbols and I have created an alert manager. But I am confused on how to get it into the alerts manager or how the alerts manager can use it. This pretty much wraps this up for the most part. I still have to reverse all this for short scans. I am not going to push for the "On Pace Volume" because I can work with the relative volume indicator (They are typically extremely hard or expensive to fine and your is top notch!) Thanks again for all the help with this. I will be joining after the trial. No rush for me, I really don't want any trades on this tax year just because I don't want to deal with it. Date Time Of Last Edit: 2023-12-15 20:20:29
|
[2023-12-15 20:27:57] |
User209431 - Posts: 108 |
Hmmm, possible never mind here. It looks like it should read it direct from my "Studies collection" where the full string of formula is sitting for the "Chart" Is that it? |
[2023-12-15 20:40:38] |
John - SC Support - Posts: 36286 |
Sorry again, but we are not quite following. The "Alert Manager" is our window where alerts are shown. Any alert you create will be shown in the Alert Manager whenever the Alert is "true" (any non-zero value). In terms of scanning a series of symbols and an alert, refer to the following: Study/Chart Alerts And Scanning: Scanning for Alert Condition Across Multiple Symbols If you still need something else, please give us some additional information on what exactly you need. For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2023-12-15 20:46:55] |
User209431 - Posts: 108 |
Yeah , not sure, getting lost again. But basically I created a "associated watchlist" and I have the "alert manager" and I have the formula for all the logic that must be "True" to put a Symbol in the Alerts Manager. So I guess I am confused on how I get the scan to scan the watchlist. Is this what it is always set to scan? That any alerts from my Studies Collection should show up in Alerts Manager? I have read and am following the documentation. |
[2023-12-15 21:49:26] |
John - SC Support - Posts: 36286 |
To start a Scan, select "Chart >> Start Scan". If the option for "Chart >> Only Symbols in Watchlist" is not enabled, then the scan will be done through the data files that you have on your system. Otherwise, enable the option for "Only Symbols in Watchlist" and set the symbols you want in the watchlist by selecting "Chart >> Associated Watchlist". Once you start the scan, the same studies are applied to each symbol that comes up, therefore the Alert will go off any time the alert is true for any symbol that gets loaded. The Alert Manager will show you those True signals and give you the information for what symbol(s) had the alerts go off. For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2023-12-15 22:17:33] |
User209431 - Posts: 108 |
Hmmm, doesn't seems to be doing anything. I will re read and apply the documentation.
|
[2023-12-15 22:29:27] |
User209431 - Posts: 108 |
Wondering if it is this "Enable Global Settings >> General Settings >> General >> Data >> Subscribe Real-time (RT) Data and Download Historical Data During Scan to ensure that the charts being scanned are up-to-date." Do I need real time data for scanning watchlists? |
To post a message in this thread, you need to log in with your Sierra Chart account: