Last edited by a moderator:
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
this is a simple RSI crosseshttps://www.tradingview.com/v/G9o94fZN/
//@version=5
indicator('scalper', overlay=true)
AcilCikis = input(false, 'Stop ?')
RSIlong = input(35, 'RSI Long Point')
RSIclose = input(75, 'RSI Short Point')
AcilCikisNoktasi = input(10, 'RSI Stop Point')
rsi = ta.rsi(close, 14)
long = ta.crossover(rsi, RSIlong)
longclose = ta.crossunder(rsi, RSIclose)
stop = ta.crossunder(rsi, AcilCikisNoktasi)
plotshape(long, title='AL', text='✔', style=shape.labelup, location=location.belowbar, color=color.new(color.green, 0), textcolor=color.new(color.white, 0), size=size.tiny)
plotshape(longclose or stop and AcilCikis == true, title='SAT', text='!', style=shape.labeldown, location=location.abovebar, color=color.new(color.red, 0), textcolor=color.new(color.white, 0), size=size.tiny)
# RSI Crosses
input length = 14;
input signalType = {Long, Short,default Both};
input OverboughtThreshold = 75;
input OversoldThreshold = 25;
input averageType = AverageType.WILDERS;
def Long = signalType!=signalType.Short;
def Short = signalType!=signalType.Long;
def myRSI = RSI(length=length, averageType=averageType).RSI;
def CrossUp = Long and crosses(myRSI, OversoldThreshold, CrossingDirection.ABOVE);
def CrossDn = Short and Crosses(myRSI, OverboughtThreshold, CrossingDirection.BELOW);
plot SigUp = CrossUp;
plot SigDn = CrossDn;
SigUp.SetDefaultColor(Color.CYAN);
SigDn.SetDefaultColor(Color.MAGENTA);
SigUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
SigDn.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
#-- END of CODE
@samer800 thank you some much!!this is a simple RSI crosses
try the below
CSS:# RSI Crosses input length = 14; input signalType = {Long, Short,default Both}; input OverboughtThreshold = 75; input OversoldThreshold = 25; input averageType = AverageType.WILDERS; def Long = signalType!=signalType.Short; def Short = signalType!=signalType.Long; def myRSI = RSI(length=length, averageType=averageType).RSI; def CrossUp = Long and crosses(myRSI, OversoldThreshold, CrossingDirection.ABOVE); def CrossDn = Short and Crosses(myRSI, OverboughtThreshold, CrossingDirection.BELOW); plot SigUp = CrossUp; plot SigDn = CrossDn; SigUp.SetDefaultColor(Color.CYAN); SigDn.SetDefaultColor(Color.MAGENTA); SigUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP); SigDn.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN); #-- END of CODE
@samer800 thank you some much!!
@samer800 one favor when you get a change! do you think it is possible to add a MTF labels? that will be nice, to set the chart on 1 minutes but seen the 3-5-15-30 minutes etc etc. thank you in advance. if the labels is not possible just the MTF.this is a simple RSI crosses
try the below
CSS:# RSI Crosses input length = 14; input signalType = {Long, Short,default Both}; input OverboughtThreshold = 75; input OversoldThreshold = 25; input averageType = AverageType.WILDERS; def Long = signalType!=signalType.Short; def Short = signalType!=signalType.Long; def myRSI = RSI(length=length, averageType=averageType).RSI; def CrossUp = Long and crosses(myRSI, OversoldThreshold, CrossingDirection.ABOVE); def CrossDn = Short and Crosses(myRSI, OverboughtThreshold, CrossingDirection.BELOW); plot SigUp = CrossUp; plot SigDn = CrossDn; SigUp.SetDefaultColor(Color.CYAN); SigDn.SetDefaultColor(Color.MAGENTA); SigUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP); SigDn.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN); #-- END of CODE
try this.@samer800 one favor when you get a change! do you think it is possible to add a MTF labels? that will be nice, to set the chart on 1 minutes but seen the 3-5-15-30 minutes etc etc. thank you in advance. if the labels is not possible just the MTF.
# RSI Crosses
# MTFSrc option - sam4Cok@samer800 - request from UseThinkScript.com member
input showTimeLabel = yes;
input timeframe = {Default "Chart", "Custom"};
input customTimeframe = AggregationPeriod.FIFTEEN_MIN;
input source = FundamentalType.CLOSE;
input length = 14;
input signalType = {Long, Short,default Both};
input OverboughtThreshold = 75;
input OversoldThreshold = 25;
input averageType = AverageType.WILDERS;
def na = Double.NaN;
def current = GetAggregationPeriod();
def tfSrc = Fundamental(source);
def mtfSrc = Fundamental(FundamentalType = source, Period = customTimeframe);
def src;def mtf;
Switch (timeframe) {
Case "Custom" : src = mtfSrc;
mtf = customTimeframe;
Default : src = tfSrc;
mtf = current;
}
def intra = mtf < AggregationPeriod.DAY;
AddLabel(showTimeLabel and intra, mtf / 1000 / 60 + " M", Color.WHITE);
AddLabel(showTimeLabel and !intra, mtf / AggregationPeriod.DAY + " D", Color.WHITE);
def Long = signalType!=signalType.Short;
def Short = signalType!=signalType.Long;
def myRSI = RSI(Price = src, length = length, averageType = averageType).RSI;
def CrossUp = Long and crosses(myRSI, OversoldThreshold, CrossingDirection.ABOVE);
def CrossDn = Short and Crosses(myRSI, OverboughtThreshold, CrossingDirection.BELOW);
plot SigUp = if CrossUp and !CrossUp[1] then low else na;
plot SigDn = if CrossDn and !CrossDn[1] then high else na;
SigUp.SetDefaultColor(Color.CYAN);
SigDn.SetDefaultColor(Color.MAGENTA);
SigUp.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
SigDn.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
#-- END of CODE
@samer800 like always great job! thank you some much!try this.
CSS:# RSI Crosses # MTFSrc option - sam4Cok@samer800 - request from UseThinkScript.com member input showTimeLabel = yes; input timeframe = {Default "Chart", "Custom"}; input customTimeframe = AggregationPeriod.FIFTEEN_MIN; input source = FundamentalType.CLOSE; input length = 14; input signalType = {Long, Short,default Both}; input OverboughtThreshold = 75; input OversoldThreshold = 25; input averageType = AverageType.WILDERS; def na = Double.NaN; def current = GetAggregationPeriod(); def tfSrc = Fundamental(source); def mtfSrc = Fundamental(FundamentalType = source, Period = customTimeframe); def src;def mtf; Switch (timeframe) { Case "Custom" : src = mtfSrc; mtf = customTimeframe; Default : src = tfSrc; mtf = current; } def intra = mtf < AggregationPeriod.DAY; AddLabel(showTimeLabel and intra, mtf / 1000 / 60 + " M", Color.WHITE); AddLabel(showTimeLabel and !intra, mtf / AggregationPeriod.DAY + " D", Color.WHITE); def Long = signalType!=signalType.Short; def Short = signalType!=signalType.Long; def myRSI = RSI(Price = src, length = length, averageType = averageType).RSI; def CrossUp = Long and crosses(myRSI, OversoldThreshold, CrossingDirection.ABOVE); def CrossDn = Short and Crosses(myRSI, OverboughtThreshold, CrossingDirection.BELOW); plot SigUp = if CrossUp and !CrossUp[1] then low else na; plot SigDn = if CrossDn and !CrossDn[1] then high else na; SigUp.SetDefaultColor(Color.CYAN); SigDn.SetDefaultColor(Color.MAGENTA); SigUp.SetPaintingStrategy(PaintingStrategy.ARROW_UP); SigDn.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN); #-- END of CODE
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
B | TKP RSI Bar Color For ThinkOrSwim | Custom | 5 | |
M | Repaints Stochastic RSI with Divergences For ThinkOrSwim | Custom | 3 | |
C | RSI Based Automatic Supply and Demand For ThinkOrSwim | Custom | 4 | |
R | Dynamic Sentiment RSI For ThinkOrSwim | Custom | 5 | |
V | RSI Momentum Acceleration For ThinkOrSwim | Custom | 1 |
Start a new thread and receive assistance from our community.
useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.
We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.
If you are new, or just looking for guidance, here are some helpful links to get you started.