답변완료
지표로 변환해 주세요 건강하세요
inputs:Length1(3), Length2(5), Length3(20);
var : VolumeSum1(0), VolumeSum2(0), VolumeSum3(0);
var : VWMA1(0), VWMA2(0), VWMA3(0),A(0);
var : sum1(0),sum2(0),sum3(0),cnt(0);
VolumeSum1 = 0;
sum1 = 0;
for cnt = 0 to Length1-1{
VolumeSum1 = VolumeSum1 + DayVolume(cnt);
A=(dayhigh(cnt)+daylow(cnt)+dayclose(cnt))/3;
sum1 = sum1 + A*DayVolume(cnt);
}
VWMA1 = sum1 / VolumeSum1 ;
VolumeSum2 = 0;
sum2 = 0;
for cnt = 0 to Length2-1{
VolumeSum2 = VolumeSum2 + DayVolume(cnt);
A=(dayhigh(cnt)+daylow(cnt)+dayclose(cnt))/3;
sum2 = sum2 + A*DayVolume(cnt);
}
VWMA2 = sum2 / VolumeSum2 ;
VolumeSum3 = 0;
sum3 = 0;
for cnt = 0 to Length3-1{
VolumeSum3 = VolumeSum3 + DayVolume(cnt);
A=(dayhigh(cnt)+daylow(cnt)+dayclose(cnt))/3;
sum3 = sum3 + A*DayVolume(cnt);
}
VWMA3 = sum3 / VolumeSum3 ;
IF CrossUP(C,VWMA1) OR CrossUP(C,VWMA2) TheN
Find(1);
2025-05-23
270
글번호 191130
지표
답변완료
지표 변환 부탁드립니다.
a = eavg(c, 1);
b = eavg(c, 112);
d = eavg(c, 224);
e = eavg(c, 448);
i=BBandsUp(20,2);
f = (highest(high,9)+lowest(low,9)+highest(high,26)+lowest(low,26))/4;
g = (highest(high,52)+lowest(low,52))/2;
f(25) < C or g(25) < C&&
(B*1.08 >= A and B*0.98 <= A or
d*1.08 >= A and d*0.98 <= A or
e*1.08 >= A and e*0.98 <= A) &&
eavg(c,1) >= eavg(c,448)
&&b<d<e&&crossup(c,i)&&
c >= SAR(0.2,0.02)
신호를 검색기로 만들고 싶습니다.
2025-05-23
255
글번호 191127
검색
답변완료
수식 문의드립니다.
화살표 표시가 안보이는데 어디서 잘 못된걸까요? ^^
진입은 1 이평이 2 이평을 돌파할 때
익절과 손절은 5 이평이 20 이평을 돌파할 때로 잡았습니다
vars:
ma1(0),
ma2(0),
ma5(0),
ma20(0),
longEntry(false),
shortEntry(false);
// 이동평균 계산
ma1 = ma(C, 1);
ma2 = ma(C, 2);
ma5 = ma(C, 5);
ma20 = ma(C, 20);
// === 매수 진입 ===
if (longEntry = false) and (ma1 > ma2) and (ma1[1] <= ma2[1]) and (C > O) then
begin
buy(); // 매수 진입
longEntry = true;
shortEntry = false;
end;
// === 매도 진입 ===
if (shortEntry = false) and (ma1 < ma2) and (ma1[1] >= ma2[1]) and (C < O) then
begin
sell(); // 매도 진입
shortEntry = true;
longEntry = false;
end;
// === 매수 포지션 청산 ===
if longEntry then
begin
// 익절
if (ma5 > ma20) and (ma5[1] <= ma20[1]) then
begin
sell(); // 청산
longEntry = false;
end
// 손절
else if (ma5 < ma20) and (ma5[1] >= ma20[1]) then
begin
sell(); // 청산
longEntry = false;
end;
end;
// === 매도 포지션 청산 ===
if shortEntry then
begin
// 익절
if (ma5 < ma20) and (ma5[1] >= ma20[1]) then
begin
buy(); // 청산
shortEntry = false;
end
// 손절
else if (ma5 > ma20) and (ma5[1] <= ma20[1]) then
begin
buy(); // 청산
shortEntry = false;
end;
end;
2025-05-23
252
글번호 191113
시스템