커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

문의드립니다

트레이딩뷰 지표인데 소스가 엄청 길어서 가능한지 모르겠습니다. 예스 지표로 변환 부탁드립니다. //@version=4 // Created By Lij_MC // // Use as a supplementary Indicator to confirm your entries, but it is as good on it's own. // // The indicator consists of 3 different Trend Meters and 2 Trend Bars which are used to confirm trend // // As a bonus Wave Trend Signals are marked as well, these are very powerful however please use with caution // // How to Use // // Look for Support or Resistance Levels for price to be attracted to // // Be CAUTIOUS of trading BREAKOUTs as 9 out of 10 Breakouts Fail // // Find confluence with other indicators // // Enter Long above the Setup Bar // // Enter Short Below the Setup Bar study(title="Trend Meter") // Inputs / Menus PosNegPressure = input(true, "Pos / Neg Pressure", tooltip= "Positive Pressure = RSI14 and Wave Trend Over Sold with WT Delta Pointing Up Negative Pressure = RSI14 and Wave Trend Over Bought with WT Delta Pointing Down", group = "Signals") TMSetups = input(true, "Trend Meter Signal", tooltip="All 3 Trend Meters Now Align", group = "Signals") TMSetupsANDWT = input(true, "Wave Trend Cross Aligns with Trend Meter Signal", group = "Signals") TrendBar1 = input(title="Trend Meter 1", defval="MACD Crossover - Fast - 8, 21, 5", options=["MACD Crossover - 12, 26, 9", "MACD Crossover - Fast - 8, 21, 5", "Mom Dad Cross (Top Dog Trading)", "RSI Signal Line Cross - RSI 13, Sig 21", "RSI 13: > or < 50", "RSI 5: > or < 50", "Trend Candles", "N/A"], group = "Trend Meters") // "MA Crossover", "DAD Direction (Top Dog Trading)", TrendBar2 = input(title="Trend Meter 2", defval="RSI 13: > or < 50", options=["MACD Crossover - 12, 26, 9", "MACD Crossover - Fast - 8, 21, 5", "Mom Dad Cross (Top Dog Trading)", "RSI Signal Line Cross - RSI 13, Sig 21", "RSI 13: > or < 50", "RSI 5: > or < 50", "Trend Candles", "N/A"], group = "Trend Meters") // "MA Crossover", "DAD Direction (Top Dog Trading)", TrendBar3 = input(title="Trend Meter 3", defval="RSI 5: > or < 50", options=["MACD Crossover - 12, 26, 9", "MACD Crossover - Fast - 8, 21, 5", "Mom Dad Cross (Top Dog Trading)", "RSI Signal Line Cross - RSI 13, Sig 21", "RSI 13: > or < 50", "RSI 5: > or < 50", "Trend Candles", "N/A"], group = "Trend Meters") // "MA Crossover", "DAD Direction (Top Dog Trading)", ////////////////Signals - Wave Trend///////////////////////////////////////////////////////////////////////////////////////////////// // Wave Trend - RSI RSIMC = rsi(close, 14) // Wave Trend ap = hlc3 // input(hlc3, "Wave Trend - Source") n1 = 9 //input(9, "Wave Trend - WT Channel Length") n2 = 12 // input(12, "Wave Trend - WT Average Length") esa = ema(ap, n1) de = ema(abs(ap - esa), n1) ci = (ap - esa) / (0.015 * de) tci = ema(ci, n2) wt1 = tci wt2 = sma(wt1, 3) YellowWave= wt1 -wt2 // Wave Trend - Overbought & Oversold lines obLevel2 = 60 // input( 60, "Wave Trend - WT Very Overbought") obLevel = 50 // input( 50, "Wave Trend - WT Overbought") osLevel = -50 // input(-50, "Wave Trend - WT Oversold") osLevel2 = -60 // input(-60, "Wave Trend - WT Very Oversold") // Wave Trend - Conditions WTCross = cross(wt1, wt2) WTCrossUp = wt2 - wt1 <= 0 WTCrossDown = wt2 - wt1 >= 0 WTOverSold = wt2 <= osLevel2 WTOverBought = wt2 >= obLevel2 // MA Inputs ShowTrendBar1 = input(true, "Trend Bar 1", group = "Trend Bar 1", inline = "Trend Bar 1") ShowTrendBar2 = input(true, "Trend Bar 2", group = "Trend Bar 2", inline = "Trend Bar 2") TrendBar4 = input(title="", defval="MA Crossover", options=["MA Crossover", "MA Direction - Fast MA - TB1", "MA Direction - Slow MA - TB1"], group = "Trend Bar 1", inline = "Trend Bar 1") // "MACD Crossover - 12, 26 9", "MACD Crossover - Fast - 8, 21, 5", "DAD Direction (Top Dog Trading)", TrendBar5 = input(title="", defval="MA Crossover", options=["MA Crossover", "MA Direction - Fast MA - TB2", "MA Direction - Slow MA - TB2"], group = "Trend Bar 2", inline = "Trend Bar 2") // "MACD Crossover - 12, 26 9", "MACD Crossover - Fast - 8, 21, 5", "DAD Direction (Top Dog Trading)", MA1_Length = input(5, title='Fast MA', minval=1, group = "Trend Bar 1", inline = "TB1 Fast") MA1_Type = input( title='', defval="EMA", options=["EMA", "SMA"], group = "Trend Bar 1", inline = "TB1 Fast") MA2_Length = input(11, title='Slow MA', minval=1, group = "Trend Bar 1", inline = "TB1 Slow") MA2_Type = input( title='', defval="EMA", options=["EMA", "SMA"], group = "Trend Bar 1", inline = "TB1 Slow") MA3_Length = input(13, title='Fast MA', minval=1, group = "Trend Bar 2", inline = "TB2 Fast") MA3_Type = input( title='', defval="EMA", options=["EMA", "SMA"], group = "Trend Bar 2", inline = "TB2 Fast") MA4_Length = input(36, title='Slow MA', minval=1, group = "Trend Bar 2", inline = "TB2 Slow") MA4_Type = input( title='', defval="SMA", options=["EMA", "SMA"], group = "Trend Bar 2", inline = "TB2 Slow") // MA Calculations Close = close //security(syminfo.tickerid, timeframe.period, close, barmerge.lookahead_off) MA1 = if MA1_Type == "SMA" sma(Close, MA1_Length) else ema(Close, MA1_Length) MA2 = if MA2_Type == "SMA" sma(Close, MA2_Length) else ema(Close, MA2_Length) MA3 = if MA3_Type == "SMA" sma(Close, MA3_Length) else ema(Close, MA3_Length) MA4 = if MA4_Type == "SMA" sma(Close, MA4_Length) else ema(Close, MA4_Length) // MA Crossover Condition MACrossover1 = MA1 > MA2 ? 1 : 0 MACrossover2 = MA3 > MA4 ? 1 : 0 // MA Direction Condition MA1Direction = MA1 > MA1[1] ? 1 : 0 MA2Direction = MA2 > MA2[1] ? 1 : 0 MA3Direction = MA3 > MA3[1] ? 1 : 0 MA4Direction = MA4 > MA4[1] ? 1 : 0 // MA Direction Change Condition MA1PositiveDirectionChange = MA1Direction and not MA1Direction[1] ? 1 : 0 MA2PositiveDirectionChange = MA2Direction and not MA2Direction[1] ? 1 : 0 MA3PositiveDirectionChange = MA3Direction and not MA3Direction[1] ? 1 : 0 MA4PositiveDirectionChange = MA4Direction and not MA4Direction[1] ? 1 : 0 MA1NegativeDirectionChange = not MA1Direction and MA1Direction[1] ? 1 : 0 MA2NegativeDirectionChange = not MA2Direction and MA2Direction[1] ? 1 : 0 MA3NegativeDirectionChange = not MA3Direction and MA3Direction[1] ? 1 : 0 MA4NegativeDirectionChange = not MA4Direction and MA4Direction[1] ? 1 : 0 // MACD and MOM & DAD - Top Dog Trading // Standard MACD Calculations MACDfastMA = 12 MACDslowMA = 26 MACDsignalSmooth = 9 MACDLine = ema(close, MACDfastMA) - ema(close, MACDslowMA) SignalLine = ema(MACDLine, MACDsignalSmooth) MACDHistogram = MACDLine - SignalLine // MACD- Background Color Change Condition MACDHistogramCross = MACDHistogram > 0 ? 1 : 0 MACDLineOverZero = MACDLine > 0 ? 1 : 0 MACDLineOverZeroandHistogramCross = MACDHistogramCross and MACDLineOverZero ? 1 : 0 MACDLineUnderZeroandHistogramCross = not MACDHistogramCross and not MACDLineOverZero ? 1 : 0 // Fast MACD Calculations FastMACDfastMA = 8 FastMACDslowMA = 21 FastMACDsignalSmooth = 5 FastMACDLine = ema(close, FastMACDfastMA) - ema(close, FastMACDslowMA) FastSignalLine = ema(FastMACDLine, FastMACDsignalSmooth) FastMACDHistogram = FastMACDLine - FastSignalLine // Fast MACD- Background Color Change Condition FastMACDHistogramCross = FastMACDHistogram > 0 ? 1 : 0 FastMACDLineOverZero = FastMACDLine > 0 ? 1 : 0 FastMACDLineOverZeroandHistogramCross = FastMACDHistogramCross and FastMACDLineOverZero ? 1 : 0 FastMACDLineUnderZeroandHistogramCross = not FastMACDHistogramCross and not FastMACDLineOverZero ? 1 : 0 // Top Dog Trading - Mom Dad Calculations TopDog_Fast_MA = 5 TopDog_Slow_MA = 20 TopDog_Sig = 30 TopDogMom = ema(close, TopDog_Fast_MA) - ema(close, TopDog_Slow_MA) TopDogDad = ema(TopDogMom, TopDog_Sig) // Top Dog Dad - Background Color Change Condition TopDogDadDirection = TopDogDad > TopDogDad[1] ? 1 : 0 TopDogMomOverDad = TopDogMom > TopDogDad ? 1 : 0 TopDogMomOverZero = TopDogMom > 0 ? 1 : 0 TopDogDadDirectandMomOverZero = TopDogDadDirection and TopDogMomOverZero ? 1 : 0 TopDogDadDirectandMomUnderZero = not TopDogDadDirection and not TopDogMomOverZero ? 1 : 0 ////// Trend Barmeter Calculations ////// // UCS_Trend / Trend Candles Trend Barmeter Calculations //UCS_Trend by ucsgears copy Trend Candles //Interpretation of TTM Trend bars. It is really close to the actual. haclose = ohlc4 haopen = 0.0 haopen := na(haopen[1]) ? (open + close) / 2 : (haopen[1] + haclose[1]) / 2 //hahigh = max(high, max(haopen, haclose)) //halow = min(low, min(haopen, haclose)) ccolor = haclose - haopen > 0 ? 1 : 0 inside6 = haopen <= max(haopen[6], haclose[6]) and haopen >= min(haopen[6], haclose[6]) and haclose <= max(haopen[6], haclose[6]) and haclose >= min(haopen[6], haclose[6]) ? 1 : 0 inside5 = haopen <= max(haopen[5], haclose[5]) and haopen >= min(haopen[5], haclose[5]) and haclose <= max(haopen[5], haclose[5]) and haclose >= min(haopen[5], haclose[5]) ? 1 : 0 inside4 = haopen <= max(haopen[4], haclose[4]) and haopen >= min(haopen[4], haclose[4]) and haclose <= max(haopen[4], haclose[4]) and haclose >= min(haopen[4], haclose[4]) ? 1 : 0 inside3 = haopen <= max(haopen[3], haclose[3]) and haopen >= min(haopen[3], haclose[3]) and haclose <= max(haopen[3], haclose[3]) and haclose >= min(haopen[3], haclose[3]) ? 1 : 0 inside2 = haopen <= max(haopen[2], haclose[2]) and haopen >= min(haopen[2], haclose[2]) and haclose <= max(haopen[2], haclose[2]) and haclose >= min(haopen[2], haclose[2]) ? 1 : 0 inside1 = haopen <= max(haopen[1], haclose[1]) and haopen >= min(haopen[1], haclose[1]) and haclose <= max(haopen[1], haclose[1]) and haclose >= min(haopen[1], haclose[1]) ? 1 : 0 colorvalue = inside6 ? ccolor[6] : inside5 ? ccolor[5] : inside4 ? ccolor[4] : inside3 ? ccolor[3] : inside2 ? ccolor[2] : inside1 ? ccolor[1] : ccolor TrendBarTrend_Candle_Color = colorvalue ? #288a75 : color.red TrendBarTrend_Candle = colorvalue ? 1 : 0 // RSI 5 Trend Barmeter Calculations RSI5 = rsi(close, 5) RSI5Above50 = RSI5 > 50 ? 1 : 0 RSI5Color = RSI5Above50 ? #288a75 : color.red TrendBarRSI5Color = RSI5Above50 ? #288a75 : color.red // RSI 5 Trend Barmeter Calculations RSI13 = rsi(close, 13) // Linear Regression Calculation For RSI Signal Line SignalLineLength1 = 21 x = bar_index y = RSI13 x_ = sma(x, SignalLineLength1) y_ = sma(y, SignalLineLength1) mx = stdev(x, SignalLineLength1) my = stdev(y, SignalLineLength1) c = correlation(x, y, SignalLineLength1) slope = c * (my / mx) inter = y_ - slope * x_ LinReg1 = x * slope + inter RSISigDirection = LinReg1 > LinReg1[1] ? 1 : 0 RSISigCross = RSI13 > LinReg1 ? 1 : 0 RSI13Above50 = RSI13 > 50 ? 1 : 0 // Trend Barmeter Color Calculation RSI13Color = RSI13Above50 ? #288a75 : color.red TrendBarRSI13Color = RSI13Above50 ? #288a75 : color.red TrendBarRSISigCrossColor = RSISigCross ? #288a75 : color.red TrendBarMACDColor = MACDHistogramCross ? #288a75 : color.red TrendBarFastMACDColor = FastMACDHistogramCross ? #288a75 : color.red TrendBarMACrossColor = MACrossover1 ? #288a75 : color.red TrendBarMomOverDadColor = TopDogMomOverDad ? #288a75 : color.red TrendBarDadDirectionColor = TopDogDadDirection ? #288a75 : color.red TrendBar1Result = TrendBar1 == "MA Crossover" ? MACrossover1 : TrendBar1 == "MACD Crossover - 12, 26, 9" ? MACDHistogramCross : TrendBar1 == "MACD Crossover - Fast - 8, 21, 5" ? FastMACDHistogramCross : TrendBar1 == "Mom Dad Cross (Top Dog Trading)" ? TopDogMomOverDad : TrendBar1 == "DAD Direction (Top Dog Trading)" ? TopDogDadDirection : TrendBar1 == "RSI Signal Line Cross - RSI 13, Sig 21" ? RSISigCross : TrendBar1 == "RSI 5: > or < 50" ? RSI5Above50 : TrendBar1 == "RSI 13: > or < 50" ? RSI13Above50 : TrendBar1 == "Trend Candles" ? TrendBarTrend_Candle : na TrendBar2Result = TrendBar2 == "MA Crossover" ? MACrossover1 : TrendBar2 == "MACD Crossover - 12, 26, 9" ? MACDHistogramCross : TrendBar2 == "MACD Crossover - Fast - 8, 21, 5" ? FastMACDHistogramCross : TrendBar2 == "Mom Dad Cross (Top Dog Trading)" ? TopDogMomOverDad : TrendBar2 == "DAD Direction (Top Dog Trading)" ? TopDogDadDirection : TrendBar2 == "RSI Signal Line Cross - RSI 13, Sig 21" ? RSISigCross : TrendBar2 == "RSI 5: > or < 50" ? RSI5Above50 : TrendBar2 == "RSI 13: > or < 50" ? RSI13Above50 : TrendBar2 == "Trend Candles" ? TrendBarTrend_Candle : na TrendBar3Result = TrendBar3 == "MA Crossover" ? MACrossover1 : TrendBar3 == "MACD Crossover - 12, 26, 9" ? MACDHistogramCross : TrendBar3 == "MACD Crossover - Fast - 8, 21, 5" ? FastMACDHistogramCross : TrendBar3 == "Mom Dad Cross (Top Dog Trading)" ? TopDogMomOverDad : TrendBar3 == "DAD Direction (Top Dog Trading)" ? TopDogDadDirection : TrendBar3 == "RSI Signal Line Cross - RSI 13, Sig 21" ? RSISigCross : TrendBar3 == "RSI 5: > or < 50" ? RSI5Above50 : TrendBar3 == "RSI 13: > or < 50" ? RSI13Above50 : TrendBar3 == "Trend Candles" ? TrendBarTrend_Candle : na TrendBars2Positive = TrendBar1Result and TrendBar2Result or TrendBar1Result and TrendBar3Result or TrendBar2Result and TrendBar3Result ? 1 : 0 TrendBars2Negative = not TrendBar1Result and not TrendBar2Result or not TrendBar1Result and not TrendBar3Result or not TrendBar2Result and not TrendBar3Result ? 1 : 0 TrendBars3Positive = TrendBar1Result and TrendBar2Result and TrendBar3Result ? 1 : 0 TrendBars3Negative = not TrendBar1Result and not TrendBar2Result and not TrendBar3Result ? 1 : 0 PositiveWaveTrendCross = WTCross and WTCrossUp NegativeWaveTrendCross = WTCross and WTCrossDown /////////////////////////////////////////////////////////////////////////////////////////////////////////////// BackgroundColorChangePositive = TrendBars3Positive and not TrendBars3Positive[1] BackgroundColorChangeNegative = TrendBars3Negative and not TrendBars3Negative[1] // Signals Color Calculations MSBar2Color = BackgroundColorChangePositive ? #288a75 : BackgroundColorChangeNegative ? color.red : na // Trend Barmeter Color Assignments TrendBar1Color = TrendBar1 == "N/A" ? na : TrendBar1 == "MACD Crossover - 12, 26, 9" ? TrendBarMACDColor : TrendBar1 == "MACD Crossover - Fast - 8, 21, 5" ? TrendBarFastMACDColor : TrendBar1 == "Mom Dad Cross (Top Dog Trading)" ? TrendBarMomOverDadColor : TrendBar1 == "DAD Direction (Top Dog Trading)" ? TrendBarDadDirectionColor : TrendBar1 == "RSI Signal Line Cross - RSI 13, Sig 21" ? TrendBarRSISigCrossColor : TrendBar1 == "RSI 5: > or < 50" ? TrendBarRSI5Color : TrendBar1 == "RSI 13: > or < 50" ? TrendBarRSI13Color : TrendBar1 == "Trend Candles" ? TrendBarTrend_Candle_Color : TrendBar1 == "MA Crossover" ? TrendBarMACrossColor : na TrendBar2Color = TrendBar2 == "N/A" ? na : TrendBar2 == "MACD Crossover - 12, 26, 9" ? TrendBarMACDColor : TrendBar2 == "MACD Crossover - Fast - 8, 21, 5" ? TrendBarFastMACDColor : TrendBar2 == "Mom Dad Cross (Top Dog Trading)" ? TrendBarMomOverDadColor : TrendBar2 == "DAD Direction (Top Dog Trading)" ? TrendBarDadDirectionColor : TrendBar2 == "RSI Signal Line Cross - RSI 13, Sig 21" ? TrendBarRSISigCrossColor : TrendBar2 == "RSI 5: > or < 50" ? TrendBarRSI5Color : TrendBar2 == "RSI 13: > or < 50" ? TrendBarRSI13Color : TrendBar2 == "Trend Candles" ? TrendBarTrend_Candle_Color : TrendBar2 == "MA Crossover" ? TrendBarMACrossColor : na TrendBar3Color = TrendBar3 == "N/A" ? na : TrendBar3 == "MACD Crossover - 12, 26, 9" ? TrendBarMACDColor : TrendBar3 == "MACD Crossover - Fast - 8, 21, 5" ? TrendBarFastMACDColor : TrendBar3 == "Mom Dad Cross (Top Dog Trading)" ? TrendBarMomOverDadColor : TrendBar3 == "DAD Direction (Top Dog Trading)" ? TrendBarDadDirectionColor : TrendBar3 == "RSI Signal Line Cross - RSI 13, Sig 21" ? TrendBarRSISigCrossColor : TrendBar3 == "RSI 5: > or < 50" ? TrendBarRSI5Color : TrendBar3 == "RSI 13: > or < 50" ? TrendBarRSI13Color : TrendBar3 == "Trend Candles" ? TrendBarTrend_Candle_Color : TrendBar3 == "MA Crossover" ? TrendBarMACrossColor : na CrossoverType2 = TrendBar4 == "DAD Direction (Top Dog Trading)" ? TopDogDadDirection : TrendBar4 == "MACD Crossover" ? MACDHistogramCross : TrendBar4 == "MA Direction - Fast MA - TB1" ? MA1Direction : TrendBar4 == "MA Direction - Slow MA - TB1" ? MA2Direction : MACrossover1 color_1 = color.new(color.green, 15) color_2 = color.new(color.red, 20) TrendBar4Color1 = TrendBar4 == "N/A" ? na : CrossoverType2 ? color_1 : color_2 CrossoverType3 = TrendBar5 == "DAD Direction (Top Dog Trading)" ? TopDogDadDirection : TrendBar5 == "MACD Crossover" ? MACDHistogramCross : TrendBar5 == "MA Direction - Fast MA - TB2" ? MA3Direction : TrendBar5 == "MA Direction - Slow MA - TB2" ? MA4Direction : MACrossover2 color_3 = color.new(color.green, 15) color_4 = color.new(color.red, 20) TrendBar5Color1 = TrendBar5 == "N/A" ? na : CrossoverType3 ? color_3 : color_4 WTVOB = wt1 > 60 WTVOS = wt1 < -60 // Weekness / Pos/Neg Pressure YellowWavePointingUp = YellowWave > YellowWave[1] RSI14 = rsi(close, 14) RSI14OB = RSI14 > 70 ? 1 : 0 RSI14OS = RSI14 < 30 ? 1 : 0 RSI14OBOS = RSI14OB or RSI14OS ? 1 : 0 OBIndicatorsYellowPointingDown = (RSI14OB or RSI14OB[1]) and WTVOB and not YellowWavePointingUp OSIndicatorsYellowPointingUp = (RSI14OS or RSI14OS[1]) and WTVOS and YellowWavePointingUp plot(PosNegPressure and OSIndicatorsYellowPointingUp ? 138.5 : na, "Wave Trend - Positive Pressure", color=color.new(#288a75, 25), style=plot.style_circles, linewidth=1) plot(PosNegPressure and OBIndicatorsYellowPointingDown ? 138.5 : na, "Wave Trend - Negative Pressure", color=color.new(#DC143C, 32), style=plot.style_circles, linewidth=1) alertcondition(OBIndicatorsYellowPointingDown or OSIndicatorsYellowPointingUp, title=' - Pos / Neg Pressure', message='Pos / Neg Pressure - Trend Meter') plot(TMSetups ? 134.5 : na, title = "All 3 Trend Meters Now Align", style=plot.style_circles, color=MSBar2Color, linewidth=3, transp=20) plot(TMSetupsANDWT and ((PositiveWaveTrendCross and TrendBars3Positive) or (NegativeWaveTrendCross and TrendBars3Negative)) ? 134.5 : na, title="Wave Trend X & All 3 Trend Meters Now Align", style=plot.style_cross, color=MSBar2Color, linewidth=4, transp=20) // Trend Barmeter Plots plot(128.5, title="Trend Meter 1", style=plot.style_circles, color=TrendBar1Color, linewidth=2, transp=18) plot(122.5, title="Trend Meter 2", style=plot.style_circles, color=TrendBar2Color, linewidth=2, transp=18) plot(116.5, title="Trend Meter 3", style=plot.style_circles, color=TrendBar3Color, linewidth=2, transp=18) plot(ShowTrendBar1 and ShowTrendBar2 ? 110 : na, title="Trend Bar 1 - Thin Line", style=plot.style_line, color=TrendBar4Color1, linewidth=4, transp=20) plot(ShowTrendBar1 and not ShowTrendBar2 ? 110 : na, title="Trend Bar 1 - Thick Line", style=plot.style_line, color=TrendBar4Color1, linewidth=9, transp=20) plot(ShowTrendBar2 and ShowTrendBar1 ? 104.5 : na, title="Trend Bar 2 - Thin Line", style=plot.style_line, color=TrendBar5Color1, linewidth=6, transp=20) plot(ShowTrendBar2 and not ShowTrendBar1 ? 110 : na, title="Trend Bar 2 - Thick Line", style=plot.style_line, color=TrendBar5Color1, linewidth=9, transp=20) // Background Highlights TrendBar3BarsSame = TrendBars3Positive ? color.green : TrendBars3Negative ? color.red : na TMa = hline(113.7, color=color.new(color.white, 100)) TMb = hline(131.3, color=color.new(color.white, 100)) fill(TMa, TMb, color=TrendBar3BarsSame, transp=91, title="Trend Meter Background Highlight - 3 Trend Meter Conditions Met") // Alerts & Conditions - MA Crossing & Background Color alertcondition(BackgroundColorChangePositive, title=' -- 3 TMs Turn Green', message='All 3 Trend Meters Turn Green - Trend Meter') alertcondition(BackgroundColorChangeNegative, title=' -- 3 TMs Turn Red', message='All 3 Trend Meters Turn Red - Trend Meter') alertcondition(BackgroundColorChangePositive or BackgroundColorChangeNegative, title=' -- 3 TMs Change to Same Color', message='All 3 Trend Meters Change to Same Color - Trend Meter') alertcondition(PositiveWaveTrendCross and TrendBars3Positive, title="--- 3 TMs Turn Green & WaveTrend X", message='Green - Wave Trend Signal - Aligns with 3 Trend Meters - Trend Meter') alertcondition(NegativeWaveTrendCross and TrendBars3Negative, title="--- 3 TMs Turn Red & WaveTrend X", message='Red - Wave Trend Signal - Aligns with 3 Trend Meters - Trend Meter') alertcondition((PositiveWaveTrendCross and TrendBars3Positive) or (NegativeWaveTrendCross and TrendBars3Negative), title="--- 3 TMs Change to Same Color & WT X", message='Red / Green - Wave Trend Signal - Aligns with 3 Trend Meters - Trend Meter') TrendMetersNoLongerAlign = ((not TrendBars3Positive or not TrendBars3Negative) and TrendBars3Positive[1]) or ((not TrendBars3Positive or not TrendBars3Negative) and TrendBars3Negative[1]) alertcondition(TrendMetersNoLongerAlign, title='---- 3 Trend Meters No Longer Align', message='3 Trend Meters No Longer Align - Trend Meter') RapidColorChangePositive = TrendBars3Positive and (TrendBars3Negative[1] or TrendBars3Negative[2]) RapidColorChangeNegative = TrendBars3Negative and (TrendBars3Positive[1] or TrendBars3Positive[2]) alertcondition(RapidColorChangePositive, title='All 3 TMs Rapid Change Red to Green', message='All 3 Trend Meters Rapid Change Red to Green - Trend Meter') alertcondition(RapidColorChangeNegative, title='All 3 TMs Rapid Change Green to Red', message='All 3 Trend Meters Rapid Change Green to Red - Trend Meter') alertcondition(RapidColorChangePositive or RapidColorChangeNegative, title='All 3 TMs Rapid Change to Same Color', message='All 3 Trend Meters Rapid Change to Same Color - Trend Meter') MaxValueMACrossUp = crossover( ema(Close, 5), ema(Close, 11)) MaxValueMACrossDown = crossunder(ema(Close, 5), ema(Close, 11)) TB1MACrossUp = crossover( MA1, MA2) TB1MACrossDown = crossunder(MA1, MA2) alertcondition(TB1MACrossUp, title='TB 1 Turns Green', message='Trend Bar 1 - Turns Green - Trend Meter') alertcondition(TB1MACrossDown, title='TB 1 Turns Red', message='Trend Bar 1 - Turns Red - Trend Meter') alertcondition(TB1MACrossUp or TB1MACrossDown, title='TB 1 Color Change', message='Trend Bar 1 - Color Change - Trend Meter') TB2MACrossUp = crossover(MA3, MA4) TB2MACrossDown = crossunder(MA3, MA4) alertcondition(TB2MACrossUp, title='TB 2 Turns Green', message='Trend Bar 2 - Turns Green - Trend Meter') alertcondition(TB2MACrossDown, title='TB 2 Turns Red', message='Trend Bar 2 - Turns Red - Trend Meter') alertcondition(TB2MACrossUp or TB2MACrossDown, title='TB 2 Color Change', message='Trend Bar 2 - Color Change - Trend Meter') TB1Green = MA1 > MA2 TB1Red = MA1 < MA2 TB2Green = MA3 > MA4 TB2Red = MA3 < MA4 TB12Green = TB1Green and TB2Green and (TB1MACrossUp or TB2MACrossUp) TB12Red = TB1Red and TB2Red and (TB1MACrossDown or TB2MACrossDown) alertcondition(TB12Green, title='TBs 1+2 Turn Green', message='Trend Bars 1+2 - Turn Green - Trend Meter') alertcondition(TB12Red, title='TBs 1+2 Turn Red', message='Trend Bars 1+2 - Turn Red - Trend Meter') alertcondition(TB12Green or TB12Red, title='TBs 1+2 Change to Same Color', message='Trend Bars 1+2 - Change to Same Color - MAs Crossing - Trend Meter') alertcondition(TB12Green and TrendBars3Positive, title='TBs 1+2 Turn Green with 3 TMs', message='Trend Bars 1+2 - Turn Green with 3 TMs - Trend Meter') alertcondition(TB12Red and TrendBars3Negative, title='TBs 1+2 Turn Red with 3 TMs', message='Trend Bars 1+2 - Turn Red with 3 TMs- Trend Meter') alertcondition((TB12Green and TrendBars3Positive) or (TB12Red and TrendBars3Negative) , title='TBs 1+2 Change to Same Color with 3 TMs', message='Trend Bars 1+2 - Change to Same Color with 3 TMs - Trend Meter') alertcondition(TB1Green and TrendBars3Positive, title='TB 1 Turns Green with 3 TMs', message='Trend Bar 1 - Turn Green with 3 TMs - Trend Meter') alertcondition(TB1Red and TrendBars3Negative, title='TB 1 Turns Red with 3 TMs', message='Trend Bar 1 - Turn Red with 3 TMs- Trend Meter') alertcondition((TB1Green and TrendBars3Positive) or (TB1Red and TrendBars3Negative) , title='TB 1 Change to Same Color with 3 TMs', message='Trend Bar 1 - Change to Same Color with 3 TMs - Trend Meter') alertcondition(TB2Green and TrendBars3Positive, title='TB 2 Turns Green with 3 TMs', message='Trend Bar 2 - Turn Green with 3 TMs - Trend Meter') alertcondition(TB2Red and TrendBars3Negative, title='TB 2 Turns Red with 3 TMs', message='Trend Bar 2 - Turn Red with 3 TMs- Trend Meter') alertcondition((TB2Green and TrendBars3Positive) or (TB2Red and TrendBars3Negative) , title='TB 2 Change to Same Color with 3 TMs', message='Trend Bar 2 - Change to Same Color with 3 TMs - Trend Meter') alertcondition( BackgroundColorChangePositive and TB1Green, title='3 TMs Turn Green with TB 1', message='All 3 Trend Meters Turn Green with TB 1 - Trend Meter') alertcondition( BackgroundColorChangeNegative and TB1Red, title='3 TMs Turn Red with TB 1', message='All 3 Trend Meters Turn Red with TB 1 - Trend Meter') alertcondition((BackgroundColorChangePositive and TB1Green) or (BackgroundColorChangeNegative and TB1Red), title='3 TMs Change Color with TB 1', message='All 3 Trend Meters Change Color with TB 1 - Trend Meter') alertcondition( BackgroundColorChangePositive and TB2Green, title='3 TMs Turn Green with TB 2', message='All 3 Trend Meters Turn Green with TB 2 - Trend Meter') alertcondition( BackgroundColorChangeNegative and TB2Red, title='3 TMs Turn Red with TB 2', message='All 3 Trend Meters Turn Red with TB 2 - Trend Meter') alertcondition((BackgroundColorChangePositive and TB2Green) or (BackgroundColorChangeNegative and TB2Red), title='3 TMs Change Color with TB 2', message='All 3 Trend Meters Change Color with TB 2 - Trend Meter') alertcondition( BackgroundColorChangePositive and TB1Green and TB2Green, title='3 TMs Turn Green with TBs 1+2', message='All 3 Trend Meters Turn Green with Trend Bar 1+2 - Trend Meter') alertcondition( BackgroundColorChangeNegative and TB1Red and TB2Red, title='3 TMs Turn Red with TBs 1+2', message='All 3 Trend Meters Turn Red with Trend Bar 1+2 - Trend Meter') alertcondition((BackgroundColorChangePositive and TB1Green and TB2Green) or (BackgroundColorChangeNegative and TB1Red and TB2Red), title='3 TMs Change Color with TBs 1+2', message='All 3 Trend Meters Change Color with Trend Bar 1+2 - Trend Meter')
프로필 이미지
삼손감자
2023-11-28
1659
글번호 174397
지표
답변완료

