커뮤니티
시스템수식을 검색수식으로 변경 부탁드려요
2016-02-06 02:35:12
162
글번호 95231
두가지 수식이 있는데 둘다 시스템매매 수식인데요...
검색 수식으로 변경 부탁드립니다
첫번째 수식입니다
input : P1(9),Left(3),Right(3),N(20);
var1 = Trix(P1);
if SwingHighbar(1,var1,Left,Right,Left+Right+1) != -1 Then{
value1 = var1[right];
value2 = value1[1];
value3 = C[right];
value4 = value3[1];
value5 = index;
value6 = value5[1];
#지표값은 하락, 가격(종가)는 상승
if value1 < value2 and value3 > value4 and value4 > 0 and value5 <= value6+N Then
sell();
}
if SwingLowBar(1,var1,Left,Right,Left+Right+1) != -1 Then{
value11 = var1[right];
value12 = value11[1];
value13 = C[right];
value14 = value13[1];
value15 = index;
value16 = value15[1];
#지표값은 상승, 가격(종가)은 하락
if value11 > value12 and value13 < value14 and value14 > 0 and value15 <= value16+N Then
Buy();
}
두번째 수식입니다
Input : Period(12), sigPeriod(9);
value1 = TRIX(Period);
value2 = ema(value1, sigPeriod);
# 매수/매도청산
If CrossUP(value1, value2) Then
{
Buy();
}
# 매도/매수청산
If CrossDown(value1, value2) Then
{
Sell();
}
답변 1
예스스탁 예스스탁 답변
2016-02-11 08:53:52
안녕하세요
예스스탁입니다.
1.
input : P1(9),Left(3),Right(3),N(20);
var1 = Trix(P1);
if SwingHighbar(1,var1,Left,Right,Left+Right+1) != -1 Then{
value1 = var1[right];
value2 = value1[1];
value3 = C[right];
value4 = value3[1];
value5 = index;
value6 = value5[1];
#지표값은 하락, 가격(종가)는 상승
if value1 < value2 and value3 > value4 and value4 > 0 and value5 <= value6+N Then
plot1(H+PriceScale,"검색",blue);
}
if SwingLowBar(1,var1,Left,Right,Left+Right+1) != -1 Then{
value11 = var1[right];
value12 = value11[1];
value13 = C[right];
value14 = value13[1];
value15 = index;
value16 = value15[1];
#지표값은 상승, 가격(종가)은 하락
if value11 > value12 and value13 < value14 and value14 > 0 and value15 <= value16+N Then
plot1(L-PriceScale,"검색",RED);
}
2.
Input : Period(12), sigPeriod(9);
value1 = TRIX(Period);
value2 = ema(value1, sigPeriod);
# 매수/매도청산
If CrossUP(value1, value2) Then
{
plot1(H+PriceScale,"검색",RED);
}
# 매도/매수청산
If CrossDown(value1, value2) Then
{
plot1(L-PriceScale,"검색",blue);
}
즐거운 하루되세요
> 퍼플앙 님이 쓴 글입니다.
> 제목 : 시스템수식을 검색수식으로 변경 부탁드려요
> 두가지 수식이 있는데 둘다 시스템매매 수식인데요...
검색 수식으로 변경 부탁드립니다
첫번째 수식입니다
input : P1(9),Left(3),Right(3),N(20);
var1 = Trix(P1);
if SwingHighbar(1,var1,Left,Right,Left+Right+1) != -1 Then{
value1 = var1[right];
value2 = value1[1];
value3 = C[right];
value4 = value3[1];
value5 = index;
value6 = value5[1];
#지표값은 하락, 가격(종가)는 상승
if value1 < value2 and value3 > value4 and value4 > 0 and value5 <= value6+N Then
sell();
}
if SwingLowBar(1,var1,Left,Right,Left+Right+1) != -1 Then{
value11 = var1[right];
value12 = value11[1];
value13 = C[right];
value14 = value13[1];
value15 = index;
value16 = value15[1];
#지표값은 상승, 가격(종가)은 하락
if value11 > value12 and value13 < value14 and value14 > 0 and value15 <= value16+N Then
Buy();
}
두번째 수식입니다
Input : Period(12), sigPeriod(9);
value1 = TRIX(Period);
value2 = ema(value1, sigPeriod);
# 매수/매도청산
If CrossUP(value1, value2) Then
{
Buy();
}
# 매도/매수청산
If CrossDown(value1, value2) Then
{
Sell();
}