커뮤니티
안녕하세요
2012-08-04 02:39:10
344
글번호 53490
반갑습니다
다시한번 부탁합니다
가)항 (30분봉)
var1 = C-O;#몸통크기
value1 = accumn(var5,10);
value2 = accumn(var15,20);
if value1 > 0 and value2 > 0 and
ma(c,1) > ma(c,2) Then
Buy();
if value1 < 0 and value2 < 0 and
ma(c,1) < ma(c,2) Then
Sell();
나)60분봉
1.60분에서 첫번째 양봉후
2.RSI>시그널선
다)60분봉
1.60분에서 양봉(양봉갯수관계없음).
2.RSI>시그널
A)가항과 나)항이 만족하면 매수..반대면 매도
B)가항과 다)항이 만족하면 매수..반대면 매도
항상감사합니다
수고하세요.
답변 3
예스스탁 예스스탁 답변
2012-08-06 15:48:28
안녕하세요? 예스스탁이니다.
문의하신 내용 답변드립니다.
input : RSIPeriod(14), sigPeriod(5);
var : D2RSIV(0), D2RSISig(0);
var1 = C-O;#몸통크기
value1 = accumn(var5,10);
value2 = accumn(var15,20);
#가) 매수조건
Condition1 = value1 > 0 and value2 > 0 and ma(c,1) > ma(c,2); //Data1매수조건
#가) 매도조건
condition2 = value1 < 0 and value2 < 0 and ma(c,1) < ma(c,2) ; //data2매도조건
D2RSIV = data2(RSI(RSIPeriod));
D2RSISig = ma(D2RSIV, SigPeriod);
# 나)매수조건
if date <> date[1] and data2(C) > data2(O) Then
Condition3 = true; //참조종목 첫봉 양봉조건
Condition4 = D2RSIV > D2RSISig ; //참조종목 RSI > RSI시그널 조건
# 나)매도조건
if date <> date[1] and data2(C) < data2(O) Then
Condition5 = true; // 참조종목 첫봉 음봉조건
Condition6 = D2RSIV < D2RSISig ; //참조종목 RSI < RSI시그널 조건
# 다)매수조건
condition7 = data2(C) > data2(O);
# 다)매도조건
Condition8 = data2(C) < data2(O);
if Condition1 and Condition3 Then //가) 매수조건 and 나) 매수조건
buy();
if Condition2 and condition5 Then //가) 매도조건 and 나) 매도조건
sell();
if condition1 and Condition7 and Condition4 Then //가) 매수조건 and 다)매수조건 and 참조종목 RSI > RSI시그널 조건
buy();
if Condition2 and Condition8 and Condition6 Then //가) 매수조건 and 다)매도조건 and 참조종목 RSI < RSI시그널 조건
sell();
나)60분봉
1.60분에서 첫번째 양봉후
2.RSI>시그널선
다)60분봉
1.60분에서 양봉(양봉갯수관계없음).
2.RSI>시그널
A)가항과 나)항이 만족하면 매수..반대면 매도
B)가항과 다)항이 만족하면 매수..반대면 매도
항상감사합니다
수고하세요.
예스스탁 예스스탁 답변
2012-08-06 17:23:41
가)와 나) 조건만족시 매매하는 식입니다.
input : RSIPeriod(14), sigPeriod(5);
var : D2RSIV(0), D2RSISig(0);
var1 = C-O;#몸통크기
value1 = accumn(var5,10);
value2 = accumn(var15,20);
#가) 매수조건
Condition1 = value1 > 0 and value2 > 0 and ma(c,1) > ma(c,2); //Data1매수조건
#가) 매도조건
condition2 = value1 < 0 and value2 < 0 and ma(c,1) < ma(c,2) ; //data2매도조건
D2RSIV = data2(RSI(RSIPeriod));
D2RSISig = ma(D2RSIV, SigPeriod);
# 나)매수조건
if date <> date[1] and data2(C) > data2(O) Then
Condition3 = true; //참조종목 첫봉 양봉조건
Condition4 = D2RSIV > D2RSISig ; //참조종목 RSI > RSI시그널 조건
# 나)매도조건
if date <> date[1] and data2(C) < data2(O) Then
Condition5 = true; // 참조종목 첫봉 음봉조건
Condition6 = D2RSIV < D2RSISig ; //참조종목 RSI < RSI시그널 조건
if Condition1 and Condition3 and Condition4 Then //가) 매수조건 and 나) 매수조건
buy();
if Condition2 and condition5 and Condition6 Then //가) 매도조건 and 나) 매도조건
sell();
예스스탁 예스스탁 답변
2012-08-07 14:01:21
안녕하세요
예스스탁입니다.
1. 가+나
Inputs:Atime(60), Length(9);
input : sig(10);
var : SigSum(0),count2(0),RSIsig(0);
Var : Counter(0), DownAmt(0), UpAmt(0), UpSum(0), DownSum(0), UpAvg(0), DownAvg(0), RSI(0);
var : Dindex(0), PreUpAvg(0), preDownAvg(0),cnt1(0),aa(0);
Array : CC[100](0),RSIV[100](0),OO[100](0);
AA = TimeToMinutes(stime)%Atime;
if dayindex() == 0 or AA <= AA[1] Then{
OO[0] = O;
for cnt1 = 1 to 99{
CC[cnt1] = CC[cnt1-1][1];
}
PreUpAvg = UpAvg[1];
preDownAvg = DownAvg[1];
Dindex = dindex + 1;
}
CC[0] = C;
if date != date[1] Then{
Condition1 = false;
Condition2 = false;
}
if dayindex() > 0 and AA <= AA[1] Then{
if CC[0][1] > OO[0][1] Then
Condition1 = true;
if CC[0][1] < OO[0][1] Then
Condition2 = true;
}
If Dindex == Length Then Begin
UpSum = 0;
DownSum = 0;
For Counter = 0 To Length - 1 Begin
UpAmt = C[Counter] - C[Counter+1];
If UpAmt >= 0 Then
DownAmt = 0;
Else Begin
DownAmt = -UpAmt;
UpAmt = 0;
End;
UpSum = UpSum + UpAmt;
DownSum = DownSum + DownAmt;
End;
UpAvg = UpSum / Length;
DownAvg = DownSum / Length;
End
If Dindex > Length Then {
UpAmt = CC[0]-Cc[1];
If UpAmt >= 0 Then
DownAmt = 0;
Else
{
DownAmt = -UpAmt;
UpAmt = 0;
}
if Dindex <=1 Then {
UpAvg = 1;
DownAvg = 1;
}
Else {
UpAvg = (PreUpAvg * (Length - 1) + UpAmt) / Length;
DownAvg = (preDownAvg * (Length - 1) + DownAmt) / Length;
}
}
If UpAvg + DownAvg <> 0 Then
RSIv[0] = 100 * UpAvg / (UpAvg + DownAvg);
Else
RSIv[0] = 0;
SigSum = 0;
for count2 = 0 to sig-1{
SigSum = SigSum+RSIv[count2];
}
RSIsig = SigSum/Sig;
var1 = C-O;#몸통크기
value1 = accumn(var5,10);
value2 = accumn(var15,20);
if value1 > 0 and value2 > 0 and
ma(c,1) > ma(c,2) and
Stime >= 100000 and
Condition1 == true and
RSIV[0] > RSIsig Then
Buy();
if value1 < 0 and value2 < 0 and
ma(c,1) < ma(c,2) and
Stime >= 100000 and
Condition2 == true and
RSIV[0] < RSIsig Then
sell();
2. 가+다
Inputs:Atime(60), Length(9);
input : sig(10);
var : SigSum(0),count2(0),RSIsig(0);
Var : Counter(0), DownAmt(0), UpAmt(0), UpSum(0), DownSum(0), UpAvg(0), DownAvg(0), RSI(0);
var : Dindex(0), PreUpAvg(0), preDownAvg(0),cnt1(0),aa(0);
Array : CC[100](0),RSIV[100](0),OO[100](0);
AA = TimeToMinutes(stime)%Atime;
if dayindex() == 0 or AA <= AA[1] Then{
OO[0] = O;
for cnt1 = 1 to 99{
CC[cnt1] = CC[cnt1-1][1];
}
PreUpAvg = UpAvg[1];
preDownAvg = DownAvg[1];
Dindex = dindex + 1;
}
CC[0] = C;
If Dindex == Length Then Begin
UpSum = 0;
DownSum = 0;
For Counter = 0 To Length - 1 Begin
UpAmt = C[Counter] - C[Counter+1];
If UpAmt >= 0 Then
DownAmt = 0;
Else Begin
DownAmt = -UpAmt;
UpAmt = 0;
End;
UpSum = UpSum + UpAmt;
DownSum = DownSum + DownAmt;
End;
UpAvg = UpSum / Length;
DownAvg = DownSum / Length;
End
If Dindex > Length Then {
UpAmt = CC[0]-Cc[1];
If UpAmt >= 0 Then
DownAmt = 0;
Else
{
DownAmt = -UpAmt;
UpAmt = 0;
}
if Dindex <=1 Then {
UpAvg = 1;
DownAvg = 1;
}
Else {
UpAvg = (PreUpAvg * (Length - 1) + UpAmt) / Length;
DownAvg = (preDownAvg * (Length - 1) + DownAmt) / Length;
}
}
If UpAvg + DownAvg <> 0 Then
RSIv[0] = 100 * UpAvg / (UpAvg + DownAvg);
Else
RSIv[0] = 0;
SigSum = 0;
for count2 = 0 to sig-1{
SigSum = SigSum+RSIv[count2];
}
RSIsig = SigSum/Sig;
var1 = C-O;#몸통크기
value1 = accumn(var5,10);
value2 = accumn(var15,20);
if value1 > 0 and value2 > 0 and
ma(c,1) > ma(c,2) and
Stime >= 100000 and
CC[0] > OO[0] and
RSIV[0] > RSIsig Then
Buy();
if value1 < 0 and value2 < 0 and
ma(c,1) < ma(c,2) and
Stime >= 100000 and
CC[0] < OO[0] and
RSIV[0] < RSIsig Then
Sell();
즐거운 하루되세요
> jbouu123 님이 쓴 글입니다.
> 제목 : 안녕하세요
> 반갑습니다
다시한번 부탁합니다
가)항 (30분봉)
var1 = C-O;#몸통크기
value1 = accumn(var5,10);
value2 = accumn(var15,20);
if value1 > 0 and value2 > 0 and
ma(c,1) > ma(c,2) Then
Buy();
if value1 < 0 and value2 < 0 and
ma(c,1) < ma(c,2) Then
Sell();
나)60분봉
1.60분에서 첫번째 양봉후
2.RSI>시그널선
다)60분봉
1.60분에서 양봉(양봉갯수관계없음).
2.RSI>시그널
A)가항과 나)항이 만족하면 매수..반대면 매도
B)가항과 다)항이 만족하면 매수..반대면 매도
항상감사합니다
수고하세요.
다음글