Dual RSI Breakthrough Strategy - FMZ (2024)

  1. Square
  2. Dual RSI Breakthrough Strategy

Author: ChaoZhang, Date: 2023-12-27 14:33:15
Tags:

Dual RSI Breakthrough Strategy - FMZ (1)

Overview

The dual RSI breakout strategy is an algorithmic trading strategy that identifies price reversal points using the RSI indicator. It generates trading signals by comparing the RSI indicator with preset upper and lower threshold values to determine whether the market is overbought or oversold.

Strategy Logic

This strategy mainly relies on the RSI indicator to judge the market condition. The RSI indicator is calculated based on the changes in closing prices over a certain period, reflecting the buying and selling momentum of the stock. When the RSI crosses above the preset upper threshold (default 75), it indicates the stock has entered the overbought zone. When the RSI falls below the preset lower threshold (default 25), it indicates the stock has entered the oversold zone.

The judgment rules are:

  1. When RSI crosses above the upper threshold, go short;
  2. When RSI crosses below the lower threshold, go long;
  3. Close position when reaching stop loss or take profit.

Its trading logic is simple and clear, with reasonable reference parameter settings, large configuration space, and is suitable for capturing larger trends in the market.

Advantage Analysis

The advantages of this strategy include:

  1. Simple logic that is easy to understand and implement;
  2. Reasonable reference parameter settings that can be personalized;
  3. Configurable reverse trading logic that can flexibly respond to market conditions;
  4. Can effectively identify price reversal points and capture major trends.

In general, with reasonable reference parameter settings, simple implementation, and the ability to effectively determine price reversals through RSI, this strategy is suitable for medium- to long-term trend capturing and is easy to grasp and use as a quantitative strategy.

Risk Analysis

Although this strategy is relatively simple and reliable, we cannot ignore the potential risks it faces:

  1. Relatively high probability of RSI indicators triggering false signals. RSI cannot perfectly predict price reversals, which may lead to misjudgements.
  2. Possibility of continuous stop loss in a trending market. RSI finds it difficult to distinguish normal range-bound adjustments from trend reversals.
  3. More losses likely in a ranging market. RSI is unable to effectively determine ranging trends, leading to greater losses in this environment.

To control risks, we need to pay attention to the following:

  1. Adjust parameters appropriately to prevent excessive misjudgement rates.
  2. Confirm trading signals with other indicators to improve accuracy.
  3. Increase the profit taking ratio and reduce single stop loss size.
  4. Avoid trading in ranging markets.

Optimization Directions

Considering the main risks faced by this strategy are reversal misjudgements and losses in ranging markets, we can optimize from the following aspects:

  1. Filter signals with other indicators. Indicators like KDJ and MACD can play a filtering role to avoid misjudgements.
  2. Increase the threshold for single stop loss amounts. Appropriately expanding the single stop loss space can help the strategy follow big trends.
  3. Set open position frequency limits. Add logic restricting entries to once or N times per certain period to control overly frequent position opening.
  4. Set market condition judgements. Ensure strategy only runs in trending markets, avoiding ranging markets, which can significantly optimize the strategy’s risk-reward ratio.

Conclusion

In summary, the dual RSI breakout strategy is a simple and practical quantitative strategy. It identifies price reversals via RSI to achieve simple trend following. Although certain misjudgement risks exist, optimizations like parameter tuning, signal filtering can help mitigate this and allow it to play an important role in catching medium- to long-term trends. Its logic is straightforward, making it suitable for beginner quants to reference and learn from. With further optimizations, this strategy shows promise in obtaining relatively stable quantitative returns.

