예스스탁
예스스탁 답변
2024-10-30 14:21:11
안녕하세요
예스스탁입니다.
input : Period(20), D1(1);
input : sto1(12),sto2(5),sto3(5);
input : cciP(14);
input : period1(12),multiplier1(3);
input : period2(11),multiplier2(2);
input : period3(10),multiplier3(1);
var : src(0);
var : AtrV1(0),upperBand1(0),lowerBand1(0), prevLowerBand1(0), prevUpperBand1(0);
var : prevSuperTrend1(0), superTrend1(C), direction1(0),alpha1(0),source1(0);
var : AtrV2(0),upperBand2(0),lowerBand2(0), prevLowerBand2(0), prevUpperBand2(0);
var : prevSuperTrend2(0), superTrend2(C), direction2(0),alpha2(0),source2(0);
var : AtrV3(0),upperBand3(0),lowerBand3(0), prevLowerBand3(0), prevUpperBand3(0);
var : prevSuperTrend3(0), superTrend3(C), direction3(0),alpha3(0),source3(0);
var :bov(0),k(0),d(0),cc(0);
Bov = ma(V,Period)+D1*std(V,Period);
k = StochasticsK(sto1,sto2);
d = StochasticsD(sto1,sto2,sto3);
cc = cci(ccip);
src = (H+L)/2;
if CurrentBar > 1 Then
{
alpha1 = 1 / period1;
source1 = max(high - low, abs(high - close[1]), abs(low - close[1]));
ATrV1 = alpha1 * source1 + (1 - alpha1) * ATrV1[1]; //지수가중이평방식
//ATrV = ma(source,AtrPeriod); //단순이평방식
upperBand1 = src + multiplier1 * AtrV1;
lowerBand1 = src - multiplier1 * AtrV1;
prevLowerBand1 = lowerBand1[1];
prevUpperBand1 = upperBand1[1];
if lowerBand1 > prevLowerBand1 or close[1] < prevLowerBand1 Then
lowerBand1 = lowerBand1;
Else
lowerBand1 = prevLowerBand1;
if upperBand1 < prevUpperBand1 or close[1] > prevUpperBand1 Then
upperBand1 = upperBand1;
Else
upperBand1 = prevUpperBand1;
if C > UpperBand1 Then
direction1 = 1;
if C < LowerBand1 Then
direction1 = -1;
if direction1 == 1 Then
supertrend1 = lowerband1;
Else
supertrend1 = upperband1;
alpha2 = 1 / period2;
source2 = max(high - low, abs(high - close[1]), abs(low - close[1]));
ATrV2 = alpha2 * source2 + (1 - alpha2) * ATrV2[1]; //지수가중이평방식
//ATrV = ma(source,AtrPeriod); //단순이평방식
upperBand2 = src + multiplier2 * AtrV2;
lowerBand2 = src - multiplier2 * AtrV2;
prevLowerBand2 = lowerBand2[1];
prevUpperBand2 = upperBand2[1];
if lowerBand2 > prevLowerBand2 or close[1] < prevLowerBand2 Then
lowerBand2 = lowerBand2;
Else
lowerBand2 = prevLowerBand2;
if upperBand2 < prevUpperBand2 or close[1] > prevUpperBand2 Then
upperBand2 = upperBand2;
Else
upperBand2 = prevUpperBand2;
if C > UpperBand2 Then
direction2 = 1;
if C < LowerBand2 Then
direction2 = -1;
if direction2 == 1 Then
supertrend2 = lowerband2;
Else
supertrend2 = upperband2;
alpha3 = 1 / period3;
source3 = max(high - low, abs(high - close[1]), abs(low - close[1]));
ATrV3 = alpha3 * source3 + (1 - alpha3) * ATrV3[1]; //지수가중이평방식
//ATrV = ma(source,AtrPeriod); //단순이평방식
upperBand3 = src + multiplier3 * AtrV3;
lowerBand3 = src - multiplier3 * AtrV3;
prevLowerBand3 = lowerBand3[1];
prevUpperBand3 = upperBand3[1];
if lowerBand3 > prevLowerBand3 or close[1] < prevLowerBand3 Then
lowerBand3 = lowerBand3;
Else
lowerBand3 = prevLowerBand3;
if upperBand3 < prevUpperBand3 or close[1] > prevUpperBand3 Then
upperBand3 = upperBand3;
Else
upperBand3 = prevUpperBand3;
if C > UpperBand3 Then
direction3 = 1;
if C < LowerBand3 Then
direction3 = -1;
if direction3 == 1 Then
supertrend3 = lowerband3;
Else
supertrend3 = upperband3;
}
Condition1 = direction1 == 1 and direction2 == 1 and direction3 == 1;
if Condition1 ==true and Condition1[1] == False Then
var1 = 0;
if c > Ema(c,200) and Ema(C,50) > Ema(c,200) and v > bov and k > d and
Condition1 == true and var1 == 0 and
CrossUp(cc,100) Then
{
var1 = 1;
find(1);
}
즐거운 하루되세요
> 하이모리 님이 쓴 글입니다.
> 제목 : 검색식 부탁드립니다. 감사합니다.
> Period(20), D1(1);
Bov = avg(V,Period)+D1*stdev(V,Period);
Super Trend1(12,3), Super Trend2(11,2), Super Trend3(10,1);
주가가 지수 200일선 위에 있고, 지수50선>지수200선, V>Bov, Stochasticsslow(12,5,5)의 K>D;
3개의 super trend 상단선이 전부 하단선으로 전환되며,
전환되는 순간부터 cci(14)값이 처음으로 100을 돌파하는 검색시 요청드립니다.
항상 감사드립니다.