예스스탁
예스스탁 답변
2024-09-02 10:57:53
안녕하세요
예스스탁입니다.
var : AA(0),대금(0),zA(0),zB(0),DD(0),양대금(0),zA1(0),B1(0),D1(0),음대금(0);
대금 = (H+O+L+C)/4*V/100000000;
zA=IfF(C>O,대금,0);
zB=Accum(zA);
zA1=IfF(C<O,대금,0);
B1=Accum(zA1);
if sDate != sDate[1] Then
{
DD = zB[1];
D1 = B1[1];
}
양대금=zB-DD;
음대금=B1-D1;
Condition1 = CROSSUP(양대금,음대금);
var : A(0),A1(0),A2(0),A3(0),A4(0),B(0);
A=OBV();
B=Ema(A, 9);
A1=accum(V*(Pow(C-L,2)-Pow(H-C, 2))/(H-L));
A2=ADX(11);
A3=100*Ema(C,10)/Ema(C[20],10);
A4=100*Ema(Ema(C,10)/Ema(C[20],10),9);
Condition2 = A3[1]<=100 && (Crossup(A3,A4) OR Crossup(A,B)) &&
A[1]<A && A1[1]<A1 && A2[1]<A2 && A3[1]<A3;
input : AtrPeriod(14),factor(3);
var : src(0), AtrV(0),upperBand(0),lowerBand(0), prevLowerBand(0), prevUpperBand(0);
var : prevSuperTrend(0), superTrend(C), direction(0),alpha(0),source(0);
if CurrentBar > 1 Then
{
src = (H+L)/2;
alpha = 1 / AtrPeriod ;
source = max(high - low, abs(high - close[1]), abs(low - close[1]));
ATrV = alpha * source + (1 - alpha) * ATrV[1]; //지수가중이평방식
//ATrV = ma(source,AtrPeriod); //단순이평방식
upperBand = src + factor * AtrV;
lowerBand = src - factor * AtrV;
prevLowerBand = lowerBand[1];
prevUpperBand = upperBand[1];
if lowerBand > prevLowerBand or close[1] < prevLowerBand Then
lowerBand = lowerBand;
Else
lowerBand = prevLowerBand;
if upperBand < prevUpperBand or close[1] > prevUpperBand Then
upperBand = upperBand;
Else
upperBand = prevUpperBand;
if C > UpperBand Then
direction = 1;
if C < LowerBand Then
direction = -1;
if direction == 1 Then
supertrend = lowerband;
Else
supertrend = upperband;
}
if Condition1 == true and Condition2 == true and CrossUp(c,supertrend) && C>O Then
Find(1);
즐거운 하루되세요
> 그냥저냥 님이 쓴 글입니다.
> 제목 : 수고 많으십니다. 1번과 2번 동시에 만족하는 검색기 부탁드립니다.
> 1
var : AA(0),대금(0),zA(0),zB(0),DD(0),양대금(0),zA1(0),B1(0),D1(0),음대금(0);
대금 = (H+O+L+C)/4*V/100000000;
zA=IfF(C>O,대금,0);
zB=Accum(zA);
zA1=IfF(C<O,대금,0);
B1=Accum(zA1);
if sDate != sDate[1] Then
{
DD = zB[1];
D1 = B1[1];
}
양대금=zB-DD;
음대금=B1-D1;
Condition1 = CROSSUP(양대금,음대금);
var : A(0),A1(0),A2(0),A3(0),A4(0),B(0);
A=OBV();
B=Ema(A, 9);
A1=accum(V*(Pow(C-L,2)-Pow(H-C, 2))/(H-L));
A2=ADX(11);
A3=100*Ema(C,10)/Ema(C[20],10);
A4=100*Ema(Ema(C,10)/Ema(C[20],10),9);
Condition2 = A3[1]<=100 && (Crossup(A3,A4) OR Crossup(A,B)) &&
A[1]<A && A1[1]<A1 && A2[1]<A2 && A3[1]<A3;
if Condition1 == true and Condition2 == true Then
Find(1);
==========================================================
2
input : AtrPeriod(14),factor(3);
var : src(0), AtrV(0),upperBand(0),lowerBand(0), prevLowerBand(0), prevUpperBand(0);
var : prevSuperTrend(0), superTrend(C), direction(0),alpha(0),source(0);
if CurrentBar > 1 Then
{
src = (H+L)/2;
alpha = 1 / AtrPeriod ;
source = max(high - low, abs(high - close[1]), abs(low - close[1]));
ATrV = alpha * source + (1 - alpha) * ATrV[1]; //지수가중이평방식
//ATrV = ma(source,AtrPeriod); //단순이평방식
upperBand = src + factor * AtrV;
lowerBand = src - factor * AtrV;
prevLowerBand = lowerBand[1];
prevUpperBand = upperBand[1];
if lowerBand > prevLowerBand or close[1] < prevLowerBand Then
lowerBand = lowerBand;
Else
lowerBand = prevLowerBand;
if upperBand < prevUpperBand or close[1] > prevUpperBand Then
upperBand = upperBand;
Else
upperBand = prevUpperBand;
if C > UpperBand Then
direction = 1;
if C < LowerBand Then
direction = -1;
if direction == 1 Then
supertrend = lowerband;
Else
supertrend = upperband;
if CrossUp(c,supertrend) && C>O Then
Find(1);
}