/*backteststart: 2023-12-19 00:00:00end: 2023-12-26 00:00:00period: 3mbasePeriod: 1mexchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]*///@version=4strategy("RSI Algo", overlay=true)// Calculate start/end date and time conditionDST = 1 //day light saving for usa//--- EuropeLondon = iff(DST==0,"0000-0900","0100-1000")//--- AmericaNewYork = iff(DST==0,"0400-1500","0500-1600")//--- PacificSydney = iff(DST==0,"1300-2200","1400-2300")//--- AsiaTokyo = iff(DST==0,"1500-2400","1600-0100")//-- Time In Rangetimeinrange(res, sess) => time(res, sess) != 0london = timeinrange(timeframe.period, London)newyork = timeinrange(timeframe.period, NewYork)time_cond = truemyPeriod = input(defval=14, type=input.integer, title="Period")myThresholdUp = input(defval=75, type=input.float, title="Upper Threshold")myThresholdDn = input(defval=25, type=input.float, title="Lower Threshold")myAlgoFlipToggle = input(defval=false, type=input.bool, title="Imverse Algorthim")myLineToggle = input(defval=true, type=input.bool, title="Show Lines")myLabelToggle = input(defval=true, type=input.bool, title="Show Labels")myRSI=rsi(close, myPeriod)buy = myAlgoFlipToggle ? falling(myRSI,1) and cross(myRSI, myThresholdDn) : rising(myRSI, 1) and cross(myRSI,myThresholdUp) //and time_condsell = myAlgoFlipToggle ? rising(myRSI, 1) and cross(myRSI,myThresholdUp) : falling(myRSI,1) and cross(myRSI, myThresholdDn) //and time_condmyPosition = 0myPosition := buy==1 ? 0 : sell==1 or myPosition[1]==1 ? 1 : 0trendColor = buy ? color.red : sell ? color.green : naplot(myLineToggle ? buy and myPosition[1]==1 ? low - 0.004: sell and myPosition[1]==0 ? high + 0.004 : na : na, color=trendColor, style=plot.style_line, linewidth=4, editable=false)plotshape(myLabelToggle ? buy and myPosition[1]==1 ? low - 0.005 : na : na, style=shape.labelup, location=location.absolute, text="Buy", transp=0, textcolor = color.white, color=color.black, editable=false)plotshape(myLabelToggle ? sell and myPosition[1]==0 ? high + 0.005 : na : na, style=shape.labeldown, location=location.absolute, text="Sell", transp=0, textcolor = color.white, color=color.black, editable=false)strategy.initial_capital = 50000 //Calculate the size of the next tradebalance = strategy.netprofit + strategy.initial_capital //current balancefloating = strategy.openprofit //floating profit/lossrisk = input(2,type=input.float,title="Risk %")/100 //risk % per tradeisTwoDigit = input(false,"Is this a 2 digit pair? (JPY, XAU, XPD...")stop = input(250, title="stop loss pips")tp = input(2500, title="take profit pips")if(isTwoDigit) stop := stop/100 temp01 = balance * risk //Risk in USDtemp02 = temp01/stop //Risk in lotstemp03 = temp02*100000 //Convert to contractssize = 1 strategy.entry("long",1,size,when=buy and myPosition[1]==1 )strategy.entry("short",0,size,when=sell and myPosition[1]==0)strategy.exit("exit_long","long",loss=stop, profit=tp) //Long exit (stop loss)strategy.exit("exit_short","short",loss=stop, profit=tp) //Short exit (stop loss)//strategy.close_all(when= not time_cond)

template: strategy.tpl:40:21: executing "strategy.tpl" at <.api.GetStrategyListByName>: wrong number of args for GetStrategyListByName: want 7 got 6

Dual RSI Breakthrough Strategy - FMZ (2024)
Top Articles
Best Nasdaq ETFs | The Motley Fool
Which Technology is Better Solana or Avalanche? - California Business Journal
jazmen00 x & jazmen00 mega| Discover
Tabc On The Fly Final Exam Answers
Gore Videos Uncensored
Fusion
Dr Doe's Chemistry Quiz Answer Key
Mawal Gameroom Download
Craigslist In Fredericksburg
What Was D-Day Weegy
Nwi Arrests Lake County
6813472639
Video shows two planes collide while taxiing at airport | CNN
Www Craigslist Milwaukee Wi
How to Create Your Very Own Crossword Puzzle
Air Force Chief Results
Craigslist Missoula Atv
Azpeople View Paycheck/W2
Homeaccess.stopandshop
Evil Dead Rise Showtimes Near Pelican Cinemas
8005607994
Understanding Gestalt Principles: Definition and Examples
Boise Craigslist Cars And Trucks - By Owner
Strange World Showtimes Near Savoy 16
What Equals 16
Hefkervelt Blog
Workshops - Canadian Dam Association (CDA-ACB)
Meijer Deli Trays Brochure
Fuse Box Diagram Honda Accord (2013-2017)
Yayo - RimWorld Wiki
Penn State Service Management
Kaliii - Area Codes Lyrics
Revelry Room Seattle
Ezstub Cross Country
Chapaeva Age
Shaman's Path Puzzle
Daily Journal Obituary Kankakee
Helloid Worthington Login
Top-ranked Wisconsin beats Marquette in front of record volleyball crowd at Fiserv Forum. What we learned.
World History Kazwire
Sunrise Garden Beach Resort - Select Hurghada günstig buchen | billareisen.at
Craigslist Lakeside Az
Bcy Testing Solution Columbia Sc
St Anthony Hospital Crown Point Visiting Hours
Seminary.churchofjesuschrist.org
Traumasoft Butler
Walgreens On Secor And Alexis
Pgecom
Timothy Warren Cobb Obituary
Sea Guini Dress Code
Caphras Calculator
Puss In Boots: The Last Wish Showtimes Near Valdosta Cinemas
Latest Posts
Article information

Author: Terence Hammes MD

Last Updated:

Views: 5800

Rating: 4.9 / 5 (69 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Terence Hammes MD

Birthday: 1992-04-11

Address: Suite 408 9446 Mercy Mews, West Roxie, CT 04904

Phone: +50312511349175

Job: Product Consulting Liaison

Hobby: Jogging, Motor sports, Nordic skating, Jigsaw puzzles, Bird watching, Nordic skating, Sculpting

Introduction: My name is Terence Hammes MD, I am a inexpensive, energetic, jolly, faithful, cheerful, proud, rich person who loves writing and wants to share my knowledge and understanding with you.