Alternative alert setup for RSI daily study


0
0

Hi Pete, I tried to setup a RSI daily study and managed to plot the study after reading one of your older post. However that didn’t work for alert as there are recursive references. Is there any alternative of having the alert setup for RSI daily?

My code below:

input length = 14;
input overBought = 70;
input overSold = 30;
input averageType = AverageType.WILDERS;

def NetChgAvg = MovingAverage(averageType, close(period = AggregationPeriod.DAY) – close(period = AggregationPeriod.DAY)[1], length);
def TotChgAvg = MovingAverage(averageType, AbsValue(close(period = AggregationPeriod.DAY) – close(period = AggregationPeriod.DAY)[1]), length);
def ChgRatio = if TotChgAvg != 0 then NetChgAvg / TotChgAvg else 0;

def RSI = 50 * (ChgRatio + 1);

## The RSICross is meant to signal only 1 as Oversold and stay there until the next signal 0 as overbought, vice versa. So I only receive signal when there is a change of signal.

def RSICross = if RSI crosses above overSold then 1 else if RSI crosses below overBought then 0 else RSICross from 1 bar ago;
plot Scan = RSICross;

Marked as spam
Posted by (Questions: 4, Answers: 3)
Asked on January 13, 2019 7:18 am
155 views
0
Private answer

Same answer I provided for a previous post: https://www.hahn-tech.com/ans/how-to-set-parabolicsar-alert-on-smsmobileemail-step-by-step/

Take some time and search the word “recursion” or “recursive” on the forum. You will get all the details needed to understand the problem.

The only way to achieve this is to build a custom scan. If your goal involves something else, such as the Study Alert found under the MarketWatch tab, then you have no solution. The only way is through creating a custom scan, saving it, then generating the dynamic alert from that custom scan that you saved.

For the last part of that, creating the dynamic alert, have you watched the section of video referenced in the previous post?

Details explained beginning at the 29:50 mark of the following video: https://www.hahn-tech.com/thinkorswim-overnight-range-scan-alert/

Marked as spam
Posted by (Questions: 37, Answers: 4087)
Answered on January 13, 2019 10:18 am