커뮤니티

문의 드립니다

프로필 이미지
만강
2024-08-04 13:45:02
919
글번호 182246
답변완료
안녕하세요 다음지표을 예스로 전환부탁드립니다 //@version = 4 study(title=" Support and Resistance Levels with Breaks",shorttitle = " Support and Resistance Levels with Breaks [LuxAlgo]", overlay = true , max_bars_back=1000) // toggleBreaks = input(true, title = "Show Breaks" ) leftBars = input(15, title = "Left Bars ") rightBars = input(15, title = "Right Bars") volumeThresh = input(20, title = "Volume Threshold") // highUsePivot = fixnan(pivothigh(leftBars, rightBars)[1]) lowUsePivot = fixnan(pivotlow(leftBars, rightBars)[1]) r1 = plot(highUsePivot, color=change(highUsePivot) ? na : #FF0000, linewidth=3, offset=-(rightBars+1), title="Resistance") s1 = plot(lowUsePivot, color=change(lowUsePivot) ? na : #233dee, linewidth=3, offset=-(rightBars+1), title="Support") //Volume % short = ema(volume, 5) long = ema(volume, 10) osc = 100 * (short - long) / long //For breaks with volume plotshape(toggleBreaks and crossunder(close,lowUsePivot) and not (open - close < high - open) and osc > volumeThresh, title = "Break", text = 'B', style = shape.labeldown, location = location.abovebar, color= color.red,textcolor = color.white, transp = 0, size = size.tiny) plotshape(toggleBreaks and crossover(close,highUsePivot ) and not(open - low > close - open) and osc > volumeThresh, title = "Break", text = 'B', style = shape.labelup, location = location.belowbar, color= color.green,textcolor = color.white, transp = 0, size = size.tiny) //For bull / bear wicks plotshape(toggleBreaks and crossover(close,highUsePivot ) and open - low > close - open , title = "Break", text = 'Bull Wick', style = shape.labelup, location = location.belowbar, color= color.green,textcolor = color.white, transp = 0, size = size.tiny) plotshape(toggleBreaks and crossunder(close,lowUsePivot) and open - close < high - open , title = "Break", text = 'Bear Wick', style = shape.labeldown, location = location.abovebar, color= color.red,textcolor = color.white, transp = 0, size = size.tiny) alertcondition(crossunder(close,lowUsePivot) and osc > volumeThresh , title = "Support Broken" , message = "Support Broken") alertcondition(crossover(close,highUsePivot) and osc > volumeThresh, title = "Resistance Broken" , message = "Resistance Broken") 감사합니다
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2024-08-05 15:06:47

안녕하세요 예스스탁입니다. input : leftBars(15); input : rightBars(15); input : volumeThresh(20); var : highUsePivot(0),lowUsePivot(0); if SwingHigh(1,H,leftBars, rightBars,leftBars+rightBars+1) != -1 Then highUsePivot = H[rightBars]; if SwingLow(1,L,leftBars, rightBars,leftBars+rightBars+1) != -1 Then lowUsePivot = L[rightBars]; plot1(highUsePivot,"Resistance",Red); plot2(lowUsePivot,"Support",Blue); FixPlotShift(1,-rightBars); FixPlotShift(2,-rightBars); //Volume % var : short(0),long(0),osc(0); short = ema(volume, 5); long = ema(volume, 10); osc = 100 * (short - long) / long; if CrossDown(close,lowUsePivot) and !(open - close < high - open) and osc > volumeThresh Then text_new(sDate,sTime,L,"B"); if CrossUp(close,highUsePivot ) and !(open - low > close - open) and osc > volumeThresh Then text_new(sDate,sTime,L,"B"); if CrossUp(close,highUsePivot ) and open - low > close - open Then text_new(sDate,sTime,L,"Bull Wick"); if CrossDown(close,lowUsePivot) and open - close < high - open Then text_new(sDate,sTime,L,"Bear Wick"); 즐거운 하루되세요 > 만강 님이 쓴 글입니다. > 제목 : 문의 드립니다 > 안녕하세요 다음지표을 예스로 전환부탁드립니다 //@version = 4 study(title=" Support and Resistance Levels with Breaks",shorttitle = " Support and Resistance Levels with Breaks [LuxAlgo]", overlay = true , max_bars_back=1000) // toggleBreaks = input(true, title = "Show Breaks" ) leftBars = input(15, title = "Left Bars ") rightBars = input(15, title = "Right Bars") volumeThresh = input(20, title = "Volume Threshold") // highUsePivot = fixnan(pivothigh(leftBars, rightBars)[1]) lowUsePivot = fixnan(pivotlow(leftBars, rightBars)[1]) r1 = plot(highUsePivot, color=change(highUsePivot) ? na : #FF0000, linewidth=3, offset=-(rightBars+1), title="Resistance") s1 = plot(lowUsePivot, color=change(lowUsePivot) ? na : #233dee, linewidth=3, offset=-(rightBars+1), title="Support") //Volume % short = ema(volume, 5) long = ema(volume, 10) osc = 100 * (short - long) / long //For breaks with volume plotshape(toggleBreaks and crossunder(close,lowUsePivot) and not (open - close < high - open) and osc > volumeThresh, title = "Break", text = 'B', style = shape.labeldown, location = location.abovebar, color= color.red,textcolor = color.white, transp = 0, size = size.tiny) plotshape(toggleBreaks and crossover(close,highUsePivot ) and not(open - low > close - open) and osc > volumeThresh, title = "Break", text = 'B', style = shape.labelup, location = location.belowbar, color= color.green,textcolor = color.white, transp = 0, size = size.tiny) //For bull / bear wicks plotshape(toggleBreaks and crossover(close,highUsePivot ) and open - low > close - open , title = "Break", text = 'Bull Wick', style = shape.labelup, location = location.belowbar, color= color.green,textcolor = color.white, transp = 0, size = size.tiny) plotshape(toggleBreaks and crossunder(close,lowUsePivot) and open - close < high - open , title = "Break", text = 'Bear Wick', style = shape.labeldown, location = location.abovebar, color= color.red,textcolor = color.white, transp = 0, size = size.tiny) alertcondition(crossunder(close,lowUsePivot) and osc > volumeThresh , title = "Support Broken" , message = "Support Broken") alertcondition(crossover(close,highUsePivot) and osc > volumeThresh, title = "Resistance Broken" , message = "Resistance Broken") 감사합니다