Search
Products
Community
Markets
News
Brokers
More
EN
Get started
Community
/
Ideas
/
Flyup
Vietnam Index
Flyup
By hoatigon.757
Follow
Follow
Oct 21, 2023
0
Oct 21, 2023
Pine Script®
RSIExit = input(55, "RSI Exit")
RSILength = input(4, "RSI Length")
testPeriod() =>
time >= testPeriodStart and time <= testPeriodStop ? true : false
longSMA = sma(close, 200) // 200-day moving average
rsi = rsi(close, RSILength) // relative strength indicator with custom length
longCondition = close > longSMA // closing price is above 200-day sma
if longCondition and testPeriod()
strategy.entry("CALL", strategy.long, 100, when=rsi <= RSIEntry)
strategy.close("CALL", when=rsi >= RSIExit)
Trend Analysis
hoatigon.757
Follow
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the
Terms of Use
.