답변완료
지표 + 종목검색식 부탁드립니당^^
키움수식
##지표1##
강세:A=PVI(c)+NVI(c);
B=AVG(PVI(c),PERIOD)+AVG(NVI(c),PERIOD);
crossup(A,B)
약세:A=PVI(c)+NVI(c);
B=AVG(PVI(c),PERIOD)+AVG(NVI(c),PERIOD);
crossdown(A,B)
period: 25
###지표2###
=PVI(c)+NVI(c);
B=AVG(PVI(c),PERIOD)+AVG(NVI(c),PERIOD);
MIN(A,B)
period: 25
###조건검색###
A=PVI(c)+NVI(c);
B=AVG(PVI(c),PERIOD)+AVG(NVI(c),PERIOD);
crossup(A,B)
period:25
해당종목을 검색 해 주세요
감사합니당^^
2022-10-31
990
글번호 163399
검색
답변완료
수식 부탁드립니다
수고 하십니다.
아래 지표식을 시스템식으로 바꿔주세요,,,
감사합니다.
########
input : start(0.02),increment(0.02),maximum(0.2);
var : haopen(0),haclose(0),hahigh(0),halow(0),hacolor(0);
var : af(0),trend_dir(0),ep(0),trend_bars(0),psar(0);
var : sar_long_to_short(False),sar_short_to_long(False),trend_change(False);
if index == 0 then
{
haOpen = open;
haClose = (O+H+L+C)/4;
haHigh = MaxList( high, haOpen, haClose);
haLow = MinList( low, haOpen,haClose);
}
else
{
haClose = (O+H+L+C)/4;
haOpen = (haOpen [1] + haClose [1])/2 ;
haHigh = MaxList(High, haOpen, haClose) ;
haLow = MinList(Low, haOpen, haClose) ;
}
hacolor = iff(haclose > haopen , green ,red);
psar = 0.0; // PSAR
af = 0.0; // Acceleration Factor
trend_dir = 0; // Current direction of PSAR
ep = 0.0; // Extreme point
trend_bars = 0;
sar_long_to_short = trend_dir[1] == 1 and haclose <= psar[1]; // PSAR switches from long to short
sar_short_to_long = trend_dir[1] == -1 and haclose >= psar[1]; // PSAR switches from short to long
trend_change = IsNaN(psar[2]) == true or sar_long_to_short or sar_short_to_long;
// Calculate trend direction
trend_dir = iff(IsNaN(psar[2]) == true and haclose[1] > haopen[1] , 1 ,
IFf(IsNaN(psar[2]) == true and haclose[1] <= haopen[1] , -1 ,
iff(sar_long_to_short , -1 ,
iff(sar_short_to_long , 1 , trend_dir[1]))));
trend_bars = iff(sar_long_to_short , -1 ,
iff(sar_short_to_long , 1 ,
iff(trend_dir == 1 , trend_bars[1] + 1 ,
iff(trend_dir == -1 , trend_bars[1] - 1 ,trend_bars[1]))));
// Calculate Acceleration Factor
af = iff(trend_change , start ,
iff((trend_dir == 1 and hahigh > ep[1]) or (trend_dir == -1 and low < ep[1]) , min(maximum, af[1] + increment),af[1]));
// Calculate extreme point
ep = iff(trend_change and trend_dir == 1 , hahigh ,
iff(trend_change and trend_dir == -1 , halow ,
iff(trend_dir == 1 , max(ep[1], hahigh) ,min(ep[1], halow))));
// Calculate PSAR
psar = iff(IsNaN(psar[2]) == true and haclose[1] > haopen[1] , halow[1] ,
iff(IsNan(psar[2]) == true and haclose[1] <= haopen[1] , hahigh[1] ,
iff(trend_change , ep[1] ,
IFf(trend_dir == 1 , psar[1] + af * (ep - psar[1]) , psar[1] - af * (psar[1] - ep) ))));
plot1(psar,"pSar",iff(trend_dir == 1 ,Red,v));
2022-10-31
832
글번호 163398
시스템