수정 부탁드립니다.

안녕하세요? 아래 수식을 참조데이터2 기본차트에 넣으려고 합니다. 수식을 그에 맞게 고쳐주시면 대단히 감사하겠습니다. 감사드리며 오늘도 좋은시간 되세요. =============== input : R1(255),G1(0),B1(0); input : R2(0),G2(0),B2(255); var : hh(0),ll(0),Rt1(0),Rt2(0),Mv1(0),Mv2(0),Diff(0); Rt1 = Upvol/Volume*100; Rt2 = Downvol/Volume*100; Mv1 = money*(Rt1/100); Mv2 = money*(Rt2/100); diff = Mv1-Mv2; if Bdate != Bdate[1] Then { var1 = 0; Var2 = Diff; } var1 = var1 + Diff; if CurrentDate == sDate Then Plot1(var1,"당일실매수거래량",iff(var1 > 0,RGB(0,0,0),RGB(0,0,0))); if CurrentDate == sDate Then plot2(Var2,"첫봉종가"); if Bdate != Bdate[1] Then { hh = var1; ll = var1; } Else { if var1 > hh Then hh = var1; if var1 < ll Then ll = var1; } if CurrentDate == sDate Then { Plot3(hh,"최고"); plot4(ll,"최저"); plot5(ll+(hh-ll)*0.25,"25.0%"); plot6(ll+(hh-ll)*0.382,"38.2%"); plot7(ll+(hh-ll)*0.500,"50.0%"); plot8(ll+(hh-ll)*0.618,"61.8%"); plot9(ll+(hh-ll)*0.75,"75.0%"); plot10(ll+(hh-ll)*0.500+150,"+150"); plot11(Var2+100,"첫봉종가+20"); } if CurrentDate == sDate Then { PlotBaseLine1(0); PlotBaseLine2(30000); PlotBaseLine3(-30000); }
프로필 이미지
포보스
2023-11-28
781
글번호 174389
지표
답변완료

