커뮤니티

문의드립니다.

프로필 이미지
as8282
2020-06-08 14:02:02
2307
글번호 139640
답변완료
아래수식을 예스수식으로 부탁드립니다. // INPUTS { Range_Length = input(20, title="Range Length", minval=1) Display_Bars = input(true, title="Show Bar Colors") Display_ST = input(true, title="Show Trend") Display_Channel = input(true, title="Show Channel") // } // SETTINGS { Highest_H = Display_Channel ? highest(high, Range_Length) : na Lowest_L = Display_Channel ? lowest(low, Range_Length) : na Highest_C = highest(close, Range_Length) Lowest_C = lowest(close, Range_Length) Up = float(na), Up := close > Lowest_C ? min(Highest_C, Highest_C[1]) : na Dn = float(na), Dn := close < Highest_C ? max(Lowest_C, Lowest_C[1]) : na ST = float(na), ST := close > Up ? 1 : close < Dn ? -1 : nz(ST[1]) Super_Trend = ST == 1 ? Lowest_C : Highest_C Bar_Color = Display_Bars ? (ST == 1 ? (close > open ? #4caf50 : #800080) : (close > open ? #2a2e39 : #b71c1c)) : na // } // PLOT { plot(Display_ST ? Super_Trend : na, title="Super Trend",color=color.new(#000000, 0), linewidth=4) Highest_High = plot(Highest_H, title="Highest High", color=color.new(#000000, 0), display=display.none, editable=false) Highest_Close = plot(Highest_C, title="Highest Close", color=color.new(#000000, 0), display=display.none, editable=false) Lowest_Close = plot(Lowest_C, title="Lowest Close", color=color.new(#000000, 0), display=display.none, editable=false) Lowest_Low = plot(Lowest_L, title="Lowest Low", color=color.new(#000000, 0), display=display.none, editable=false) fill(Highest_Close, Highest_High, title="Range High", color=color.new(#000000, 60)) fill(Lowest_Low, Lowest_Close, title="Range Low", color=color.new(#000000, 60)) fill(Highest_High, Lowest_Low, title="Full Range", color=color.new(#42a5f5, 90)) barcolor(Bar_Color, title="Bar Colors") // }
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-06-09 10:12:30

안녕하세요 예스스탁입니다. 1 지표 input : Range_Length(20),Display_Bars(true),Display_ST(true),Display_Channel(true); var : Highest_H(0),Lowest_L(0),Highest_C(0),Lowest_C(0); var : upv(0),dnv(0),ST(0),Super_Trend(0),Bar_Color(0); if Display_Channel then { Highest_H = highest(high,Range_Length); Lowest_L = lowest(low, Range_Length); } Highest_C = highest(close, Range_Length); Lowest_C = lowest(close, Range_Length); if close > Lowest_C Then Upv = min(Highest_C, Highest_C[1]); if close < Highest_C then Dnv = max(Lowest_C, Lowest_C[1]); ST = iff(close > Upv, 1 ,iff(close < Dnv , -1,ST)); Super_Trend = iff(ST == 1 , Lowest_C , Highest_C); Bar_Color = iff(Display_Bars , iff(ST == 1 , iff(close > open ,red,blue) ,iff(close > open ,MAGENTA ,CYAN)) , nan); if Display_ST Then plot1(Super_Trend,"Super Trend",BLACK); plot2(Highest_H,"Highest High",RED); plot3(Highest_C,"Highest Close",MAGENTA); plot4(Lowest_C,"Lowest Close",BLUE); plot5(Lowest_L,"Lowest Low",CYAN); 2 강조 input : Range_Length(20),Display_Bars(true),Display_ST(true),Display_Channel(true); var : Highest_H(0),Lowest_L(0),Highest_C(0),Lowest_C(0); var : upv(0),dnv(0),ST(0),Super_Trend(0),Bar_Color(0); if Display_Channel then { Highest_H = highest(high,Range_Length); Lowest_L = lowest(low, Range_Length); } Highest_C = highest(close, Range_Length); Lowest_C = lowest(close, Range_Length); if close > Lowest_C Then Upv = min(Highest_C, Highest_C[1]); if close < Highest_C then Dnv = max(Lowest_C, Lowest_C[1]); ST = iff(close > Upv, 1 ,iff(close < Dnv , -1,ST)); Super_Trend = iff(ST == 1 , Lowest_C , Highest_C); Bar_Color = iff(Display_Bars , iff(ST == 1 , iff(close > open ,red,blue) ,iff(close > open ,MAGENTA ,CYAN)) , nan); PlotPaintBar(H,L,"강조",Bar_Color); 즐거운 하루되세요 > as8282 님이 쓴 글입니다. > 제목 : 문의드립니다. > 아래수식을 예스수식으로 부탁드립니다. // INPUTS { Range_Length = input(20, title="Range Length", minval=1) Display_Bars = input(true, title="Show Bar Colors") Display_ST = input(true, title="Show Trend") Display_Channel = input(true, title="Show Channel") // } // SETTINGS { Highest_H = Display_Channel ? highest(high, Range_Length) : na Lowest_L = Display_Channel ? lowest(low, Range_Length) : na Highest_C = highest(close, Range_Length) Lowest_C = lowest(close, Range_Length) Up = float(na), Up := close > Lowest_C ? min(Highest_C, Highest_C[1]) : na Dn = float(na), Dn := close < Highest_C ? max(Lowest_C, Lowest_C[1]) : na ST = float(na), ST := close > Up ? 1 : close < Dn ? -1 : nz(ST[1]) Super_Trend = ST == 1 ? Lowest_C : Highest_C Bar_Color = Display_Bars ? (ST == 1 ? (close > open ? #4caf50 : #800080) : (close > open ? #2a2e39 : #b71c1c)) : na // } // PLOT { plot(Display_ST ? Super_Trend : na, title="Super Trend",color=color.new(#000000, 0), linewidth=4) Highest_High = plot(Highest_H, title="Highest High", color=color.new(#000000, 0), display=display.none, editable=false) Highest_Close = plot(Highest_C, title="Highest Close", color=color.new(#000000, 0), display=display.none, editable=false) Lowest_Close = plot(Lowest_C, title="Lowest Close", color=color.new(#000000, 0), display=display.none, editable=false) Lowest_Low = plot(Lowest_L, title="Lowest Low", color=color.new(#000000, 0), display=display.none, editable=false) fill(Highest_Close, Highest_High, title="Range High", color=color.new(#000000, 60)) fill(Lowest_Low, Lowest_Close, title="Range Low", color=color.new(#000000, 60)) fill(Highest_High, Lowest_Low, title="Full Range", color=color.new(#42a5f5, 90)) barcolor(Bar_Color, title="Bar Colors") // }