수식 수정 바랍니다.
안녕하새요.아래 수식은 문의 후 받은 수식인데시가에서 점이나 화살표대신 수평선으로 변경바랍니다.수평선은 당일 내지는 금주까지 표현가능하면 그렇게 부탁드립니다.또한 수평선을 삭제 가능하게 부탁드립니다.var : tx(0),hh(0,Data1),hh1(0,Data2),ll(0,Data1),ll1(0,Data2);if Data2(Bdate != Bdate[1]) Then{ hh = Data2(h); hh1 = hh[1]; ll = Data2(l); ll1 = ll[1];}if Data2(h) > hh[1] Then hh = data2(h);Plot1(hh,"60분봉 고가");Plot2(hh1,"주차트 이전고가");if data2(CrossDown(C,hh1)) Then{ tx = Text_New_Self(data2(sDate),data2(sTime),data2(O)," ▼ "); Text_SetStyle(tx,2,2); Text_SetColor(tx,Yellow);}if Data2(l) < ll[1] Then ll = data2(l);Plot3(ll,"60분봉 저가");Plot4(ll1,"주차트 이전저가");if data2(CrossUp(C,ll1)) Then{ tx = Text_New_Self(data2(sDate),data2(sTime),data2(O)," ▲ "); Text_SetStyle(tx,2,2); Text_SetColor(tx,Red);}
답변완료
문의드립니다
Inputs: Period(240), Smooth(5), Thr(0.95), UseAutoScale(true), ScaleFix(10000);Vars: U(0), D(0), SU(0), SD(0), FlowRaw(0), Flow(0), Slope(0), Col(magenta), Scale(0);If C > C[1] Then begin U = V; D = 0;endElse If C < C[1] Then begin U = 0; D = V;endElse begin U = V * 0.95; D = V * 0.95;end;SU = SummationRec(U, Period);SD = SummationRec(D, Period);If (SU + SD) <> 0 Then FlowRaw = (SU - SD) / (SU + SD);Else FlowRaw = 0;Flow = TXAverage(Upvol/DownVol,5,20,60); Slope = Flow - Flow[1];If Slope > 0 Then Col = Magenta;buy();Else If Slope < 0 Then Col = Cyan;sell();조건이 갖춰졌을때 처음에만 신호가나올수있게 해주세요
답변완료
문의 드립니다.
//@version=6// Copyright (c) 2019-present, Alex Orekhov (everget)// Chandelier Exit script may be freely distributed under the terms of the GPL-3.0 license.indicator('Chandelier Exit', shorttitle = 'CE', overlay = true)const string calcGroup = 'Calculation'length = input.int(22, title = 'ATR Period', group = calcGroup)mult = input.float(3.0, step = 0.1, title = 'ATR Multiplier', group = calcGroup)useClose = input.bool(true, title = 'Use Close Price for Extremums', group = calcGroup)const string visualGroup = 'Visuals'showLabels = input.bool(true, title = 'Show Buy/Sell Labels', group = visualGroup)highlightState = input.bool(true, title = 'Highlight State', group = visualGroup)const string alertGroup = 'Alerts'awaitBarConfirmation = input.bool(true, title = 'Await Bar Confirmation', group = alertGroup)//---atr = mult * ta.atr(length)longStop = (useClose ? ta.highest(close, length) : ta.highest(length)) - atrlongStopPrev = nz(longStop[1], longStop)longStop := close[1] > longStopPrev ? math.max(longStop, longStopPrev) : longStopshortStop = (useClose ? ta.lowest(close, length) : ta.lowest(length)) + atrshortStopPrev = nz(shortStop[1], shortStop)shortStop := close[1] < shortStopPrev ? math.min(shortStop, shortStopPrev) : shortStopvar int dir = 1dir := close > shortStopPrev ? 1 : close < longStopPrev ? -1 : dirconst color textColor = color.whiteconst color longColor = color.greenconst color shortColor = color.redconst color longFillColor = color.new(color.green, 85)const color shortFillColor = color.new(color.red, 85)buySignal = dir == 1 and dir[1] == -1longStopPlot = plot(dir == 1 ? longStop : na, title = 'Long Stop', style = plot.style_linebr, linewidth = 2, color = longColor)plotshape(buySignal ? longStop : na, title = 'Long Stop Start', location = location.absolute, style = shape.circle, size = size.tiny, color = longColor)plotshape(buySignal and showLabels ? longStop : na, title = 'Buy Label', text = 'Buy', location = location.absolute, style = shape.labelup, size = size.tiny, color = longColor, textcolor = textColor)sellSignal = dir == -1 and dir[1] == 1shortStopPlot = plot(dir == 1 ? na : shortStop, title = 'Short Stop', style = plot.style_linebr, linewidth = 2, color = shortColor)plotshape(sellSignal ? shortStop : na, title = 'Short Stop Start', location = location.absolute, style = shape.circle, size = size.tiny, color = shortColor)plotshape(sellSignal and showLabels ? shortStop : na, title = 'Sell Label', text = 'Sell', location = location.absolute, style = shape.labeldown, size = size.tiny, color = shortColor, textcolor = textColor)midPricePlot = plot(ohlc4, title = '', display = display.none, editable = false)fill(midPricePlot, longStopPlot, title = 'Long State Filling', color = (highlightState and dir == 1 ? longFillColor : na))fill(midPricePlot, shortStopPlot, title = 'Short State Filling', color = (highlightState and dir == -1 ? shortFillColor : na))await = awaitBarConfirmation ? barstate.isconfirmed : truealertcondition(dir != dir[1] and await, title = 'CE Direction Change', message = 'Chandelier Exit has changed direction, {{exchange}}:{{ticker}}')alertcondition(buySignal and await, title = 'CE Buy', message = 'Chandelier Exit Buy, {{exchange}}:{{ticker}}')alertcondition(sellSignal and await, title = 'CE Sell', message = 'Chandelier Exit Sell, {{exchange}}:{{ticker}}')트레이딩뷰 수식인데 예스트레이더 매수/매도 시스템신호로 만들어주세요.