매수 조건식 부탁 드립니다.

안녕하세요. 아래 매수 조건들이 모두 and 상황에서 시장가 매매 가능하도록 부탁 드립니다. 매수 조건 1. 60분봉상 240이평선이 480이평선 아래 있을때 2. RSI 30 하향 돌파 시 3. 볼린저밴드 하단 하향 돌파 시 감사합니다.
프로필 이미지
둥둥애비
2023-11-28
949
글번호 174388
시스템
답변완료

문의 드립니다.

Hsto S=stochasticsSlow(s기간1, s기간2); HighestSince(1, CrossUp(S, 기준1), ma(c, 이평기간)); Lsto S=stochasticsSlow(s기간1, s기간2); LowestSince(1, CrossDown(S, 기준2), ma(c, 이평기간)); s기간1 20 s기간2 30 이평기간 10 기준1 80 기준2 20 키움 지표인데 예스로 좀 변환해주세요
프로필 이미지
신대륙발견
2023-11-28
966
글번호 174387
지표
답변완료

문의드립니다

20일이전에 5일선이 20일선을 하향돌파했다가 다시 상향돌파했을때 종목을 찾고싶습니다
프로필 이미지
처음처럼22
2023-11-28
922
글번호 174383
종목검색
답변완료

종목검색식 문의드립니다

