답변완료
지표 변환 부탁드립니다
매번 바쁘신데 감사드립니다.
QQE MOD 지표인데 multi time frame 버전입니다.
차트주기와 타주기 모두 표현 가능하고, 그래프가 첨부사진 위와 아래처럼 두 가지 모습 모두 가능한지 궁금합니다.
트레이딩뷰 지표인데 예스랭귀지로 변환 가능한지 문의드립니다.
indicator("SuperJump QQE MOD MTF", shorttitle = "Sjump QQE MOD MTF", timeframe="",timeframe_gaps =true)
RSI_Period = input.int(6, title='RSI Length')
SF = input.int(5, title='RSI Smoothing')
QQE = input.int(3, title='Fast QQE Factor')
ThreshHold = input.int(3, title="Threshold")
src = input.source(close, title="RSI Source")
QQELongColor = input.color(color.new(color.green,50), "QQE Long")
QQEShortColor = input.color(color.new(color.red,50), "QQE Short")
QQEWeakColor = input.color(color.new(color.gray,50), "QQE Weak")
isFillBackGround = input.bool(false,"Fill BackGround for higherTimeFrame")
GetQQEDefaultValue(_src, _rsi_period, _sf, _qqe) =>
_Wilders_Period = _rsi_period * 2 - 1
_RSI = ta.rsi(_src, _rsi_period)
_RsiMa = ta.ema(_RSI, _sf)
_AtrRsi = math.abs(_RsiMa[1] - _RsiMa)
_MaAtrRsi = ta.ema(_AtrRsi, _Wilders_Period)
_dar = ta.ema(_MaAtrRsi, _Wilders_Period) * _qqe
[_Wilders_Period, _RSI, _RsiMa, _AtrRsi, _dar]
[Wilders_Period, Rsi,RsiMa,AtrRsi,dar] = GetQQEDefaultValue(src, RSI_Period, SF, QQE)
GetFastAtrRsiTL(_dar, _RsiMa)=>
longband = 0.0
shortband = 0.0
trend = 0
DeltaFastAtrRsi = _dar
RSIndex = _RsiMa
newshortband = RSIndex + DeltaFastAtrRsi
newlongband = RSIndex - DeltaFastAtrRsi
longband := RSIndex[1] > longband[1] and RSIndex > longband[1] ? math.max(longband[1], newlongband) : newlongband
shortband := RSIndex[1] < shortband[1] and RSIndex < shortband[1] ? math.min(shortband[1], newshortband) : newshortband
cross_1 = ta.cross(longband[1], RSIndex)
trend := ta.cross(RSIndex, shortband[1]) ? 1 : cross_1 ? -1 : nz(trend[1], 1)
FastAtrRsiTL = trend == 1 ? longband : shortband
FastAtrRsiTL = GetFastAtrRsiTL(dar, RsiMa)
length = input.int(50, minval=1, title="Bollinger Length")
mult = input.float(0.35, minval=0.001, maxval=5, step=0.1, title="BB Multiplier")
basis = ta.sma(FastAtrRsiTL - 50, length)
dev = mult * ta.stdev(FastAtrRsiTL - 50, length)
upper = basis + dev
lower = basis - dev
Zero = hline(0, color=color.white, linestyle=hline.style_dotted, linewidth=1)
////////////////////////////////////////////////////////////////
RSI_Period2 = input(6, title='RSI Length')
SF2 = input(5, title='RSI Smoothing')
QQE2 = input(1.61, title='Fast QQE2 Factor')
ThresHold2 = input(3, title="Threshold")
src2 = input(close, title="RSI Source")
[Wilders_Period2, Rsi2,RsiMa2,AtrRsi2,dar2] = GetQQEDefaultValue(src2, RSI_Period2, SF2, QQE2)
FastAtrRsi2TL = GetFastAtrRsiTL(dar2, RsiMa2)
Greenbar1 = RsiMa2 - 50 > ThresHold2
Greenbar2 = RsiMa - 50 > upper
Redbar1 = RsiMa2 - 50 < 0 - ThresHold2
Redbar2 = RsiMa - 50 < lower
isLongTrend = Greenbar1 and Greenbar2 == 1
isShortTrend = Redbar1 and Redbar2 == 1
plot(isFillBackGround == false? FastAtrRsi2TL - 50:na , title='QQE Line', color=color.white, transp=0, linewidth=2)
plot(isFillBackGround == false ? RsiMa2 - 50 :na , title="QQE Area", style=plot.style_area, color= isLongTrend ? QQELongColor : isShortTrend ? QQEShortColor : QQEWeakColor)
isLongSignal = FastAtrRsi2TL - 50 >=0 and ta.crossunder(RsiMa2 - 50,FastAtrRsi2TL - 50) and isFillBackGround == false
isShortSignal = FastAtrRsi2TL - 50 <0 and ta.crossover(RsiMa2 - 50,FastAtrRsi2TL - 50) and isFillBackGround == false
감사합니다!
2024-08-01
1305
글번호 182178
지표
답변완료
타주기 관련해서 질문드립니다
안녕하세요 더운 날 수고가 많으십니다
타주기 관련해서 지난번에 몇 번 여쭤봤던 지표가 있는데 계속 생각과는 다르게 결과가 나와서 여쭤봅니다
일단 궁금한건, 타주기 수식을 작성하면
예를들어 타주기 120분 으로 했으면 그 주기 보다 낮은 배수의 주기에서는 다 사용할 수 있는건가요? 5,10,20,30,60 이런식으로요.타주기 설정보다 높은 주기에서는 안된다는거죠?
그리고 지난번에 여쭤봤던 수식인데요 검토를 해봐도 잘 안맞아서 한번 더 여쭤볼게요. 답변 해주실 때 혹시 검토를 해보고 답변 주시나요? 제가 뭘 잘못 적용했나해서요.
제가 원하는거는
1. 120분봉에서의 데이터를 낮은 주기에서 표현을 하는거고
2. 120분 봉의 체결건수 (ticks) 가 20000개 이하 일때와 50000개 이상일때 각각 나눠서, 30000개 이하면 그 봉의 최저가를 나타내고, 50000개 이상일 경우 최고가를 나타내는 수식입니다
다른 주기에서 확인을 해봤을때 값이 제대로 나오지 않아서 한번 더 여쭤봅니다
**그리고 20000개 이하일때는 5봉 동안의 최저가,
5만개 이상일때는 5봉 동안의 최고가를 나타내는 수식도 알려주실 수 있을까요?? 만약 2만개 이하인 봉을 기준으로 5봉간 최저가를 구할때 그 전봉중 기준에 안맞는거는 건너뛰고 계산하는 수식도 가능한가요? 말이 좀 어려워서 그림 하나 첨부 하겠습니다. 안된다면 그냥 5봉내의 최저가를 구하는 식을 알려주셔도 됩니다
여러번 번거롭지만 부탁드립니다
알려주신 수식:
input : 타주기분(120);
var : S1(0),D1(0),TM(0),TF(0),cnt(0);
Array : TT[50](0),hh[50](0),ll[50](0);;
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF = TM%타주기분;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and 타주기분 > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and 타주기분 > 1 and TM >= TM[1]+타주기분) or
(Bdate == Bdate[1] and 타주기분 == 1 and TM > TM[1]) Then
{
#120분 단위 수직선
TL_New(sDate,sTime,0,sDate,sTime,999999999);
#120분 단위 Ticks와 최고가 죄저가
for cnt = 49 downto 1
{
TT[cnt] = TT[cnt-1];
HH[cnt] = HH[cnt-1];
LL[cnt] = LL[cnt-1];
}
hh[0] = h;
ll[0] = l;
TT[0] = 0;
}
if h > hh[0] Then
hh[0] = h;
if L < ll[0] Then
ll[0] = l;
TT[0] = TT[0]+Ticks;
if TT[1] > 20000 and TT[1] < 50000 then
{
var1 = hh[1];
Var2 = ll[1];
}
if var1 > 0 and Var2 > 0 Then
{
plot1(var1);
plot2(Var2);
}
}
2024-08-01
881
글번호 182176
지표
답변완료
검색식 부탁 드려요
1. 아래조건에 맞는 검색식 부탁드립니다.
0봉전 기준(기준캔들),
일목균형표
1) 후행스팬이 10 이평선을 돌파하고,
2) 선행스팬1 이 상승 하고,
3) 20일 신고가인 종목
2. TRIX (12) 시그널(9) 골든크로스 종목검색식 부탁드려요.
3. 0봉전 기준 , 일목균형표 전환선이 상승하는 종목 검색식 .
4. 0봉전 기준 , 일목균형표 기준선이 하락하는 종목 검색식.
5. 0봉전 기준 , 일목균형표 기준선이 상승하는 종목 검색식.
6. 스토캐스틱 슬로우 (12,5,5) 침체(20)를 돌파하는 종목 검색식 부탁드립니다.
7. 스토캐스틱 슬로우(12,5,5) 골든크로스 검색식 부탁드립니다.
(단,기준선 40 이하에서 발생하는 종목)
2024-08-02
1018
글번호 182174
종목검색