답변완료
적용가능하도록 부탁드립니다.
**트레이팅뷰의 지표입니다. 적용가능하도록 부탁 드립니다.
indicator("Triple Confirmation Kernel Regression Oscillator Overlay [QuantraAI]", "KRO Overlay [QuantraAI]", true, format.price, timeframe = "", timeframe_gaps = false)
import QuantraAI/QuantraMAs/2 as DynamicMA
import QuantraSystems/DynamicFunctions/1 as DynamicFunc
var string KRS = "??? ??????? - Settings", var string KRU = "??? ??????? - UI"
source = input.source(close, "Source", group = KRS)
bandwidth = input.int (45, "Bandwidth", 1, group = KRS, tooltip = "Length of the Kernel Regression calculation")
width = input.float (2, "Width", step = 0.2, group = KRS, tooltip = "Smoothes the Signal")
sdLook = input.int (150, "Standard Deviation Lookback", group = KRS, tooltip = "Length of the SD bands lookback period")
sdMult = input.float (3, "Standard Deviation Extreme for OB/OS Border", step = 0.5, group = KRS, tooltip = "Defines the outer border of the SD bands. ₩nThe inner border begins at 50% of the SD Multiplier")
ColMode = input.string("Modern", "Color Palette Choice", inline = "QQ1", group = KRU, options = ["Classic", "Modern", "Robust", "Accented", "Monochrome"])
man = input.bool (false, "Custom Palette", inline = "QQ1", group = KRU)
manUpC = input.color (#00ff00, "Custom Up", inline = "man", group = KRU)
manDnC = input.color (#ff0000, "Custom Down", inline = "man", group = KRU)
sig = input.bool (false, "Show Trend Signals", group = KRU)
BCol = input.bool (true, "Enable Bar Coloring", group = KRU)
devS = input.bool (true, "Enable Deviation Band Shading", group = KRU)
OBOS = input.bool (true, "Enable Overbought/Oversold Shading", group = KRU)
TR = input.int (85, "Shading Transparency", 0, 100, group = KRU)
// Color assignment based on the
[UpC, DnC] = switch ColMode
"Classic" => [#00E676, #880E4F]
"Modern" => [#5ffae0, #c22ed0]
"Robust" => [#ffbb00, #770737]
"Accented" => [#9618f7, #ff0078]
"Monochrome" => [#dee2e6, #495057]
// Override with custom colors if manual
[UpCol, DnCol] = switch man
false => [UpC, DnC ]
true => [manUpC, manDnC]
// Achieves a non-deciaml tick size
rescale(src) => src * (1 / syminfo.mintick)
descale(src) => src / (1 / syminfo.mintick)
// Rescale the Input Source
source := rescale(source)
Wave = descale(DynamicFunc.waveCalculation (source, bandwidth, width ))
// Triple Confirmations
Ep = descale(DynamicFunc.kernelRegression(source, bandwidth, 'Epanechnikov' ))
Lo = descale(DynamicFunc.kernelRegression(source, bandwidth, 'Logistic' ))
Wa = descale(DynamicFunc.kernelRegression(source, bandwidth, 'Wave' ))
// Average
AV = math.avg(Ep, Lo, Wa) + close
Mid = DynamicMA.SMA(AV, sdLook)
arrUp = Wave > Wave[1] and not (Wave[1] > Wave[2])
arrDn = Wave < Wave[1] and not (Wave[1] < Wave[2])
// Standard Deviation Bands
[_, u1, l1] = DynamicFunc.stdv_bands(AV, sdLook, sdMult/2)
[_, u2, l2] = DynamicFunc.stdv_bands(AV, sdLook, sdMult)
// Define shared display settings
var all = sig ? display.all : display.none
// Main Plots
pu1 = plot (u1, "1.???? +", color.new(DnCol, 70) )
pl1 = plot (l1, "1.???? -", color.new(UpCol, 70) )
pu2 = plot (u2, "2.???? +", color.new(DnCol, 70) )
pl2 = plot (l2, "2.???? -", color.new(UpCol, 70) )
mid = plot (Mid, "Mid", color.gray, 2 )
HL2 = plot (hl2, "", color (na) )
wave = plot (Wave, "???????????? ????????", BCol ? color (na) : Wave > Wave[1] ? UpCol : DnCol, 3 ),
fill (pu1, pu2, u2, u1, devS ? color.new(DnCol, 60) : na, color.new(chart.bg_color, 55) ),
fill (pl1, pl2, l2, l1, devS ? color.new(UpCol, 60) : na, color.new(chart.bg_color, 55) ),
fill (wave, HL2, Wave, hl2, BCol ? color.new(Wave > Wave[1] ? UpCol : DnCol, 50) : na, color.new(chart.bg_color, 75) ),
plotshape(arrUp, "Trend", shape.arrowup, location.belowbar, UpCol, 0, "Up", UpCol, size = size.auto, display = all ),
plotshape(arrDn, "Trend", shape.arrowdown, location.abovebar, DnCol, 0, "Down", DnCol, size = size.auto, display = all ),
bgcolor (OBOS ? (AV > u2 ? color.new(DnCol, TR) : AV < l2 ? color.new(UpCol, TR) : na) : na),
barcolor (BCol ? Wave > Wave[1]? UpCol : DnCol: na)
2024-09-01
961
글번호 183035
지표
답변완료
수고하십니다
더운데 고생 많으십니다
아래식을 라인2에도달시 매수 라인3 에 도달시 청산식
1 시스템과
2 지표로
캔들에 라인2가 도달된 캔들지점에동그라미나삼각이나표시로
라인3인도달시청산표시 꼭 부탁드립니다
다가오는추석 잘보내시고 수고하세요
input:length(6),n(1);
Var:j(0),jj(0),HH(0),LL(0),최종고가(0),최종저가(0),최종꼭지점(""),처리구분(""),
TL1(0),Text1(0),TL2(0),TL3(0),TL4(0),TL5(0),TL12(0),TL13(0),TL14(0),TL15(0),T(0),md1(0),md2(0);
Array:고[10,4](0),저[10,4](0); // 1:가격,2:Index,3:sDate,4:sTime
#==========================================#
HH = IFF(0==1,C,H);
LL = IFF(0==1,C,L);
If Index == 0 Then
{
고[1,1] = HH;
저[1,1] = LL;
}
Condition1 = Highest(HH,length) == HH and 최종고가 <> HH;
Condition2 = Lowest (LL,length) == LL and 최종저가 <> LL;
처리구분 = "";
If Condition1 and Condition2 Then // 기간고점과 기간저점 동시 발생
{
If 최종꼭지점 == "저점" Then
{
If 저[1,1] > LL Then 처리구분 = "저점처리";
Else 처리구분 = "고점처리";
}
Else If 최종꼭지점 == "고점" Then
{
If 고[1,1] < HH Then 처리구분 = "고점처리";
Else 처리구분 = "저점처리";
}
}
Else If Condition1 Then 처리구분 = "고점처리";
Else If Condition2 Then 처리구분 = "저점처리";
#==========================================#
If 처리구분 == "고점처리" Then
{
T = 1;
최종고가 = HH; // 신규고점을 체크하기 위해 저장
If 최종꼭지점 == "저점" Then
{
For j = 10 DownTo 2
{
For jj = 1 To 4
{
고[j,jj] = 고[j-1,jj];
}
}
고[1,1] = HH;
고[1,2] = Index;
고[1,3] = sDate;
고[1,4] = sTime;
TL1 = TL_New(저[1,3],저[1,4],저[1,1],고[1,3],고[1,4],고[1,1]);
If 1 == 1 Then
TL_SetSize(TL1,n);
TL_SetColor(TL1,White);
}
Else If 고[1,1] < HH Then // 1번 고점보다 높은 고가 출현
{
고[1,1] = HH;
고[1,2] = Index;
고[1,3] = sDate;
고[1,4] = sTime;
TL_SetEnd(TL1,고[1,3],고[1,4],고[1,1]);
// 시작점은 변동없고 끝점의 위치가 현재 봉으로 연장된 것임
If 1 == 1 Then
{
Text_SetLocation(Text1,고[1,3],고[1,4],고[1,1]);
Text_SetString(Text1,NumToStr(고[1,1],2));
}
}
최종꼭지점 = "고점";
}
#==========================================#
If 처리구분 == "저점처리" Then
{
T = -1;
최종저가 = LL;
If 최종꼭지점 == "고점" then
{
For j = 10 DownTo 2
{
For jj = 1 To 4
{
저[j,jj] = 저[j-1,jj];
}
}
저[1,1] = LL;
저[1,2] = Index;
저[1,3] = sDate;
저[1,4] = sTime;
TL1 = TL_New(고[1,3],고[1,4],고[1,1],저[1,3],저[1,4],저[1,1]);
If 1 == 1 Then
TL_SetSize(TL1,n);
TL_SetColor(TL1,WHITE);
}
Else If 저[1,1] > LL then
{
저[1,1] = LL;
저[1,2] = Index;
저[1,3] = sDate;
저[1,4] = sTime;
TL_SetEnd(TL1,저[1,3],저[1,4],저[1,1]);
If 1 == 1 Then
{
Text_SetLocation(Text1,저[1,3],저[1,4],저[1,1]);
Text_SetString(Text1,NumToStr(저[1,1],2));
}
}
최종꼭지점 = "저점";
}
if 고[1,1] > 0 Then
{
if T == 1 and T != T[1] Then
md1 = 0;
Else
{
if 고[1,1] != 고[1,1][1] Then
md1 = 0;
Else
{
if (L-고[1,1])/고[1,1]*100 < md1 Then
md1 = (L-고[1,1])/고[1,1]*100;
}
}
plot1(Md1);
}
if 저[1,1] > 0 Then
{
if T == -1 and T != T[1] Then
md2 = 0;
Else
{
if 저[1,1] != 저[1,1][1] Then
md2 = 0;
Else
{
if (H-저[1,1])/저[1,1]*100 > md2 Then
md2 = (H-저[1,1])/저[1,1]*100;
}
}
plot2(Md2);
}
PlotBaseLine1(0);
PlotBaseLine2(-50);
PlotBaseLine3(50);
2024-09-01
710
글번호 183030
지표
답변완료
수고 많으십니다. 1번과 2번 동시에 만족하는 검색기 부탁드립니다.
1
var : AA(0),대금(0),zA(0),zB(0),DD(0),양대금(0),zA1(0),B1(0),D1(0),음대금(0);
대금 = (H+O+L+C)/4*V/100000000;
zA=IfF(C>O,대금,0);
zB=Accum(zA);
zA1=IfF(C<O,대금,0);
B1=Accum(zA1);
if sDate != sDate[1] Then
{
DD = zB[1];
D1 = B1[1];
}
양대금=zB-DD;
음대금=B1-D1;
Condition1 = CROSSUP(양대금,음대금);
var : A(0),A1(0),A2(0),A3(0),A4(0),B(0);
A=OBV();
B=Ema(A, 9);
A1=accum(V*(Pow(C-L,2)-Pow(H-C, 2))/(H-L));
A2=ADX(11);
A3=100*Ema(C,10)/Ema(C[20],10);
A4=100*Ema(Ema(C,10)/Ema(C[20],10),9);
Condition2 = A3[1]<=100 && (Crossup(A3,A4) OR Crossup(A,B)) &&
A[1]<A && A1[1]<A1 && A2[1]<A2 && A3[1]<A3;
if Condition1 == true and Condition2 == true Then
Find(1);
==========================================================
2
input : AtrPeriod(14),factor(3);
var : src(0), AtrV(0),upperBand(0),lowerBand(0), prevLowerBand(0), prevUpperBand(0);
var : prevSuperTrend(0), superTrend(C), direction(0),alpha(0),source(0);
if CurrentBar > 1 Then
{
src = (H+L)/2;
alpha = 1 / AtrPeriod ;
source = max(high - low, abs(high - close[1]), abs(low - close[1]));
ATrV = alpha * source + (1 - alpha) * ATrV[1]; //지수가중이평방식
//ATrV = ma(source,AtrPeriod); //단순이평방식
upperBand = src + factor * AtrV;
lowerBand = src - factor * AtrV;
prevLowerBand = lowerBand[1];
prevUpperBand = upperBand[1];
if lowerBand > prevLowerBand or close[1] < prevLowerBand Then
lowerBand = lowerBand;
Else
lowerBand = prevLowerBand;
if upperBand < prevUpperBand or close[1] > prevUpperBand Then
upperBand = upperBand;
Else
upperBand = prevUpperBand;
if C > UpperBand Then
direction = 1;
if C < LowerBand Then
direction = -1;
if direction == 1 Then
supertrend = lowerband;
Else
supertrend = upperband;
if CrossUp(c,supertrend) && C>O Then
Find(1);
}
2024-08-31
771
글번호 183029
종목검색