수고하십니다 종목검색식 문의드립니다 당일 5분첫봉 상승폭(저가~고가)의 두배가되는 고가라인을 종가로 돌파한 5분두번째봉의 종목을 검색하고 싶은데요.... 실시간 종목검색 가능할까요?
프로필 이미지
pinpoint
2023-11-28
900
글번호 174382
종목검색
답변완료

시스템 변환 문의드립니다.

지표문의를 드리고 시스템 매매를 해보려고합니다. input : length(14); input : mult(1.0); var : src(0),stdev(0),Emav(0),upper(0),lower(0); var : bullish(0),bearish(0),bull_den(0),bear_den(0); var : bull(0),bear(0); src = close; stdev = std(src, length) * mult; emav = ema(src, length); upper = emav + stdev; lower = emav - stdev; bullish = AccumN(max(src - upper, 0), length); bearish = AccumN(max(lower - src, 0), length); bull_den = AccumN(abs(src - upper), length); bear_den = AccumN(abs(lower - src), length); bull = bullish/bull_den*100; bear = bearish/bear_den*100; 여기까지가 문의 답변주셔서 변환한 지표였고 위 지표를 기반으로 밑에있는 파인스크립트 코드를 변환해서 손익절을 하고싶습니다. 손익절 기준이 여러가지가 있었는데 ATR 기준으로 하고싶어서 ATR만 남기고 다 빼려고 노력했습니다만.. 여기까지가 한계라서 문의드립니다ㅜㅜ 코드에 트레일링스탑이 있는데 그것도 변환이 가능할까요? bool openLongPosition = ta.crossover(bull, bear) bool openShortPosition = ta.crossunder(bull , bear) // LOGIC ============================================================================================================ // the open signals when not already into a position bool validOpenLongPosition = openLongPosition and not (strategy.opentrades.size(strategy.opentrades - 1) > 0) bool validOpenShortPosition = openShortPosition and not (strategy.opentrades.size(strategy.opentrades - 1) < 0) bool longIsActive = validOpenLongPosition or strategy.opentrades.size(strategy.opentrades - 1) > 0 bool shortIsActive = validOpenShortPosition or strategy.opentrades.size(strategy.opentrades - 1) < 0 // INPUT ============================================================================================================ atrLength = input.int(defval = 14, title = 'ATR Length', minval = 1, tooltip = 'How many previous candles to use for the ATR calculation.', group = 'General') // LOGIC ============================================================================================================ // take profit has to communicate its exeution with the stop loss logic when 'TP' mode is seleced var bool longTrailingTakeProfitExeuted = false var bool shortTrailingTakeProfitExeuted = false float openAtr = ta.valuewhen(validOpenLongPosition or validOpenShortPosition, ta.atr(atrLength), 0) // INPUT ============================================================================================================ stopLossMethod = input.string(defval = 'ATR', title = 'Stop Loss Method', options = ['ATR'], tooltip = 'The method to calculate the Stop Loss (percentagewise, based on initial ATR or based on ATR changing over time).', group = 'Stop Loss - Target') longStopLossAtrMul = input.float(defval = 10.0, title = 'ATR Long/Short Mul', minval = 0.1, step = 0.1, inline = 'Trailing Stop Loss ATR Multiplier', group = 'Stop Loss - Target') shortStopLossAtrMul = input.float(defval = 10.0, title = '', minval = 0.1, step = 0.1, tooltip = 'ATR multiplier to be used for the long/short Stop Loss.', inline = 'Trailing Stop Loss ATR Multiplier', group = 'Stop Loss - Target') stopLossTrailingEnabled = input.string(defval = 'TP', title = 'Enable Trailing', options = ['TP', 'ON', 'OFF'], tooltip = 'Enable the trailing for Stop Loss when Take Profit order is exeted (TP) or from the start of the entry order (ON) or not at all (OFF).', group = 'Stop Loss - Trailing') breakEvenEnabled = input.bool(defval = false, title = 'Break Even', tooltip = 'When Take Profit price target is hit, move the Stop Loss to the entry price (or to a more strict price defined by the Stop Loss %/ATR Multiplier).', group = 'Stop Loss - Trailing') // LOGIC ============================================================================================================ getLongStopLossPrice(baseSrc) => switch stopLossMethod 'ATR' => baseSrc - longStopLossAtrMul * openAtr => na // trailing starts when the take profit price is reached if 'TP' mode is set or from the very begining if 'ON' mode is seleced bool longTakeProfitTrailingEnabled = stopLossTrailingEnabled == 'ON' or stopLossTrailingEnabled == 'TP' and longTrailingTakeProfitExeuted // calculate trailing stop loss price when enter long position and peserve its value until the position closes var float longStopLossPrice = na longStopLossPrice := if (longIsActive) if (validOpenLongPosition) getLongStopLossPrice(close) else stopPrice = getLongStopLossPrice(longTakeProfitTrailingEnabled ? high : strategy.opentrades.entry_price(strategy.opentrades - 1)) stopPrice := breakEvenEnabled and longTrailingTakeProfitExeuted ? math.max(stopPrice, strategy.opentrades.entry_price(strategy.opentrades - 1)) : stopPrice math.max(stopPrice, nz(longStopLossPrice[1])) else na getShortStopLossPrice(baseSrc) => switch stopLossMethod 'ATR' => baseSrc + shortStopLossAtrMul * openAtr => na // trailing starts when the take profit price is reached if 'TP' mode is set or from the very begining if 'ON' mode is seleced bool shortTakeProfitTrailingEnabled = stopLossTrailingEnabled == 'ON' or stopLossTrailingEnabled == 'TP' and shortTrailingTakeProfitExeuted // calculate trailing stop loss price when enter short position and peserve its value until the position closes var float shortStopLossPrice = na shortStopLossPrice := if (shortIsActive) if (validOpenShortPosition) getShortStopLossPrice(close) else stopPrice = getShortStopLossPrice(shortTakeProfitTrailingEnabled ? low : strategy.opentrades.entry_price(strategy.opentrades - 1)) stopPrice := breakEvenEnabled and shortTrailingTakeProfitExeuted ? math.min(stopPrice, strategy.opentrades.entry_price(strategy.opentrades - 1)) : stopPrice math.min(stopPrice, nz(shortStopLossPrice[1], 999999.9)) else na // PLOT ============================================================================================================= var stopLossColor = color.new(color.maroon, 0) plot(series = longStopLossPrice, title = 'Long Stop Loss', color = stopLossColor, linewidth = 1, style = plot.style_linebr, offset = 1) plot(series = shortStopLossPrice, title = 'Short Stop Loss', color = stopLossColor, linewidth = 1, style = plot.style_linebr, offset = 1) //#endregion ======================================================================================================== //#region TAKE PROFIT // INPUT ============================================================================================================ takeProfitQuantityPerc = input.float(defval = 50, title = 'Take Profit Quantity %', minval = 0.0, maxval = 100, step = 1.0, tooltip = 'The percentage of the position that will be withdrawn when the take profit price target is reached.', group = 'Take Profit - Quantity') takeProfitMethod = input.string(defval = 'ATR', title = 'Take Profit Method', options = ['ATR'], tooltip = 'The method to calculate the Take Profit price.', group = 'Take Profit - Target') //longTakeProfitPerc = input.float(defval = 1.0, title = 'Long/Short Take Profit %', minval = 0.05, step = 0.05, inline = 'Take Profit Perc', group = 'Take Profit - Target') / 100 //shortTakeProfitPerc = input.float(defval = 1.0, title = '', minval = 0.05, step = 0.05, tooltip = 'The percentage of the price increase/decrease to set the take profit price target for long/short positions.', inline = 'Take Profit Perc', group = 'Take Profit - Target') / 100 longTakeProfitAtrMul = input.float(defval = 10.0, title = 'ATR Long/Short Mul&#8195;', minval = 0.1, step = 0.1, inline = 'Take Profit ATR Multiplier', group = 'Take Profit - Target') shortTakeProfitAtrMul = input.float(defval = 10.0, title = '', minval = 0.1, step = 0.1, tooltip = 'ATR multiplier to be used for the long/short Take Profit.', inline = 'Take Profit ATR Multiplier', group = 'Take Profit - Target') takeProfitTrailingEnabled = input.bool(defval = true, title = 'Enable Trailing', tooltip = 'Enable or disable the trailing for take profit.', group = 'Take Profit - Trailing') distanceMethod = input.string(defval = 'ATR', title = 'Distance Method', options = ['ATR'], tooltip = 'The method to calculate the Distance for the Trailing Take Profit.', group = 'Take Profit - Trailing') distancePerc = input.float(defval = 1.0, title = 'Distance %', minval = 0.01, maxval = 100, step = 0.05, tooltip = 'The percentage wise step to be used for following the price, when the take profit target is reached.', group = 'Take Profit - Trailing') / 100 distanceAtrMul = input.float(defval = 1.0, title = 'Distance ATR Mul', minval = 0.01, step = 0.05, tooltip = 'Multiplier to be used on the initial entrys` ATR to calculate the step for following the price, when the take profit target is reached.', group = 'Take Profit - Trailing') // LOGIC ============================================================================================================ getLongTakeProfitPrice() => switch takeProfitMethod 'ATR' => close + longTakeProfitAtrMul * openAtr => na getLongTakeProfitPerc() => (close - getLongTakeProfitPrice()) / close // calculate take profit price when enter long position and peserve its value until the position closes var float longTakeProfitPrice = na longTakeProfitPrice := if (longIsActive and not longTrailingTakeProfitExeuted) if (validOpenLongPosition) getLongTakeProfitPrice() else nz(longTakeProfitPrice[1], getLongTakeProfitPrice()) else na longTrailingTakeProfitExeuted := strategy.opentrades.size(strategy.opentrades - 1) > 0 and (longTrailingTakeProfitExeuted[1] or strategy.opentrades.size(strategy.opentrades - 1) < strategy.opentrades.size(strategy.opentrades - 1)[1] or strategy.opentrades.size(strategy.opentrades - 1)[1] == 0 and high >= longTakeProfitPrice) longTrailingTakeProfitStepTicks = switch distanceMethod 'ATR' => distanceAtrMul * openAtr / syminfo.mintick => na getShortTakeProfitPrice() => switch takeProfitMethod 'ATR' => close - shortTakeProfitAtrMul * openAtr => na getShortTakeProfitPerc() => (getShortTakeProfitPrice() - close) / close // calculate take profit price when enter short position and peserve its value until the position closes var float shortTakeProfitPrice = na shortTakeProfitPrice := if (shortIsActive and not shortTrailingTakeProfitExeuted) if (validOpenShortPosition) getShortTakeProfitPrice() else nz(shortTakeProfitPrice[1], getShortTakeProfitPrice()) else na shortTrailingTakeProfitExeuted := strategy.opentrades.size(strategy.opentrades - 1) < 0 and (shortTrailingTakeProfitExeuted[1] or strategy.opentrades.size(strategy.opentrades - 1) > strategy.opentrades.size(strategy.opentrades - 1)[1] or strategy.opentrades.size(strategy.opentrades - 1)[1] == 0 and low <= shortTakeProfitPrice) shortTrailingTakeProfitStepTicks = switch distanceMethod 'ATR' => distanceAtrMul * openAtr / syminfo.mintick => na // PLOT ============================================================================================================= var takeProfitColor = color.new(color.teal, 0) plot(series = longTakeProfitPrice, title = 'Long Take Profit', color = takeProfitColor, linewidth = 1, style = plot.style_linebr, offset = 1) plot(series = shortTakeProfitPrice, title = 'Short Take Profit', color = takeProfitColor, linewidth = 1, style = plot.style_linebr, offset = 1) // LOGIC ============================================================================================================ // getting into LONG position if (validOpenLongPosition) strategy.entry(id = 'Long Entry', direction = strategy.long, alert_message = 'Long(' + syminfo.ticker + '): Start') else strategy.cancel(id = 'Long Entry') if (longIsActive) strategy.exit(id = 'Long Take Profit / Stop Loss', from_entry = 'Long Entry', qty_percent = takeProfitQuantityPerc, limit = takeProfitTrailingEnabled ? na : longTakeProfitPrice, stop = longStopLossPrice, trail_price = takeProfitTrailingEnabled ? longTakeProfitPrice : na, trail_offset = takeProfitTrailingEnabled ? longTrailingTakeProfitStepTicks : na, alert_message = 'Long(' + syminfo.ticker + '): Take Profit or Stop Loss exeuted') strategy.exit(id = 'Long Stop Loss', from_entry = 'Long Entry', stop = longStopLossPrice, alert_message = 'Long(' + syminfo.ticker + '): Stop Loss exeuted') // getting into SHORT position if (validOpenShortPosition) strategy.entry(id = 'Short Entry', direction = strategy.short, alert_message = 'Short(' + syminfo.ticker + '): Start') else strategy.cancel(id = 'Short Entry') if (shortIsActive) strategy.exit(id = 'Short Take Profit / Stop Loss', from_entry = 'Short Entry', qty_percent = takeProfitQuantityPerc, limit = takeProfitTrailingEnabled ? na : shortTakeProfitPrice, stop = shortStopLossPrice, trail_price = takeProfitTrailingEnabled ? shortTakeProfitPrice : na, trail_offset = takeProfitTrailingEnabled ? shortTrailingTakeProfitStepTicks : na, alert_message = 'Short(' + syminfo.ticker + '): Take Profit or Stop Loss exeuted') strategy.exit(id = 'Short Stop Loss', from_entry = 'Short Entry', stop = shortStopLossPrice, alert_message = 'Short(' + syminfo.ticker + '): Stop Loss exeuted') // PLOT ============================================================================================================= var posColor = color.new(color.gray, 0) plot(series = strategy.opentrades.entry_price(strategy.opentrades - 1), title = 'Position', color = posColor, linewidth = 1, style = plot.style_linebr) //#endregion ========================================================================================================
프로필 이미지
잘하고프다
2023-11-28
1944
글번호 174381
시스템
답변완료

수식 변환 부탁드립니다.

안녕하세요? 항상 감사드립니다. 아래는 K사 일봉과 분봉에 라인을 표시한 건데요 예스에서 선으로 나타내고 싶습니다. 변환가능할까요? 1. 분봉 A=PREDAYHIGH() - PREDAYLOW(); DAYOPEN()+A*0.5 2. 일봉 A=H(1)-L(1); A1=O+A*0.5; VALUEWHEN(1,CROSSUP(C,A1),A1)
프로필 이미지
매일대박
2023-11-27
860
글번호 174380
지표

2wnwn 님에 의해서 삭제되었습니다.

프로필 이미지
2wnwn
2023-11-27
15
글번호 174379
지표

전진 님에 의해서 삭제되었습니다.

프로필 이미지
전진
2023-11-27
7
글번호 174378
검색