예스스탁
예스스탁 답변
2025-03-04 15:58:52
안녕하세요
예스스탁입니다.
input : length(100);
input : multi(4);
input : show_x(false);
input : filter_sig(false);
input : color1(Green);
input : color3(Red);
input : color2(Black);
input : gradient(true);
input : transp(80);
var : value(nan);
var : value_upper(nan);
var : value_lower(nan);
var : value_upper_mid(nan);
var : value_lower_mid(nan);
var : trend(False);
var : count(0);
var : alpha(0),sum(0), A(0);
alpha = 1/200;
sum = iff(IsNaN(sum[1]) == true , ma(TrueRange, length) , alpha * TrueRange + (1 - alpha) * IFf(IsNaN(sum[1])==true,0,sum[1]));
A = ma(sum, 100) * multi;
// Initialize channel values
if index == 301 Then
{
value = (h+l)/2;
value_upper = (h+l)/2 + A;
value_lower = (h+l)/2 - A;
value_upper_mid = avg(value, value_upper);
value_lower_mid = avg(value, value_lower);
}
var : cross_upper(False),cross_lower(False);
cross_upper = CrossUp(low, value_upper);
cross_lower = CrossDown(high, value_lower);
if low > value_upper or high < value_lower Then
count = count + 1;
if cross_upper or cross_lower or count == 100 Then
{
count = 0;
value = (h+l)/2;
value_upper = (h+l)/2 + A;
value_lower = (h+l)/2 - A;
value_upper_mid = avg(value, value_upper);
value_lower_mid = avg(value, value_lower);
}
var : chage(False),buy_(false),sell_(False),fakeout_up(False),fakeout_dn(False);
chage = !(value != value[1]);
buy_ = CrossUp(low, value_lower_mid) and low[10] > value_lower_mid and chage;
sell_ = CrossDown(high, value_upper_mid) and high[10] < value_upper_mid and chage;
fakeout_up = CrossDown(high, value_upper) and chage;
fakeout_dn = crossup(low, value_lower) and chage;
if value_upper != value_upper[1] Then
NoPlot(1);
Else
Plot1(value_upper,"value_upper",color1);
if value_upper != value_upper[1] Then
NoPlot(2);
Else
plot2(value,"value_mid");
if value_lower != value_lower[1] Then
NoPlot(3);
Else
plot3(value_lower,"value_lower",color3);
var : upper_mid(0),lower_mid(0);
upper_mid = avg(value_upper, value);
lower_mid = avg(value_lower, value);
if upper_mid != upper_mid[1] Then
NoPlot(4);
Else
plot4(upper_mid,"upper_mid",color1);
input : N(9),MM(14);
var1 = iff((ma(iff(c<c[n],(c[n]-c),0),mm))<=0,100,
(100-(100/(1+((ma(iff(c>c[n],(c-c[n]),0),mm))/
(ma(iff(c<c[n],(c[n]-c),0),mm)))))));
Input : Period(9);
var : Relative(0);
Relative = RSI(Period);
if CrossUp(Relative,var1) Then
Find(1);
즐거운 하루되세요
> 신의천기사 님이 쓴 글입니다.
> 제목 : 수식 변환 좀 부탁드립니다
> 안녕하세요 종목검색식 작성 부탁드립니다
A
input : N(9),MM(14);
var1 = iff((ma(iff(c<c[n],(c[n]-c),0),mm))<=0,100,
(100-(100/(1+((ma(iff(c>c[n],(c-c[n]),0),mm))/
(ma(iff(c<c[n],(c[n]-c),0),mm)))))));
plot1(var1);
B
Input : Period(9);
var : Relative(0);
Relative = RSI(Period);
Plot1(Relative, "RSI");
PlotBaseLine1(30, "기준선 30");
PlotBaseLine2(70, "기준선 70");
B가 A를 골든크로스시 검색식 부탁드립니다