답변완료
수식변환 문의
수고하십니다.
트레이딩뷰 지표 AWESOME OSC를 예스로 변환 부탁드립니다.
=======================================
//@version=5
indicator(title="Awesome Oscillator", shorttitle="AO", timeframe="", timeframe_gaps=true)
ao = ta.sma(hl2,5) - ta.sma(hl2,34)
diff = ao - ao[1]
plot(ao, color = diff <= 0 ? #F44336 : #009688, style=plot.style_columns)
changeToGreen = ta.crossover(diff, 0)
changeToRed = ta.crossunder(diff, 0)
alertcondition(changeToGreen, title = "AO color changed to green", message = "Awesome Oscillator's color has changed to green")
alertcondition(changeToRed, title = "AO color changed to red", message = "Awesome Oscillator's color has changed to red")
2024-03-22
739
글번호 177843
지표
답변완료
지표변환 부탁드립니다
감사합니다
아래 지표를
1
분봉지표를 타분봉지표로 변환부탁드립니다.
2
일봉지표를 분봉지표로 변환부탁드립니다.
input : length(21),hh(8),mult(2),k(2),N봉(10);
var : src(0),n(0),tx(0),sume(0),i(0),j(0),y2(0),sum(0),sumw(0),w(0),mae(0);
var : Y2TOP(0),Y2BTM(0);
src = Close;
n = barindex;
sume = 0;
for i = 0 to length-1
{
sum = 0;
sumw = 0;
for j = 0 to length-1
{
w = exp(-(pow(i-j,2)/(hh*hh*2)));
sum = sum+src[j]*w;
sumw = sumw+w;
}
y2 = sum/sumw;
sume = sume+abs(src[i] - y2);
}
mae = sume/length*mult;
Y2TOP = y2+mae;
Y2BTM = y2-mae;
Plot1(y2);
Plot2(y2+mae);
Plot3(y2-mae);
if Y2TOP < Y2TOP[1] and Y2TOP[1] == highest(Y2TOP,N봉)[1] Then
{
var1 = Y2TOP;
Var2 = C;
}
if Y2BTM > Y2BTM[1] and Y2BTM[1] == Lowest(Y2BTM,N봉)[1] Then
{
var3 = Y2BTM;
Var4 = C;
}
if var1 > 0 Then
{
plot4(var1);
plot5(var2);
}
if var3 > 0 Then
{
plot6(var3);
plot7(var4);
}
2024-03-23
978
글번호 177842
지표
답변완료
문의드립니다.
안녕하세요
수고많으세요
하기 수식에서 변수를 n봉전 기준에서 지정시간(예, 103000) 기준으로 바꿔주시면 감사하겠습니다.
오늘도 감사드립니다.
input : n봉전(5);
var : TL1(0),TL2(0);
#n봉전 당일최고가
var1 = DayHigh(0)[n봉전];
#n봉전 당일최저가
var2 = DayLow(0)[n봉전];
#차이
Var3 = var1-Var2;
TL_Delete(TL1);
TL_Delete(TL2);
value1 = var1-Var3*0.382;
value2 = var1-Var3*0.618;
TL1 = TL_New(sDate[n봉전],sTime[n봉전],value1,NextBarSdate,NextBarStime,value1);
TL2 = TL_New(sDate[n봉전],sTime[n봉전],value2,NextBarSdate,NextBarStime,value2);
TL_SetColor(TL1,Black);
TL_SetColor(TL2,Black);
2024-03-22
914
글번호 177840
지표
답변완료
스크립트 수정요청
//@version=5
indicator(title='UT Bot Alerts')
// Inputs
a = input(1, title='Key Vaule. This changes the sensitivity')
c = input(10, title='ATR Period')
h = input(false, title='Signals from Heikin Ashi Candles')
xATR = ta.atr(c)
nLoss = a * xATR
src = h ? ta.heikinashi(close) : close
var float xATRTrailingStop = na
if (na(xATRTrailingStop))
xATRTrailingStop := src[1]
iff_1 = src > nz(xATRTrailingStop[1], 0) ? src - nLoss : src + nLoss
iff_2 = src < nz(xATRTrailingStop[1], 0) and src[1] < nz(xATRTrailingStop[1], 0) ? math.min(nz(xATRTrailingStop[1]), src + nLoss) : iff_1
xATRTrailingStop := src > nz(xATRTrailingStop[1], 0) and src[1] > nz(xATRTrailingStop[1], 0) ? math.max(nz(xATRTrailingStop[1]), src - nLoss) : iff_2
pos = 0
iff_3 = src[1] > nz(xATRTrailingStop[1], 0) and src < nz(xATRTrailingStop[1], 0) ? -1 : nz(pos[1], 0)
pos := src[1] < nz(xATRTrailingStop[1], 0) and src > nz(xATRTrailingStop[1], 0) ? 1 : iff_3
xcolor = pos == -1 ? color.red : pos == 1 ? color.green : color.blue
ema = ta.ema(src, 1)
above = ta.crossover(ema, xATRTrailingStop)
below = ta.crossover(xATRTrailingStop, ema)
buySignal = src > xATRTrailingStop and above
sellSignal = src < xATRTrailingStop and below
plotshape(buySignal, title='Buy Signal', text='Buy', style=shape.labelup, location=location.belowbar, color=color.new(color.green, 0), textcolor=color.new(color.white, 0), size=size.tiny)
plotshape(sellSignal, title='Sell Signal', text='Sell', style=shape.labeldown, location=location.abovebar, color=color.new(color.red, 0), textcolor=color.new(color.white, 0), size=size.tiny)
alertcondition(buySignal, title='UT Long', message='UT Long')
alertcondition(sellSignal, title='UT Short', message='UT Short')위의 전략을 예스트레이드 스크립트로 전환 가능한가요?
2024-03-22
817
글번호 177838
지표
답변완료
​​키움 시스템 수식변환
항상 감사드립니다
아래식을 시스템식및 지표식으로 변환해 주시기 바랍니다
/**************************************************/
1_매도신호(cci60+레드삼각)
CrossDown(CCI(기간),기준)
&&CrossDown(Diplus(Period),
DiMinus(Period))
&&v<v(1)*배수
and
CrossDown(CCI(60),기준)
기간:20
기준: 0
Period :14
배수:2
2_챠트천황 매수/매도
period:10 / MA1:5 / short:11 / long:25 / signal:9
A=DIPlus(period);
B=DIMinus(period);
D=AVG(HIGH, MA1);
E=Trix(5);
F=eavg(E,3);
**매수**
o<c and A>B AND D<=C AND E>=F and MACD(short, long)>eavg(MACD(short, long), signal) and MACD(short, long)>=0
**매도**
o>c and A<B AND G>=C AND E<=F and MACD(short, long)<eavg(MACD(short, long),signal) and MACD(short, long)<=0
/******************************************************************/
3_세력강도(3,8) 지표
-세력매집선형3일 (유형:선 / 색상:red)
a=(sum(if(C>C(1),C-min(C(1),L),0))+sum(if(C<C(1),C-max(C(1),H),0)))-((Sum(((C>(C(1))) && (V>(V(1)))) - ((C<(C(1))) && (V<(V(1))))))-(sum(if(C>C(1),C-min(C(1),L),0))+sum(if(C<C(1),C-max(C(1),H),0)))*12);
b=eavg(eavg(a,3), 3);
-세력매집선형8일(유형:막대/ 상승:red/ 하락 :blue )
a=(sum(if(C>C(1),C-min(C(1),L),0))+sum(if(C<C(1),C-max(C(1),H),0)))-((Sum(((C>(C(1))) && (V>(V(1)))) - ((C<(C(1))) && (V<(V(1))))))-(sum(if(C>C(1),C-min(C(1),L),0))+sum(if(C<C(1),C-max(C(1),H),0)))*12);
d=eavg(eavg(a,8), 8);
4_방향벡터 지표
f=if(c>o,((o+h+l+3*c)*v/6), 0);
g=if(c<o, ((o+h+l+3*c)*(-v)/6), 0);
a=if(c=o, h*v, 0);
b=if(c=o, l*(-v), 0);
j=(sum(a)+sum(b)+sum(f)+sum(g))/sum(v)
-baseline :0
- 유형 : 선
- 색상 : blue
/***********************************************************/
2024-03-24
889
글번호 177837
시스템