Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 21:43:48 +0000



Post From: Simple or impossible alert question

[2014-06-13 13:31:34]
jackw - Posts: 57
Triggering a single alert off of multiple time frames makes things a whole lot more complicated. I outlined what I think is the easiest way below, but its still pretty convoluted. I considered using spreadsheet studies to do this, but it turns out that is just as complicated, and then you have the additional overhead of the spreadsheets. The best way to do this is with a custom study, but you really don't want to invest the time in writing one until you've been using this for a while and you're sure its worth the effort.

I'm assuming your chartbook is laid out as follows:
* It contains 3 charts... 10-min, 30-min and 90 min
* You have added the 14 bar CCI and 50 bar CCI studies to the 10-min chart.
You have added the 50 bar CCI to the 30-min chart, and then used the Study/Price Overlay study to overlay the CCI onto the 10-min chart. On the overlay study, you have set 'Fill Blanks with Last Value' to Yes.
* You have added the 50 bar CCI to the 90-min chart, and then used the Study/Price Overlay study to overlay the CCI onto the 10-min chart. On the overlay study, you have set 'Fill Blanks with Last Value' to Yes.

You will need to add 5 studies to generate an uptrend alert.

Add the 'Color Bar Based On Alert Condition' study to the 30-min chart. On the studies Alerts tab, enter the following condition:
ID?.SG1 > ID?.SG1[-1]
Replace the '?' with the ID# of the CCI study on that chart. (The ID# for each study is listed next to each study name in the Chart Studies dialog box.)
Hide the color bar study.

Add the 'Color Bar Based On Alert Condition' study to the 90-min chart. On the studies Alerts tab, enter the following condition:
ID?.SG1 > ID?.SG1[-1]
Replace the '?' with the ID# of the CCI study on that chart.
Hide the color bar study.

On the 10-min chart, add the 'Study/Price Overlay' study and use it to overlay the 'Color Bar Based On Alert Condition' study from the 30-min chart.
Set 'Fill Blanks with Last Value' to Yes. Hide the study.

On the 10-min chart, add the 'Study/Price Overlay' study and use it to overlay the 'Color Bar Based On Alert Condition' study from the 90-min chart.
Set 'Fill Blanks with Last Value' to Yes. Hide the study.

On the 10-min chart, add the 'Color Bar Based On Alert Condition' study. On the study's Alerts tab, enter the following condition:
AND(ID?.SG1 > ID?.SG1[-1], ID??.SG1 > ID??.SG1[-1], ID???.SG1 = 1, ID????.SG1 = 1)
Replace the '?' with the ID# of the 14 bar CCI study on this chart.
Replace the '??' with the ID# of the 50 bar CCI study on this chart.
Replace the '???' with the ID# of the 'Study/Price Overlay' study you previously added to this chart that referenced the 'Color Bar Based On Alert Condition' study on the 30-min chart.
Replace the '????' with the ID# of the 'Study/Price Overlay' study you previously added to this chart that referenced the 'Color Bar Based On Alert Condition' study on the 90-min chart.

If you've entered everything correctly, the chart bars will be colored when all 4 CCI are trending up. If instead of colored bars, you want actual alerts to be triggered, just add the following condition to the Alerts tab of the Chart Settings dialog box (F5).
ID?.SG1 = 1
Replace '?'with the ID# of the 'Color Bar Based On Alert Condition' study you added in the previous paragraph.

For downtrend alerts, the steps are identical. Just change '>' to '<' in the alert formulas.

If you are unable to get it to work correctly, then post your chartbook, and I'll try to modify if for you.