예스스탁
예스스탁 답변
2025-03-28 09:36:31
안녕하세요
예스스탁입니다.
input : LookbackLength(400),RSILength(14),Fib1(23.6),Fib2(31.1),Fib3(100);
var : RawVWAPRSI(0),RangeHigh(0),RangeLow(0),ChartRange(0);
var : Trendline1(0),Trendline2(0),Trendline3(0);
var : sum1(0),sum2(0), VWAP(0);
var : u(0),d(0),alpha(0),R1(0),R2(0),RS(0),RES(0);
if Bdate != Bdate[1] Then
{
sum1 = 0;
sum2 = 0;
}
sum1 = sum1 + ((H+L)/2*v);
sum2 = sum2 + v;
VWAP = sum1/sum2;
u = max(vwap - vwap[1], 0);
d = max(vwap[1] - vwap, 0);
alpha = 1/RSILength;
R1 = iff(IsNan(R1[1]) == true , ma(u, RSILength) , alpha * u + (1 - alpha) * IFf(IsNaN(R1[1]) == true,0,R1[1]));
R2 = iff(IsNan(R2[1]) == true , ma(d, RSILength) , alpha * d + (1 - alpha) * iff(IsNaN(R1[1]) == true,0,R2[1]));
rs = R1/R2;
RawVWAPRSI = 100 - 100 / (1 + rs);
if Index > LookbackLength Then
{
RangeHigh = highest(RawVWAPRSI,LookbackLength );
RangeLow = lowest(RawVWAPRSI, LookbackLength ) ;
ChartRange = RangeHigh - RangeLow ;
Trendline1 = Fib1/100*ChartRange + RangeLow ;
Trendline2 = Fib2/100*ChartRange + RangeLow ;
Trendline3 = Fib3/100*ChartRange + RangeLow ;
Plot1(RawVWAPRSI,"RawVWAPRSI", IFf(RawVWAPRSI > RawVWAPRSI[1] , yellow, Magenta));;
Plot2(RangeLow + ChartRange / 2,"50%",white ) ;
Plot3(Trendline1,"fib1",green);
Plot4(Trendline2,"fib2",blue) ;
Plot5(Trendline3,"fib3",red);
}
즐거운 하루되세요
> 신대륙발견 님이 쓴 글입니다.
> 제목 : 문의 드립니다.
> study("[blackcat] L1 Fibonacci VWAP RSI Indicator", overlay=false, max_bars_back=5000, max_labels_count=500)
//inputs
LookbackLength = input(400, title = "LookbackLength")
RSILength = input(14, title = "RSILength")
Fib1 = input(23.6, title = "Fib1")
Fib2 = input(31.1, title = "Fib2")
Fib3 = input(100, title = "Fib3")
//vars
RawVWAPRSI = 0.00
RangeHigh = 0.00
RangeLow = 100.00
ChartRange = 0.00
Trendline1 = 0.00
Trendline2 = 0.00
Trendline3 = 0.00
RawVWAPRSI := rsi(vwap(hl2), RSILength )
if bar_index > LookbackLength
RangeHigh := highest(RawVWAPRSI,LookbackLength )
RangeLow := lowest(RawVWAPRSI, LookbackLength )
ChartRange := RangeHigh - RangeLow
Trendline1 := Fib1/100*ChartRange + RangeLow
Trendline2 := Fib2/100*ChartRange + RangeLow
Trendline3 := Fib3/100*ChartRange + RangeLow
Plot1 =plot( bar_index > LookbackLength ? RawVWAPRSI : na , color= RawVWAPRSI > RawVWAPRSI[1] ? color.yellow : color.fuchsia, linewidth = 2)
Plot2 = plot( bar_index > LookbackLength ? RangeLow + ChartRange / 2 : na, color=color.white )
Plot3 = plot( bar_index > LookbackLength ? Trendline1 : na, color=color.green )
Plot4 = plot( bar_index > LookbackLength ? Trendline2 : na, color=color.blue )
Plot5 = plot( bar_index > LookbackLength ? Trendline3 : na, color=color.red )
트레이딩뷰 수식인데 예스로 좀 바꿔주세요.