커뮤니티

수정문의

프로필 이미지
ksks
2025-12-23 16:13:36
68
글번호 229312
답변완료

첨부 이미지

input : length(26), period(25);

var : a(0),b(0),up(False);

var : scr(0), M1(0), M2(0), base(0), diff(0);

scr = (h+l)/2;

M1 = Ema(C, Period);

M2 = Ema(M1, Period);

Base = Ema(M2, Period);

diff = Base - Base(2);

a = wma(2*wma(scr,length/2) - wma(scr,length), floor(sqrt(length)));

b = wma(wma(close,(length/2)/3)*3 - wma(close,(length/2)/2) - wma(close,(length/2)),(length/2));

up = b > a and b[1] < a[1];

if UP && UP[1] == False && diff>0 && a<b && b<base && O<base Then

Find(1);


좀 응용해서

첨부파일 한화오션차트의 2025.7.11과 같은 것을 검색하려고((2025.5.28, 10.2같은 신호는 제외하고)

위 수식을 만들어봤는데

검증에서 diff = Base - Base(2);줄에 대해 함수만이 값을 가질 수 있다고 나옵니다.

수정부탁드립니다.



종목검색
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2025-12-24 09:39:01

안녕하세요 예스스탁입니다. diff = Base - Base(2); 예스랭귀지에서 1봉전,2봉전과 같이 이전봉값 참조는 []로 지정합니다. diff = Base - Base[2]; 와 같이 변경하시면 됩니다. input : length(26), period(25); var : a(0),b(0),up(False); var : scr(0), M1(0), M2(0), base(0), diff(0); scr = (h+l)/2; M1 = Ema(C, Period); M2 = Ema(M1, Period); Base = Ema(M2, Period); diff = Base - Base[2]; a = wma(2*wma(scr,length/2) - wma(scr,length), floor(sqrt(length))); b = wma(wma(close,(length/2)/3)*3 - wma(close,(length/2)/2) - wma(close,(length/2)),(length/2)); up = b > a and b[1] < a[1]; if UP && UP[1] == False && diff>0 && a<b && b<base && O<base Then Find(1); 즐거운 하루되세요