예스스탁
예스스탁 답변
2025-10-10 11:24:08.0
안녕하세요
예스스탁입니다.
1
예스랭귀지에는 not CrossNow[d + 1]와 같이
조건문 앞에 not을 붙여 부정하는 문법이 없습니다.
Inputs:
N(14), MA_Period(20),
AstroBias(0.75), SpiritFlow(0.6),
Smooth(3), Eps(1e-6),
BuyThr(70), K(5); // 최근 K일 윈도우 (정수)
Vars:
Var_OBV(0), Var_MA(0), Var_RSI(0), AstroFlow(0), SpiritBoost(0),
Combo(0), ComboSm(0),
obvMin(0), obvMax(0), maSeries(0), maMin(0), maMax(0),
CrossNow(false), // ← 여기 담아서 뒤에 [d] 인덱싱
hit(false), d(0),not(0);
//{ --- 시계열 준비 --- }
maSeries = MA(Close, MA_Period);
obvMin = Lowest(OBV, N);
obvMax = Highest(OBV, N);
Var_OBV = 100 * (OBV - obvMin) / MaxList(Eps, obvMax - obvMin);
maMin = Lowest(maSeries, N);
maMax = Highest(maSeries, N);
Var_MA = 100 * (maSeries - maMin) / MaxList(Eps, maMax - maMin);
Var_RSI = RSI(N);
AstroFlow = (Var_RSI / 100) * AstroBias;
SpiritBoost = (Var_OBV / 100) * SpiritFlow;
Combo = (Var_OBV + Var_MA + Var_RSI) / 3 + AstroFlow + SpiritBoost;
ComboSm = MA(Combo, Smooth);
//{ --- 최근 K일 내 "최초" 상향 돌파 탐지 --- }
CrossNow = CrossUp(ComboSm, BuyThr); // 함수결과 → 변수로 보관
hit = false;
For d = 0 to K - 1 begin
// d번째 봉에서 상향돌파가 발생했고, (d+1)번째 봉(그 전 봉)에는 없었으면 "최초"
If CrossNow[d] and CrossNow[d + 1] == False then begin
hit = true;
end;
end;
//{ --- 기본 필터 (예: 종가가 MA 위) --- }
If hit and (Close > maSeries) then
Find(1);
2
input : P1(5),P2(20);
var : tx(0);
Var1 = ma(C,P1);
Var2 = ma(C,P2);
Plot1(Var1,"이평1");
Plot2(Var2,"이평2");
if CrossUp(Var1,Var2) Then
{
tx = Text_New(sDate,sTime,L,NumToStr(C,2));
Text_SetStyle(tx,2,0);
Text_SetColor(tx,Red);
}
즐거운 하루되세요
> 처음처럼22 님이 쓴 글입니다.
> 제목 : 문의드립니다
> 1,문법에러라고 뜨는데 어떻게 수정해야할지모르겠습니다 수정부탁드립니다
그리고 설명부탁드립니다
Inputs:
N(14), MA_Period(20),
AstroBias(0.75), SpiritFlow(0.6),
Smooth(3), Eps(1e-6),
BuyThr(70), K(5); // 최근 K일 윈도우 (정수)
Vars:
Var_OBV(0), Var_MA(0), Var_RSI(0), AstroFlow(0), SpiritBoost(0),
Combo(0), ComboSm(0),
obvMin(0), obvMax(0), maSeries(0), maMin(0), maMax(0),
CrossNow(false), // ← 여기 담아서 뒤에 [d] 인덱싱
hit(false), d(0),not(0);
//{ --- 시계열 준비 --- }
maSeries = MA(Close, MA_Period);
obvMin = Lowest(OBV, N);
obvMax = Highest(OBV, N);
Var_OBV = 100 * (OBV - obvMin) / MaxList(Eps, obvMax - obvMin);
maMin = Lowest(maSeries, N);
maMax = Highest(maSeries, N);
Var_MA = 100 * (maSeries - maMin) / MaxList(Eps, maMax - maMin);
Var_RSI = RSI(N);
AstroFlow = (Var_RSI / 100) * AstroBias;
SpiritBoost = (Var_OBV / 100) * SpiritFlow;
Combo = (Var_OBV + Var_MA + Var_RSI) / 3 + AstroFlow + SpiritBoost;
ComboSm = MA(Combo, Smooth);
//{ --- 최근 K일 내 "최초" 상향 돌파 탐지 --- }
CrossNow = CrossUp(ComboSm, BuyThr); // 함수결과 → 변수로 보관
hit = false;
For d = 0 to K - 1 begin
// d번째 봉에서 상향돌파가 발생했고, (d+1)번째 봉(그 전 봉)에는 없었으면 "최초"
If CrossNow[d] and not CrossNow[d + 1] then bigin
hit = true;
end;
//{ --- 기본 필터 (예: 종가가 MA 위) --- }
If hit and (Close > maSeries) then
Find(1);
2.5일이평과20일이평이 크로스업 되었을때 텍스트로 주가를 나타내고싶습니다