답변완료
문의드립니다^^
아래 키움 수식 변환 부탁드립니다^^
1)
a=c;
b=(highest(high,midPeriod)+lowest(low,midPeriod))/2;
valuewhen(1,crossup(a,b),c)
지표조건
midperiod 26
2)
a=crossup(sar(af,maxAf),c) or crossdown(sar(af,maxAf),c);
valuewhen(1,a,avg(c,5))
지표조건
af 0.18
maxaf 0.2
2023-05-04
1302
글번호 168729
지표
답변완료
지표수식 변환 요청드립니다
수고하십니다.
아래지표식에서 타주기분지표가 종가완성봉기준으로 출력되도록 부탁드립니다.
그림참조
그림위=현 아래수식이용 예스챠트 출력화면(지표가 출렁거림),
그림아래=트레이딩뷰 동일지표 출력화면
//==============
input : 분(5),useClose1(true),length(1),mult(1);
var : ATrv(0),longStop(0),longStopprev(0),shortStop(0),shortStopPrev(0);
var : dir(1),dir1(0) ;
var : truehighv(0),TrueLowv(0),hsatr(0) ;
var : xClose(0),xOpen(0),xHigh(0),xLow(0);
var : xClose1(0),xOpen1(0),xHigh1(0),xLow1(0);
var : S1(0),D1(0),TM(0),TF(0),cnt(0),ii(0);
var : sum(0),longStop1(0),shortStop1(0),hv(0),lv(0);
var : longcolor(Crimson),shortcolor(Blue),tx(0);
Array : TrueRangev[100](0),AccumValue[100](0);
Array : oo[100](0),hh[100](0),ll[100](0),cc[100](0),hsc[100](0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
///
TF = TM%분;
///30분
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and 분 > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and 분 > 1 and TM >= TM[1]+분) or
(Bdate == Bdate[1] and 분 == 1 and TM > TM[1]) Then
{
ii = ii +1;
For cnt = 99 DownTo 1
{
TrueRangev[cnt] = TrueRangev[cnt-1];
oo[cnt] = oo[cnt-1];
hh[cnt] = hh[cnt-1];
ll[cnt] = ll[cnt-1];
cc[cnt] = cc[cnt-1];
hsc[cnt] = hsc[cnt-1];
AccumValue[cnt] = AccumValue[cnt-1];
}
AccumValue[0] = AccumValue[0]+1;
oo[0] = o;
hh[0] = h;
ll[0] = l;
Xopen1 = xopen[1];
Xhigh1 = xhigh[1];
Xlow1 = xlow[1];
Xclose1 = xclose[1];
longStop1 = longStop[1];
ShortStop1 = shortStop[1];
dir1 = dir[1];
}
if hh[0] > 0 and h > hh[0] Then
hh[0] = h;
if ll[0] > 0 and l < ll[0] Then
ll[0] = l;
cc[0] = c;
if ii == 1 then
{
xOpen = oo[0];
xClose = (oo[0]+hh[0]+ll[0]+cc[0])/4;
xHigh = MaxList(hh[0], xOpen, xClose);
xLow = MinList(ll[0], xOpen,xClose);
}
else
{
xClose = (oo[0]+hh[0]+ll[0]+cc[0])/4;
xOpen = (xOpen1 + xClose1)/2 ;
xHigh = MaxList(hh[0], xOpen, xClose) ;
xLow = MinList(ll[0], xOpen, xClose) ;
}
hsc[0] = xclose ;
if ii > 1 Then
{
If xClose1 > xHigh then
TrueHighv = xClose1;
else
TrueHighv = xHigh;
If xClose1 < xLow then
TrueLowv = xClose1;
else
TrueLowv = xLow;
TrueRangev[0] = TrueHighv - TrueLowv;
}
if ii > 2 Then
{
if TrueRangev[length-1] > 0 Then
{
sum = 0;
For cnt = 0 to length-1
{
sum = sum + TrueRangev[cnt];
}
hsatr = sum/length;
}
atrv = mult * hsatr;
hv = 0;
lv = 0;
For cnt = 0 to length-1
{
if useClose1 == true Then
{
if hv == 0 or (hv > 0 and hsc[cnt] > hv) Then
hv = hsc[cnt];
if lv == 0 or (lv > 0 and hsc[cnt] < lv) Then
lv = hsc[cnt];
}
Else
{
if hv == 0 or (hv > 0 and hh[cnt] > hv) Then
hv = hh[cnt];
if lv == 0 or (lv > 0 and ll[cnt] < lv) Then
lv = ll[cnt];
}
}
longStop = hv - atrv;
longStopPrev = longStop1;
longStop = iff(hsc[1] > longStopPrev , max(longStop, longStopPrev) , longStop);
shortStop = lv + atrv;
shortStopPrev = shortStop1;
shortStop = iff(hsc[1] < shortStopPrev , min(shortStop, shortStopPrev) , shortStop);
dir = iff(hsc[0] > shortStopPrev , 1 ,iff(hsc[0] < longStopPrev , -1 , dir1));
}
}
IF dir == 1 Then
{
plot1(longStop,"Long Stop",longColor);
NoPlot(2);
}
Else
{
NoPlot(1);
plot2(shortStop,"Short Stop",shortColor);
}
//======================
2023-05-04
1994
글번호 168718
지표
답변완료
문의드립니다.
항상 노고에 감사드립니다.
다름이 아니오라 60분차트에
1. 일봉볼린져(20,2) 상단, 중단, 하단
2. 주봉볼린져(20,2) 상단, 중단, 하단
3. 월봉볼린져(20,2) 상단, 중단, 하단
60분봉 차트에 위의 9가지 선들이 나오게 해주실수 있는지요?
항상 어려운부탁만 드려서 죄송합니다.
2023-05-04
1205
글번호 168705
지표