Login Page - Create Account

Support Board


Date/Time: Thu, 13 Aug 2020 06:20:56 +0000



[Programming Help] - Need help with indicator for slope angle.

[2020-05-22 14:49:39]
User831446 - Posts: 2 | Ending Date: 2020-08-31
I have bee wracking my brain trying to come up and find a solution for this, I have used (and do use) the indicator for study angle change but it only alerts on a change in direction, not the state (pos or neg) of the angle each bar. I need an indicator that gives a continuous either positive or negative slope state. This is the third confirmation for my entries, and I don't want the autotrader to execute trades unless all three signals confirm. Many thanks in advance.
[2020-05-23 05:06:29]
Flipper - Posts: 59 | Ending Date: 2020-08-31
So if you mean slope as the current value is higher than the previous then that is a simple check for a study like,

if (Subgraph[sc.Index] > Subgraph[sc.Index - 1]) // SLOPe IS UP etc

Date Time Of Last Edit: 2020-05-23 05:06:57
[2020-05-23 06:55:58]
Ackin - Posts: 1068 | Ending Date: 2020-09-04
try:
Study Color bar based on alert condition

Alert 8,9:
https://www.sierrachart.com/index.php?page=doc/StudyChartAlertsAndScanning.php#FormulaExamples

Of course, you can extend the alerts with various other states, including negative and positive values ... everything can be in one condition with the output that you use to enable / disable the new trade.
Date Time Of Last Edit: 2020-05-23 08:05:56
[2020-05-23 19:25:15]
User831446 - Posts: 2 | Ending Date: 2020-08-31
Thank you for the reply Ackin, I've used those that you suggested but they only signify changes in slope, not the actual continuing state of slope (either positive or negative). I tried your slope signal alert (based on study) which signifies changes from +/- like those suggested and it does a superb job, but only for one bar. I need it to repeat that alert until it changes states again. Any ideas of how that could be accomplished? Also, in your slope signal alert study, the alerts are always a bar behind the change in slope, but if I use the formula examples in SC, they alert on the bar OF the change. Any suggestions would be greatly appreciated.

In the first example, I dont want it to initiate trades on bars outlined in red where I have a 2/3 long signal but cant confirm because there is no alert present for the slope so it wants to initate a long trade there, but the next bar outlined in yellow, it should initiate a short on that bar. And again in the bars outlined in blue, it's trying again initiate a long position and it should not be because I have a neg slope, but no ability to alert that.

In the second example pic, its just showing the alerts being 1 bar behind on the slope change.
imageSLOPE EXAMPLE.png / V - Attached On 2020-05-23 19:25:01 UTC - Size: 11.37 KB - 28 views
imageSLOPE EXAMPLE 2.png / V - Attached On 2020-05-23 19:25:06 UTC - Size: 24.62 KB - 28 views
Attachment Deleted.
[2020-05-23 19:54:49]
Ackin - Posts: 1068 | Ending Date: 2020-09-04
I need it to repeat that alert until it changes states again.
It's a matter of 5 minutes of work, next time you write it directly into that thread to study, we will save each other a lot of time :)

if I use the formula examples in SC, they alert on the bar OF the change.
yes, I have it on purpose, the slope is constantly changing on the creating bar. Many of the studies I have create are for automatic systems. With the micro resolution of the graph it is negligible, but I understand that it can be a problem on large bars .... I will add this modification there (as a user selection)
[2020-05-23 20:47:46]
Ackin - Posts: 1068 | Ending Date: 2020-09-04
Colorbar SCH (alert what I wrote above) and Slope signal alert study
imageSLOPE signal alert study.png / V - Attached On 2020-05-23 20:46:54 UTC - Size: 35.91 KB - 41 views

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

Login

Login Page - Create Account