Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/29/2004(UTC) Posts: 1,394 Location: Glastonbury, CT
Was thanked: 2 time(s) in 2 post(s)
|
before you start trading, read the manual and the formula primer in this web site!
Don't take anybody's word for the holy grail. Only by fully understanding what you are getting into,will you be able to protect your hard earned assets!
You didn't specify the length of the RSI {I will use a 14 period RSI} nor the MA's so I Can't include them! You need to read the section on how to nest functions together!
for the following exploration you will use these functions:
RSI({data},{Length}) RSI(C,14)
Sum({condition or data},{periods})Sum(RSI(C,14)>35,14){would display a 1 if only 1 day the event occurred, 2 for 2 events occurring and so forth} Sum(RSI(C,14)>35,14)>13 {this is the condition that you are looking for, on the 14 day it will plot 1 because the RSI has stayed above 35 for 14 straight day,it will continue to plot 1 as long as the RSI stays above 35 ,the reverse for the other condition} Sum(RSI(C,14)<65,14)>13
If({condition1 is true},{then result},{else result}) this one gets
tricky since you are asking for two conditions,you will need 2 if
statements and will look like this
If({Condition 1 is true},{Plot Result}1,{Else}If({Condition2 is true},{Plot Result}-1,{Plot Else because neither conditions are true}0));
The goal of this indicator is to show when a security matches your conditions,so the output will be +1,0,-1 {these are the results and else in the if statements}
If(Sum(RSI(C,14)>35,14)>13,1,If(Sum(RSI(C,14)<65,14)>13,-1,0));
pasting this in an exploration will show +1 for all stocks that have a RSI greater than 35 for at least 14 days, -1 for all stocks that have a RSI less than 65 for at least 14 days,and 0 for the remaining stocks that do not match the 2 conditions
|