
이 전략은 1시간, 2시간, 3시간, 4시간 시간 프레임의 비트코인 (BTC), 비엔나 (BNB) 및 이더리움 (ETH) 에 초점을 맞추고 있다. 이 전략은 단기간의 가격 회수를 활용하여 보다 광범위한 트렌드에서 이익을 얻으려는 것이다. 트렌드에서 회수를 식별하고, 폭락 모드 및 초과 판매 조건과 같은 확인 신호를 사용하여, 거래자는 정의된 위험과 수익 목표 아래로 포지션에 진입할 수 있다.
이 전략은 시장의 추세와 잠재적 인 회수 기회를 잡기 위해 두 개의 간단한 이동 평균 ((SMA) 를 사용합니다. 더 긴 기간의 SMA ((ma1) 는 추세 확인 지표로, 더 짧은 기간의 SMA ((ma2) 는 가격의 주요 추세에서 벗어난 경우를 식별하기 위해 사용됩니다. 가격이 ma1보다 높으면 상승 추세를 나타냅니다. 전략은 가격의 회수를 찾는 것입니다.
이 다중 시간 프레임 비트 코인, 비엔나 및 이더리움 거래 회수 전략은 트렌드에서 단기 회수 기회를 포착하는 구조화된 방법을 제공합니다. 이 전략은 트렌드 추적 및 회수 거래의 원칙을 결합하고 적절한 위험 관리 조치를 적용함으로써 잠재적인 거래 기회를 최적화하는 것을 목표로합니다. 그러나 전략의 성과는 매개 변수 선택과 시장 상황에 따라 달라지며 지속적인 모니터링과 최적화가 필요합니다.
/*backtest
start: 2023-04-23 00:00:00
end: 2024-04-28 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © GOLU_PARDHAAN
//@version=5
strategy("Pullback stretegy", overlay=true,initial_capital = 1000,default_qty_type = strategy.percent_of_equity,default_qty_value = 100)
//input
ma_lenth1=input.int(200,'MA lenth 1',step=10,group = 'Moving avrege pprameter',inline = 'MA')
ma_lenth2=input.int(13,'MA lenth 2',step=1,group = 'Moving avrege pprameter',inline = 'MA')
sl=input.float(title = "stop loss%",defval=0.07,step=0.1,group = 'moving avrege pprameter')
too_deep=input.float(title = 'Too deep(%)',defval = 0.27,step=0.01,group='Too Deep and Too Thin',inline='Too')
too_thin=input.float(title = 'Too thin(%)',defval = 0.03,step=0.01,group='Too Deep and Too Thin',inline='Too')
//claulation
ma1=ta.sma(close,ma_lenth1)
ma2=ta.sma(close,ma_lenth2)
too_deep2= (ma2/ma1-1)<too_deep
too_thin2= (ma2/ma1-1)>too_thin
//entry and colose Conditionq
var float buy_price=0
buy_condition=(close>ma1)and(close<ma2)and strategy.position_size==0 and too_deep2 and too_thin2
close_condition1=(close>ma2)and strategy.position_size>0 and (close<low[1])
stop_distance=strategy.position_size>0? ((buy_price-close)/close): na
close_condition2=strategy.position_size>0 and stop_distance>sl
stop_price= strategy.position_size>0?buy_price-(buy_price*sl): na
//entry and close order
if buy_condition
strategy.entry('Long',strategy.long)
if buy_condition[1]
buy_price:=open
if close_condition1 or close_condition2
strategy.close('Long' ,comment = "exite"+(close_condition2 ? "SL=ture":""))
buy_price :=na
plot(ma1,color = color.blue)
plot(ma2,color = color.orange)