예스스탁
예스스탁 답변
2024-09-11 10:58:42
안녕하세요
예스스탁입니다.
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;
}
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);
Condition1 = CrossUp(c,supertrend) && C>O;
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);
즐거운 하루되세요
> 그냥저냥 님이 쓴 글입니다.
> 제목 : 수고하십니다. 1과 2 동시에 만족하는 종목검색식 부탁드립니다. 감사합니다~~
> 1
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);
}
--------------------------------------------------------------------
2
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);
if A3[1]<=100 && (Crossup(A3,A4) OR Crossup(A,B)) &&
A[1]<A && A1[1]<A1 && A2[1]<A2 && A3[1]<A3 Then
Find(1);