답변완료
수고하십니다
항상 좋은 일만 있으시기 바랍니다
아래 수식에 연결파동이 중간에 맞지 않는
부분(양의파동인데 음의 파동으로 나옵니다)이
나오기에 재점검을 요청 합니다
======================================================
var : t(0),tl(0),tl1(0),tl2(0),tx1(0),tx2(0),color(0);
var : hh(0),hd(0),ht(0),hh1(0),tl11(0);
var : ll(0),ld(0),lt(0),ll1(0),tl22(0);
var1 = SAR(0.02,0.2);
//Plot1(var1,"파라볼릭",IFf(C>var1,Red,Blue));
if CrossUp(C,var1) Then
{
T = 1;
hh = var1;
hh1 = hh[1];
hd = sDate;
ht = sTime;
if ll > 0 Then
{
tl = TL_New(ld,lt,ll,hd,ht,hh);
// tl1 = TL_New(hd,ht,hh,NextBarSdate,NextBarStime,hh);
//tx1 = Text_New(sDate,sTime,hh,NumToStr(hh,2)+NewLine+"+"+NumToStr(abs(hh-ll)/PriceScale,0));
Text_SetStyle(tx1,2,1);
if hh1 == 0 or (hh1 > 0 and hh < hh1) Then
color = Blue;
}
}
else if CrossDown(C,var1) Then
{
T = -1;
ll = var1;
ll1 = ll[1];
ld = sDate;
lt = sTime;
if hh > 0 Then
{
tl = TL_New(hd,ht,hh,ld,lt,ll);
// tl2 = TL_New(ld,lt,ll,NextBarSdate,NextBarStime,ll);
//tx2 = Text_New(sDate,sTime,ll,NumToStr(ll,2)+NewLine+"-"+NumToStr(abs(hh-ll)/PriceScale,0));
Text_SetStyle(tx2,2,0);
if ll1 == 0 or (ll1 > 0 and ll > ll1) Then
color = Red;
}
}
Else
{
if t == 1 then
{
TL_SetEnd(tl,hd,ht,hh);
TL_SetBegin(tl1,hd,ht,hh);
TL_SetEnd(tl11,Sdate[1],Stime[1],hh1);
//Text_SetString(tx1,NumToStr(hh,2)+NewLine+"+"+NumToStr(abs(hh-ll)/PriceScale,0));
Text_SetLocation(tx1,sDate,sTime,hh);
if (hh1 > 0 and hh > hh1) Then
color = Red;
}
if t == -1 then
{
TL_SetEnd(tl,ld,lt,ll);
TL_SetBegin(tl2,ld,lt,ll);
TL_SetEnd(tl22,Sdate[1],Stime[1],ll1);
//Text_SetString(tx2,NumToStr(ll,2)+NewLine+"-"+NumToStr(abs(hh-ll)/PriceScale,0));
Text_SetLocation(tx2,sDate,sTime,ll);
if (ll1 > 0 and ll < ll1) Then
color = Blue;
}
}
TL_SetEnd(tl1,NextBarSdate,NextBarStime,hh);
TL_SetEnd(tl2,NextBarSdate,NextBarStime,ll);
TL_SetColor(tl,color);
2022-04-28
1291
글번호 158441
지표