답변완료
부틱드립니다
수고하십니다
아래수식은 RSI 다이버전스 수식같으데요 분봉에적응해보면 그림처럼 2번타원형에 선이 나타나는데
1번타원형에는 선이나타나지않는이유? 수식변경과 주석좀 달아주시면 감사히겠습니다
INPUT : RsiPeriod(13),PLPeriod(2),TSLPeriod(7), BandPeriod(34), 표준편차(1.6185);
var :RSIV(0), RSIPL(0), TSL(0), MidBand(0), UpBand(0),DnBand(0) ;
var : TL1(0), TL2(0), TLi1(0), TLi2(0), TX1(0), TX2(0), TX3(0), TX4(0), TX5(0), TX6(0);
var : TXi1(0),TXi2(0),TXi3(0),TXi4(0);
RSIV = RSI(RSIPeriod);
RSIPL = ma(RSIV,PLPeriod);
TSL = ma(RSIV,TSLPeriod);
MidBand = ma(RSIV,BandPeriod);
UpBand = MidBand + (표준편차 * std(RSIV, BandPeriod));
DnBand = MidBand - (표준편차 * std(RSIV, BandPeriod));
#
if RSIPL > RSIPL[1] and RSIPL[1] < RSIPL[2] and RSIPL < 50 then
{
var1 = RSIPL[1];
var2 = var1[1];
var3 = L[1];
var4 = var3[1];
var5 = sdate[1];
var6 = var5[1];
var7 = stime[1];
var8 = var7[1];
if var1 > var2 and var3 < var4 then
var9 = 1;
}
else
var9 = 0;
if var9 == 1 then
{
TL1 = TL_New(var6,var8,var4,var5,var7,var3);
TL_SetSize(TL1, 5);
TL_SetColor(TL1, Black);
TLi1= TL_New_self(var6,var8,var2,var5,var7,var1);
TL_SetSize(TLi1, 5);
TL_SetColor(TLi1, Red);
TX1 = Text_new(var5, var7, L, "★");
Text_SetColor(Tx1,DarkRed);
Text_SetStyle(Tx1,0,0);
TXi1 = Text_New_Self(var5, var7, var1, "★");
Text_SetColor(Txi1,DarkRed);
Text_SetStyle(Txi1,0,0);
}
if CrossUp(RSIPL, DnBand) then
{
TX3 = Text_new(sdate, stime, L, "▲");
Text_SetColor(Tx3,DarkRed);
Text_SetStyle(Tx3,2,0);
TXi3 = Text_New_Self(sdate, stime, RSIPL, "▲");
Text_SetColor(Txi3,DarkRed);
Text_SetStyle(Txi3,2,0);
}
if RSIPL < RSIPL[1] and RSIPL[1] > RSIPL[2] and RSIPL > 50 then
{
var11 = RSIPL[1];
var12 = var11[1];
var13 = H[1];
var14 = var13[1];
var15 = sdate[1];
var16 = var15[1];
var17 = stime[1];
var18 = var17[1];
if var11 < var12 and var13 > var14 then
var19 = 1;
}
else
var19 = 0;
if var19 == 1 then
{
TL2 = TL_New(var16,var18,var14,var15,var17,var13);
TL_SetSize(TL2, 5);
TL_SetColor(TL2, blue);
TLi2= TL_New_self(var16,var18,var12,var15,var17,var11);
TL_SetSize(TLi2, 3);
TL_SetColor(TLi2, blue);
TX2 = Text_new(var15, var17, H, "★");
Text_SetColor(Tx2,Black);
Text_SetStyle(Tx2,0,1);
TXi2 = Text_New_Self(var15, var17, var11, "★");
Text_SetColor(Txi2,Black);
Text_SetStyle(Txi2,0,1);
}
if CrossDown(RSIPL, UpBand) then
{
TX4 = Text_new(sdate, stime, H, "▼");
Text_SetColor(Tx4,Rgb(0,255,0));
Text_SetStyle(Tx4,2,1);
TXi4 = Text_New_Self(sdate, stime, RSIPL, "▼");
Text_SetColor(Txi4,Rgb(0,255,0));
Text_SetStyle(Txi4,2,1);
}
#
plot1(RSIPL, "RSIPL",Lgreen,def,2);
plot2(TSL,"TSL",DarkRed,def,1);
plot3(MidBand,"MidBand",Yellow,def,1);
plot4(UpBand,"UpBand",White,def,0);
plot5(DnBand,"DnBand",White,def,0);
if CrossUp(RSIPL,DnBand) then
plot6(RSIPL, "상향돌파시점");
if CrossDown(RSIPL, UpBand) then
plot7(RSIPL, "하향이탈시점");
if var9 == 1 then
plot8(RSIPL, "상승다이버전스");
if var19 == 1 then
plot9(RSIPL, "하락다이저번스");
2023-11-01
1124
글번호 173606
지표
답변완료
하이킨아시 전환
input : MaPeriod(2),MaPeriod2(1);
var : maOpen(0),maClose(0),maLow(0),maHigh(0);
var : haOpen(0),haClose(0),haLow(0),haHigh(0);
var : ExtMapBuffer1(0),ExtMapBuffer2(0),ExtMapBuffer3(0),ExtMapBuffer4(0);
var : ExtMapBuffer5(0),ExtMapBuffer6(0),ExtMapBuffer7(0),ExtMapBuffer8(0);
var : r(0),g(0),b(0), TL(0);
if Index == 0 Then
{
maOpen=Open;
maClose=Close;
maLow=Low;
maHigh=High;
}
Else
{
maOpen=(maOpen[1]*(MAperiod-1)+Open)/MAPeriod;
maClose=(maClose[1]*(MAperiod-1)+Close)/MAPeriod;
maLow=(maLow[1]*(MAperiod-1)+Low)/MAPeriod;
maHigh=(maHigh[1]*(MAperiod-1)+High)/MAPeriod;
haOpen=(ExtMapBuffer5[1]+ExtMapBuffer6[1])/2;
haClose=(maOpen+maHigh+maLow+maClose)/4;
haHigh=Max(maHigh, Max(haOpen, haClose));
haLow=Min(maLow, Min(haOpen, haClose));
if (haOpen<haClose) then
{
r=255;
g=10;
b=0;
ExtMapBuffer7=haLow;
ExtMapBuffer8=haHigh;
}
else
{
r=0;
g=191;
b=255;
ExtMapBuffer7=haHigh;
ExtMapBuffer8=haLow;
}
ExtMapBuffer5=haOpen;
ExtMapBuffer6=haClose;
ExtMapBuffer1=WMA(ExtMapBuffer7,MAperiod2);
ExtMapBuffer2=WMA(ExtMapBuffer8,MAperiod2);
ExtMapBuffer3=WMA(ExtMapBuffer5,MAperiod2);
ExtMapBuffer4=WMA(ExtMapBuffer6,MAperiod2);
}
PlotPaintBar(ExtMapBuffer2,ExtMapBuffer1,ExtMapBuffer3,ExtMapBuffer4,"강조",Rgb(r,g,b));
양전환되면 봉 하단에 네모, 음전환되면 봉 상단에 네모 표시, 추가 부탁드립니다.
2023-11-01
976
글번호 173589
지표