예스스탁
예스스탁 답변
2022-05-23 11:50:14
안녕하세요
예스스탁입니다.
해당지표가 차트의 과거 봉수에 따라 조건만족여부가 달라져 값이 다릅니다.
일정봉수 이상 되면 값이 같게 됩니다.
차트에 50봉,100봉등 조회상태에서 지표의 마지막봉 값을 확인하시기 바랍니다.
종목검색은 속성에서 검색에 필요한 최소기간에 봉수를 설정하지 않으면
최소봉으로 계산해 검색을 하게 됩니다.
종목검색은 최대 500봉까지 제공됩니다.
종목검색 속성에서 검색에 필요한 최소시간에 500봉 지정하시고
차트도 500봉 조회해서 비교해 보시기 바랍니다.
1-1. 현재가 C 가 ht 선을 돌파하는 종목을 검색
1-2. 현재가 C 가 ht 선위에 있는 종목을 검색
2-1. 현재가 C 가 25개봉 이전 ht[25] 선을 돌파하는 종목을 검색
2-2. 현재가 C 가 25개봉 이전 ht[25] 선위에 있는 종목을 검색
올리신 내용에 약세 강세를 판단할 내용은 없습니다.
해당선이 빨간색일 때를 조건으로 추가하고자 하시면
아래식의 종목검색조건을 지정하는 if문에 trend == 0을 지정하시면 됩니다.
1
input : amplitude(20);
var : trend(0),nextTrend(0),maxLowPrice(0),minHighPrice(0);
var : up(0),down(0);
var : highPrice(0),lowPrice(0),highma(0),lowma(0),ht(0);
highPrice = Highest(H,amplitude);
lowPrice = Lowest(L,amplitude);
highma = ma(high, amplitude);
lowma = ma(low, amplitude);
if nextTrend == 1 Then
{
maxLowPrice = max(lowPrice, maxLowPrice);
if highma < maxLowPrice and close < iff(isnan(low[1])==true,low,Low[1]) Then
{
trend = 1;
nextTrend = 0;
minHighPrice = highPrice;
}
}
else
{
minHighPrice = min(highPrice, minHighPrice);
if lowma > minHighPrice and close > iff(isnan(high[1])==true,high,high[1]) Then
{
trend = 0;
nextTrend = 1;
maxLowPrice = lowPrice;
}
}
if trend == 0 Then
{
if IsNaN(trend[1]) == False and trend[1] != 0 Then
{
up = iff(IsNaN(down[1]) == true,down,down[1]);
}
else
{
up = iff(IsNan(up[1]) == true, maxLowPrice , max(maxLowPrice, up[1]));
}
}
else
{
if isnan(trend[1]) == False and trend[1] != 1 Then
{
down = iff(IsNan(up[1]) == true, up , up[1]);
}
else
{
down = iff(IsNan(down[1]) == true, minHighPrice ,min(minHighPrice, down[1]));
}
}
ht = iff(trend == 0 , up , down);
if CrossUp(c,ht) Then
Find(1);
2
input : amplitude(20);
var : trend(0),nextTrend(0),maxLowPrice(0),minHighPrice(0);
var : up(0),down(0);
var : highPrice(0),lowPrice(0),highma(0),lowma(0),ht(0);
highPrice = Highest(H,amplitude);
lowPrice = Lowest(L,amplitude);
highma = ma(high, amplitude);
lowma = ma(low, amplitude);
if nextTrend == 1 Then
{
maxLowPrice = max(lowPrice, maxLowPrice);
if highma < maxLowPrice and close < iff(isnan(low[1])==true,low,Low[1]) Then
{
trend = 1;
nextTrend = 0;
minHighPrice = highPrice;
}
}
else
{
minHighPrice = min(highPrice, minHighPrice);
if lowma > minHighPrice and close > iff(isnan(high[1])==true,high,high[1]) Then
{
trend = 0;
nextTrend = 1;
maxLowPrice = lowPrice;
}
}
if trend == 0 Then
{
if IsNaN(trend[1]) == False and trend[1] != 0 Then
{
up = iff(IsNaN(down[1]) == true,down,down[1]);
}
else
{
up = iff(IsNan(up[1]) == true, maxLowPrice , max(maxLowPrice, up[1]));
}
}
else
{
if isnan(trend[1]) == False and trend[1] != 1 Then
{
down = iff(IsNan(up[1]) == true, up , up[1]);
}
else
{
down = iff(IsNan(down[1]) == true, minHighPrice ,min(minHighPrice, down[1]));
}
}
ht = iff(trend == 0 , up , down);
if c > ht Then
Find(1);
3
input : amplitude(20);
var : trend(0),nextTrend(0),maxLowPrice(0),minHighPrice(0);
var : up(0),down(0);
var : highPrice(0),lowPrice(0),highma(0),lowma(0),ht(0);
highPrice = Highest(H,amplitude);
lowPrice = Lowest(L,amplitude);
highma = ma(high, amplitude);
lowma = ma(low, amplitude);
if nextTrend == 1 Then
{
maxLowPrice = max(lowPrice, maxLowPrice);
if highma < maxLowPrice and close < iff(isnan(low[1])==true,low,Low[1]) Then
{
trend = 1;
nextTrend = 0;
minHighPrice = highPrice;
}
}
else
{
minHighPrice = min(highPrice, minHighPrice);
if lowma > minHighPrice and close > iff(isnan(high[1])==true,high,high[1]) Then
{
trend = 0;
nextTrend = 1;
maxLowPrice = lowPrice;
}
}
if trend == 0 Then
{
if IsNaN(trend[1]) == False and trend[1] != 0 Then
{
up = iff(IsNaN(down[1]) == true,down,down[1]);
}
else
{
up = iff(IsNan(up[1]) == true, maxLowPrice , max(maxLowPrice, up[1]));
}
}
else
{
if isnan(trend[1]) == False and trend[1] != 1 Then
{
down = iff(IsNan(up[1]) == true, up , up[1]);
}
else
{
down = iff(IsNan(down[1]) == true, minHighPrice ,min(minHighPrice, down[1]));
}
}
ht = iff(trend == 0 , up , down);
if crossup(c,ht[25]) Then
Find(1);
4
input : amplitude(20);
var : trend(0),nextTrend(0),maxLowPrice(0),minHighPrice(0);
var : up(0),down(0);
var : highPrice(0),lowPrice(0),highma(0),lowma(0),ht(0);
highPrice = Highest(H,amplitude);
lowPrice = Lowest(L,amplitude);
highma = ma(high, amplitude);
lowma = ma(low, amplitude);
if nextTrend == 1 Then
{
maxLowPrice = max(lowPrice, maxLowPrice);
if highma < maxLowPrice and close < iff(isnan(low[1])==true,low,Low[1]) Then
{
trend = 1;
nextTrend = 0;
minHighPrice = highPrice;
}
}
else
{
minHighPrice = min(highPrice, minHighPrice);
if lowma > minHighPrice and close > iff(isnan(high[1])==true,high,high[1]) Then
{
trend = 0;
nextTrend = 1;
maxLowPrice = lowPrice;
}
}
if trend == 0 Then
{
if IsNaN(trend[1]) == False and trend[1] != 0 Then
{
up = iff(IsNaN(down[1]) == true,down,down[1]);
}
else
{
up = iff(IsNan(up[1]) == true, maxLowPrice , max(maxLowPrice, up[1]));
}
}
else
{
if isnan(trend[1]) == False and trend[1] != 1 Then
{
down = iff(IsNan(up[1]) == true, up , up[1]);
}
else
{
down = iff(IsNan(down[1]) == true, minHighPrice ,min(minHighPrice, down[1]));
}
}
ht = iff(trend == 0 , up , down);
if c > ht[25] Then
Find(1);
즐거운 하루되세요