답변완료
종목검색식 요청드립니다.
120일이내 아래 신호가 발생된 모든 종목을 검색하는 검색식 요청드립니다.
항상감사드립니다.^^ (120일 기간은 제가 20일 또는 10일로 변경할 수 있게 부탁드립니다.)
A2=stochasticsslow(10,6);
A3=EAVG(A,6);
A4=stochasticsslow(5,3);
A5=EAVG(A,3);
B=ADX(11);
E= (highest(high,9)+lowest(low,9)+highest(high,26)+lowest(low,26))/4;
F= (highest(high,52)+lowest(low,52))/2;
((CROSSUP(C,E(25)) AND C>F(25)) OR
(CROSSUP(C,F(25)) AND C>E(25))) AND
(CROSSUP(A,A1) or CROSSUP(A2,A3) or CROSSUP(A4,A5))
AND B>B(1)
2024-03-14
754
글번호 177479
종목검색
답변완료
지표와 PaintBar 조건이 상이하게 나옵니다.
수고하십니다. 하기조건에서 지표와 페인트바 조건이 상이하게 나옵니다.
확인 요청드립니다.
######## PaintBar ##########
input : low_period(30),Stdev_period(50);
var : W(1);//1이면 가중이평, 0이면 단순이평
var : source(0),DM(0);
var : FZ1(0),FAVG1(0),FSTDEV1(0),FZ1Limit(0);
var : FZ2(0),FAVG2(0),FSTDEV2(0),FZ2Limit(0);
var : F_Con(False),FO(0),FC(0),tx(0),tx1(0),test(0);
source = (o+h+l+c)/4;
FZ1 = (lowest(source,low_period) - source)/lowest(source,low_period);
FAVG1 = iff(W==0,ma(FZ1,Stdev_period),wma(FZ1,Stdev_period));
FSTDEV1 = std(FZ1,Stdev_period);
FZ1Limit = FAVG1-FSTDEV1;
FZ2 = iff(W==0,ma(source, low_period),wma(source, low_period));
FAVG2 = iff(W==0,ma(FZ2,Stdev_period),wma(FZ2,Stdev_period));
FSTDEV2 = std(FZ2, Stdev_period);
FZ2Limit = FAVG2+FSTDEV2;
// Fearzone
F_Con = FZ1 < FZ1Limit and FZ2 > FZ2Limit;
if F_Con Then test = 1;
Else test = 0;
FO = iff(F_Con == true, low-TrueRange,Nan);
FC = iff(F_Con == true, low-2*TrueRange,Nan);
PlotPaintBar(FO,FC,"FearZone Candlesticks",Red);
tx1 = text_new(sDate,sTime,L,NumToStr(test,0));
Text_SetStyle(tx,2,0);
Text_SetColor(tx,Red);
if F_Con == true Then
{
tx = text_new(sDate,sTime,L,"●");
Text_SetStyle(tx,2,0);
Text_SetColor(tx,Red);
}
######## 지표 ##########
input : low_period(30),Stdev_period(50);
var : W(1);//1이면 가중이평, 0이면 단순이평
var : source(0),DM(0);
var : FZ1(0),FAVG1(0),FSTDEV1(0),FZ1Limit(0);
var : FZ2(0),FAVG2(0),FSTDEV2(0),FZ2Limit(0);
var : F_Con(False),FO(0),FC(0),tx(0),tx1(0),test(0);
source = (o+h+l+c)/4;
FZ1 = (lowest(source,low_period) - source)/lowest(source,low_period);
FAVG1 = iff(W==0,ma(FZ1,Stdev_period),wma(FZ1,Stdev_period));
FSTDEV1 = std(FZ1,Stdev_period);
FZ1Limit = FAVG1-FSTDEV1;
FZ2 = iff(W==0,ma(source, low_period),wma(source, low_period));
FAVG2 = iff(W==0,ma(FZ2,Stdev_period),wma(FZ2,Stdev_period));
FSTDEV2 = std(FZ2, Stdev_period);
FZ2Limit = FAVG2+FSTDEV2;
// Fearzone
F_Con = FZ1 < FZ1Limit and FZ2 > FZ2Limit;
FO = iff(F_Con == true, low-TrueRange,Nan);
FC = iff(F_Con == true, low-2*TrueRange,Nan);
F_Con = FZ1 < FZ1Limit and FZ2 > FZ2Limit;
if F_Con Then test = 1;
Else test = 0;
plot1(FZ1,"FZ1");
plot2(FZ1Limit,"FZ1Limit");
plot3(FZ2,"FZ2");
plot4(FZ2Limit,"FZ2Limit");
plot5(FO,"FO");
plot6(FC,"FC");
plot7(TrueRange,"TrueRange");
plot8(test,"test");
**********************************************************
test 값이 상이하게 나옵니다.
F_Con 값이 True 가 PaintBar 에서 간헐적인데 지표에서는 연속적으로 나옵니다.
수식으로는 연속이 맞는데 PaintBar 에서 상이한것 같습니다.
PaintBar 조건처럼 나오게 할수 있는 방법을 찾고 있습니다.
가능한지요?
2024-03-14
850
글번호 177478
지표
답변완료
안녕하세요 수식문의 부탁드립니다^^
안녕하세요 항상 친절한 답변에 감사드립니다
궁금한점이 있어서 문의드립니다
아래수식에서 줄위에 수식이 이전값보다 높을때 검색이라고 생각하고 수식을 작성하였는데요 직점 검색해보니 이전값보다 낮을때도 검색이 되더라구요
어떻게애햐 이전값보다 높게 나온는 종목만 검색할수 있을까요?
그리고 제일 아래 있는식을 전에 답변받았는데요 사용해보니 검색하면 남는 종목은 있는데 사라지는종목도 있어라구요 혹시 왜 그런건가요??
u = mav >= z;
if u == true Then
w = c;
w >= w[1]
=========================================================
input : preiod(20),preiod2(60),Period3(120);
var : a(0),b(0),x(0),y(0),z(0),q(0),mav(0),u(False),w(0);
a = ma(c,preiod);
b = highest(a,preiod2);
x = ma(c,preiod);
y = lowest(x,preiod2);
z = (b+y)/2;
q = (b+z)/2;
mav = ma(c,Period3);
u = mav >= z;
if u == true Then
w = c;
if w >= w[1] and mav >= z and c >= q Then
find(1);
=============================================================
안녕하세요
예스스탁입니다.
1
문의하신 내용이 분봉주기에서 검색하는 내용이면
아래와 같이 종목검색식 자체를 수정하시면 가능합니다.
예를 들어 종목검색은 아래구조로 작성이 됩니다.
var1 = ma(C,5);
Var2 = ma(C,20);
if CrossUp(var1,Var2) Then //조건
Find(1);
현재봉에서 조건이 충족한것을 찾게 되는데
당일 한번이라도 조건이 충족된 종목을 찾게
아래와 같은 내용으로 변경하시면
당일 1회라도 조건이 만족한 종목을 모두 검색할 수 있습니다.
if sDate != sDate[1] Then
Condition1 = False;
var1 = ma(C,5);
Var2 = ma(C,20);
if CrossUp(var1,Var2) Then //조건
Condition1 = true;
if Condition1 == true Then
Find(1);
2024-03-14
649
글번호 177466
종목검색