# Hlp with indicat.

#### skelley44

##### New member
Hi all, I am not a coder and would like help with this.
These are the indicators I use to trade the 1 min. SPY.
True Strength Index (25,13,8,EXPONENTIAL)
RSI (2,90,10,CLOSE,WILDERS,no)
I would like to have an arrow drawn below the candle on the upper chart when True Strength is above 0 and RSI is 10 or less. And an arrow above the candle when True Strength is below 0 and RSI is 90 or greater. I would appreciate any help, feel free to try this strategy. It is simple but can be pretty effective when combined with support and resistance. Thank you.

Solution
@skelley44
Code:
``````input length = 2;
input over_Bought = 90;
input over_Sold = 10;
input price = close;
input averageType1 = AverageType.WILDERS;
input showBreakoutSignals = no;

def NetChgAvg = MovingAverage(averageType1, price - price, length);
def TotChgAvg = MovingAverage(averageType1, AbsValue(price - price), length);
def ChgRatio = if TotChgAvg != 0 then NetChgAvg / TotChgAvg else 0;

def RSI = 50 * (ChgRatio + 1);

####################################################################################
####################################################################################

input longLength = 25;
input shortLength = 13;
input signalLength = 8;
input averageType = AverageType.EXPONENTIAL;

def diff = close -...``````
@skelley44
Code:
``````input length = 2;
input over_Bought = 90;
input over_Sold = 10;
input price = close;
input averageType1 = AverageType.WILDERS;
input showBreakoutSignals = no;

def NetChgAvg = MovingAverage(averageType1, price - price, length);
def TotChgAvg = MovingAverage(averageType1, AbsValue(price - price), length);
def ChgRatio = if TotChgAvg != 0 then NetChgAvg / TotChgAvg else 0;

def RSI = 50 * (ChgRatio + 1);

####################################################################################
####################################################################################

input longLength = 25;
input shortLength = 13;
input signalLength = 8;
input averageType = AverageType.EXPONENTIAL;

def diff = close - close;
def doubleSmoothedAbsDiff = MovingAverage(averageType, MovingAverage(averageType, AbsValue(diff), longLength), shortLength);

def TSI;
def Signal;

TSI = if doubleSmoothedAbsDiff == 0 then 0
else 100 * (MovingAverage(averageType, MovingAverage(averageType, diff, longLength), shortLength)) / doubleSmoothedAbsDiff;
Signal = MovingAverage(averageType, TSI, signalLength);

####################################################################################
####################################################################################
def Buy = Signal > 0 and RSI <= 10;
def Sell = Signal < 0 and RSI >= 90;

GU.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
GU.SetDefaultColor(GetColor(6));
GU.SetLineWeight(3);

plot GX = Sell;
GX.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
GX.SetDefaultColor(GetColor(5));
GX.SetLineWeight(3);
####################################################################################
####################################################################################``````

### Not the exact question you're looking for?

87k+ Posts
371 Online ## The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
• Exclusive indicators
• Proven strategies & setups
• Private Discord community
• Exclusive members-only content
• 1 full year of unlimited support

What is useThinkScript?

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.

How do I get started?

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.

What are the benefits of VIP Membership?