이 전략은
과잉 구매와 과잉 판매 기준을 적절히 완화하고, 신호를 확인하기 위해 다른 지표를 결합하고, 매개 변수 범위를 조정함으로써 위험을 줄일 수 있습니다.
전체적으로 이것은 간단하고 실용적인 단기 전략이다. VWAP를 사용하면 RSI 판단이 더 정확하며, 장기간만 이동하면 거래 빈도가 감소합니다. 전략 아이디어는 명확하고 이해하기 쉽고 구현하기에 적합하며 양상 거래 초보자에게 적합합니다. 그러나 단일 지표 전략은 완벽할 수 없으며 더 나은 라이브 성능을 위해 지속적인 최적화가 필요합니다.
/*backtest start: 2023-12-19 00:00:00 end: 2024-01-18 00:00:00 period: 1h basePeriod: 15m exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // © Xaviz //#####©ÉÉÉɶN############################################### //####*..´´´´´´,,,»ëN######################################## //###ë..´´´´´´,,,,,,''%©##################################### //###'´´´´´´,,,,,,,'''''?¶################################### //##o´´´´´´,,,,,,,''''''''*©################################# //##'´´´´´,,,,,,,'''''''^^^~±################################ //#±´´´´´,,,,,,,''''''''^í/;~*©####æ%;í»~~~~;==I±N########### //#»´´´´,,,,,,'''''''''^;////;»¶X/í~~/~~~;=~~~~~~~~*¶######## //#'´´´,,,,,,''''''''^^;////;%I^~/~~/~~~=~~~;=?;~~~~;?ë###### //©´´,,,,,,,''''''''^^~/////X~/~~/~~/~~»í~~=~~~~~~~~~~^;É#### //¶´,,,,,,,''''''''^^^;///;%;~/~~;í~~»~í?~?~~~?I/~~~~?*=íÑ### //N,,,,,,,'''''''^^^^^///;;o/~~;;~~;£=»í»;IX/=~~~~~~^^^^'*æ## //#í,,,,,''''''''^^^^^;;;;;o~»~~~~íX//~/»~;í?IíI»~~^/*?'''=N# //#%,,,'''''''''^^^^^^í;;;;£;~~~//»I»/£X/X/»í*&~~~^^^^'^*~'É# //#©,,''''''''^^^^^^^^~;;;;&/~/////*X;í;o*í»~=*?*===^'''''*£# //##&''''''''^^^^^^^^^^~;;;;X=í~~~»;;;/~;í»~»±;^^^^^';=''''É# //##N^''''''^^^^^^^^^^~~~;;;;/£;~~/»~~»~~///o~~^^^^''''?^',æ# //###Ñ''''^^^^^^^^^^^~~~~~;;;;;í*X*í»;~~IX?~~^^^^/?'''''=,=## //####X'''^^^^^^^^^^~~~~~~~~;;íííííí~~í*=~~~~Ií^'''=''''^»©## //#####£^^^^^^^^^^^~~~~~~~~~~~íííííí~~~~~*~^^^;/''''='',,N### //######æ~^^^^^^^^~~~~~~~~~~~~~~íííí~~~~~^*^^^'=''''?',,§#### //########&^^^^^^~~~~~~~~~~~~~~~~~~~~~~~^^=^^''=''''?,íN##### //#########N?^^~~~~~~~~~~~~~~~~~~~~~~~~^^^=^''^?''';í@####### //###########N*~~~~~~~~~~~~~~~~~~~~~~~^^^*'''^='''/É######### //##############@;~~~~~~~~~~~~~~~~~~~^^~='''~?'';É########### //#################É=~~~~~~~~~~~~~~^^^*~'''*~?§############## //#####################N§£I/~~~~~~»*?~»o§æN################## //@version=4 strategy("RSI-VWAP INDICATOR", overlay=false) // ================================================================================================================================================================================ // RSI VWAP INDICATOR // ================================================================================================================================================================================ // Initial inputs Act_RSI_VWAP = input(true, "RSI VOLUME WEIGHTED AVERAGE PRICE") RSI_VWAP_length = input(17, "RSI-VWAP LENGTH") RSI_VWAP_overSold = input(19, "RSI-VWAP OVERSOLD", type=input.float) RSI_VWAP_overBought = input(80, "RSI-VWAP OVERBOUGHT", type=input.float) // RSI with VWAP as source RSI_VWAP = rsi(vwap(close), RSI_VWAP_length) // Plotting, overlay=false r=plot(RSI_VWAP, color = RSI_VWAP > RSI_VWAP_overBought ? color.red : RSI_VWAP < RSI_VWAP_overSold ? color.lime : color.blue, title="rsi", linewidth=2, style=plot.style_line) h1=plot(RSI_VWAP_overBought, color = color.gray, style=plot.style_stepline) h2=plot(RSI_VWAP_overSold, color = color.gray, style=plot.style_stepline) fill(r,h1, color = RSI_VWAP > RSI_VWAP_overBought ? color.red : na, transp = 60) fill(r,h2, color = RSI_VWAP < RSI_VWAP_overSold ? color.lime : na, transp = 60) // Long only Backtest strategy.entry("Long", strategy.long, when = (crossover(RSI_VWAP, RSI_VWAP_overSold))) strategy.close("Long", when = (crossunder(RSI_VWAP, RSI_VWAP_overBought)))