커뮤니티
같은방향 재진입시스템
2014-10-05 00:38:47
189
글번호 79063
항상 감사드립니다
아래시스템식을 수정하고싶습니다.
아래조건식에서 발생하는 신호를 기본으로하고 다음조건을 추가하고싶습니다
1-1.data1(c)>Hma13 조건이면 매수/매수청산만
1-2.data1(c)<Lma13 조건이면 매도/매도청산만
매수조건이 나와서 아래 익절신호인"eB5"가 발생한뒤 다시 매수신호발생시 매수진입
매도조건이 나와서 아래 익절신호인"eS5"가 발생한뒤 다시 매도신호발생시 매도진입
매수조건이 나와서 아래 손절신호인"bx"가 발생한뒤 다시 매수신호발생시 매수진입
매도조건이 나와서 아래 손절신호인"sx"가 발생한뒤 다시 매도신호발생시 매도진입
input : 시작시간(070000),끝시간(030000);
var : Start(false),entrycnt(0),Bcond(false),Scond(false),idx(0);
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{
Start = True;
entrycnt = entrycnt+1;
Idx = 0;
}
input
Idx = idx+1;
if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then
Start = false;
Bcond = V10 == 1 and data1(c)>선행1[25] and var13==1 and macdv1>macds1 and upAroon1 >
DnAroon1 and data2(c)>Hma22 ;
Scond = V10 == -1 and data1(c)<선행1[25] and var13==-1 and macdv1<macds1 and upAroon1<
DnAroon1 And data2(c)<Lma22;
if Idx >= 1 and
Start == true and
Bcond == true and
(MarketPosition == -1 or (MarketPosition == 0 )) Then
buy("B1");
if Idx >= 1 and
Start == true and
Scond == true and
(MarketPosition == 1 or (MarketPosition == 0 )) Then
sell("S1");
##매수익절_50틱##
if MarketPosition == 1 and highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*50 and data1( CrossDown(c,Lma11)) and data1(c)<var2 Then
exitlong("eB5");
##매도익절_50틱##
if MarketPosition == -1 and Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*50 and data1( Crossup(c,Hma11))and data1(c)>var2 Then
ExitShort("eS5");
#손절1_#
if MarketPosition == 1 Then{
if (highest(H,BarsSinceEntry) <= EntryPrice+PriceScale*15) and data1(c)<Lma11 and data1(c)<var2 and data1(c)>선행1[25] Then
ExitLong("bx");
}
if MarketPosition == -1 Then{
if ( Lowest(L,BarsSinceEntry) >= EntryPrice-PriceScale*15) and data1(c)>Hma11 and data1(c)>var2 and data1(c)>선행1[25] Then
ExitShort("sx");
}
2,아래조건식을 타주기 챠트에 적용하고 싶습니다(주챠트 data1,타주기 data2)
변환부탁드립니다
##### 보조_1호 #####
Input: DIP(28);
var : DP1(0),DM1(0),ZZ(0);
DP1 = ema(iff(H-H[1]>0 && H-H[1]>L[1]-L,H-H[1],0),DIP)/
ema(max(max(H-L,abs(C[1]-H)),abs(C[1]-L)),DIP)*100;
DM1 = ema(iff(L[1]-L>0 && H-H[1]<L[1]-L,L[1]-L,0),DIP)/
ema(max(max(H-L,abs(C[1]-H)),abs(C[1]-L)),DIP)*100;
ZZ=ema(accum(ema(ema(DP1-DM1, 2), 2)),20);
if ZZ > ZZ[1] Then
var6 = 1;
Else
var6 = 0;
if var6 == 1 and var6[2] == 1 Then
var11 = 1 ;
if var6 == 0 and var6[2] == 0 Then
var11 = -1;
##### 보조_2호 #####
input : short1(12),long1(26),signal1(9),af(0.8),maxaf(0.2);
var : XX(0),YY(0);
var7 = MACD(short1,long1);
var8 = ema(var7,Signal1);
var9 = sar(af,maxaf);
if var7 > var8 Then{
if C > var9 Then
XX = 6;
Else
XX = 2;
}
Else{
if var9 > C Then
XX = -6;
Else
XX = -2;
}
if var7 > 0 Then
YY = 10;
Else
YY = -10;
if (XX+YY)>0 Then
var12 = 1;
if (XX+YY)<0 Then
var12 = -1;
감사합니다
답변 1
예스스탁 예스스탁 답변
2014-10-06 17:12:07
안녕하세요
예스스탁입니다.
1.
지금현재 식에 청산이후에 동일방향 진입을 막는내용이 없습니다.
그러므로 자동으로 청산 뒤에 동일방향진입조건이 반대방향진입조건보다
먼저 만족하면 진입을 합니다.
input : 시작시간(070000),끝시간(030000);
var : Start(false),entrycnt(0),Bcond(false),Scond(false),idx(0);
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{
Start = True;
entrycnt = entrycnt+1;
Idx = 0;
}
Idx = idx+1;
if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then
Start = false;
Bcond = V10 == 1 and data1(c)>선행1[25] and var13==1 and macdv1>macds1 and upAroon1 >
DnAroon1 and data2(c)>Hma22 ;
Scond = V10 == -1 and data1(c)<선행1[25] and var13==-1 and macdv1<macds1 and upAroon1<
DnAroon1 And data2(c)<Lma22;
if data1(c)>Hma13 and
Idx >= 1 and
Start == true and
Bcond == true and
(MarketPosition == -1 or (MarketPosition == 0 )) Then
buy("B1");
if data1(c)<Lma13 and
Idx >= 1 and
Start == true and
Scond == true and
(MarketPosition == 1 or (MarketPosition == 0 )) Then
sell("S1");
##매수익절_50틱##
if MarketPosition == 1 and highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*50 and data1( CrossDown(c,Lma11)) and data1(c)<var2 Then
exitlong("eB5");
##매도익절_50틱##
if MarketPosition == -1 and Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*50 and data1( Crossup(c,Hma11))and data1(c)>var2 Then
ExitShort("eS5");
#손절1_#
if MarketPosition == 1 Then{
if (highest(H,BarsSinceEntry) <= EntryPrice+PriceScale*15) and data1(c)<Lma11 and data1(c)<var2 and data1(c)>선행1[25] Then
ExitLong("bx");
}
if MarketPosition == -1 Then{
if ( Lowest(L,BarsSinceEntry) >= EntryPrice-PriceScale*15) and data1(c)>Hma11 and data1(c)>var2 and data1(c)>선행1[25] Then
ExitShort("sx");
}
2.
##### 보조_1호 #####
Input: DIP(28);
var : DP1(0,data2),DM1(0,data2),ZZ(0,data2),VV6(0,data2),vv11(0,data2);
DP1 = data2(ema(iff(H-H[1]>0 && H-H[1]>L[1]-L,H-H[1],0),DIP)/
ema(max(max(H-L,abs(C[1]-H)),abs(C[1]-L)),DIP)*100);
DM1 = data2(ema(iff(L[1]-L>0 && H-H[1]<L[1]-L,L[1]-L,0),DIP)/
ema(max(max(H-L,abs(C[1]-H)),abs(C[1]-L)),DIP)*100);
ZZ = data2(ema(accum(ema(ema(DP1-DM1, 2), 2)),20));
if ZZ > ZZ[1] Then
vv6 = 1;
Else
vv6 = 0;
if vv6 == 1 and vv6[2] == 1 Then
vv11 = 1 ;
if vv6 == 0 and vv6[2] == 0 Then
vv11 = -1;
##### 보조_2호 #####
input : short1(12),long1(26),signal1(9),af(0.8),maxaf(0.2);
var : XX(0,data2),YY(0,data2),vv7(0,data2),vv8(0,data2),vv9(0,data2),vv12(0,data2);
vv7 = data2(MACD(short1,long1));
vv8 = data2(ema(vv7,Signal1));
vv9 = data2(sar(af,maxaf));
if vv7 > vv8 Then{
if C > vv9 Then
XX = 6;
Else
XX = 2;
}
Else{
if vv9 > C Then
XX = -6;
Else
XX = -2;
}
if vv7 > 0 Then
YY = 10;
Else
YY = -10;
if (XX+YY)>0 Then
vv12 = 1;
if (XX+YY)<0 Then
vv12 = -1;
즐거운 하루되세요
> 조민철 님이 쓴 글입니다.
> 제목 : 같은방향 재진입시스템
> 항상 감사드립니다
아래시스템식을 수정하고싶습니다.
아래조건식에서 발생하는 신호를 기본으로하고 다음조건을 추가하고싶습니다
1-1.data1(c)>Hma13 조건이면 매수/매수청산만
1-2.data1(c)<Lma13 조건이면 매도/매도청산만
매수조건이 나와서 아래 익절신호인"eB5"가 발생한뒤 다시 매수신호발생시 매수진입
매도조건이 나와서 아래 익절신호인"eS5"가 발생한뒤 다시 매도신호발생시 매도진입
매수조건이 나와서 아래 손절신호인"bx"가 발생한뒤 다시 매수신호발생시 매수진입
매도조건이 나와서 아래 손절신호인"sx"가 발생한뒤 다시 매도신호발생시 매도진입
input : 시작시간(070000),끝시간(030000);
var : Start(false),entrycnt(0),Bcond(false),Scond(false),idx(0);
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{
Start = True;
entrycnt = entrycnt+1;
Idx = 0;
}
input
Idx = idx+1;
if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then
Start = false;
Bcond = V10 == 1 and data1(c)>선행1[25] and var13==1 and macdv1>macds1 and upAroon1 >
DnAroon1 and data2(c)>Hma22 ;
Scond = V10 == -1 and data1(c)<선행1[25] and var13==-1 and macdv1<macds1 and upAroon1<
DnAroon1 And data2(c)<Lma22;
if Idx >= 1 and
Start == true and
Bcond == true and
(MarketPosition == -1 or (MarketPosition == 0 )) Then
buy("B1");
if Idx >= 1 and
Start == true and
Scond == true and
(MarketPosition == 1 or (MarketPosition == 0 )) Then
sell("S1");
##매수익절_50틱##
if MarketPosition == 1 and highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*50 and data1( CrossDown(c,Lma11)) and data1(c)<var2 Then
exitlong("eB5");
##매도익절_50틱##
if MarketPosition == -1 and Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*50 and data1( Crossup(c,Hma11))and data1(c)>var2 Then
ExitShort("eS5");
#손절1_#
if MarketPosition == 1 Then{
if (highest(H,BarsSinceEntry) <= EntryPrice+PriceScale*15) and data1(c)<Lma11 and data1(c)<var2 and data1(c)>선행1[25] Then
ExitLong("bx");
}
if MarketPosition == -1 Then{
if ( Lowest(L,BarsSinceEntry) >= EntryPrice-PriceScale*15) and data1(c)>Hma11 and data1(c)>var2 and data1(c)>선행1[25] Then
ExitShort("sx");
}
2,아래조건식을 타주기 챠트에 적용하고 싶습니다(주챠트 data1,타주기 data2)
변환부탁드립니다
##### 보조_1호 #####
Input: DIP(28);
var : DP1(0),DM1(0),ZZ(0);
DP1 = ema(iff(H-H[1]>0 && H-H[1]>L[1]-L,H-H[1],0),DIP)/
ema(max(max(H-L,abs(C[1]-H)),abs(C[1]-L)),DIP)*100;
DM1 = ema(iff(L[1]-L>0 && H-H[1]<L[1]-L,L[1]-L,0),DIP)/
ema(max(max(H-L,abs(C[1]-H)),abs(C[1]-L)),DIP)*100;
ZZ=ema(accum(ema(ema(DP1-DM1, 2), 2)),20);
if ZZ > ZZ[1] Then
var6 = 1;
Else
var6 = 0;
if var6 == 1 and var6[2] == 1 Then
var11 = 1 ;
if var6 == 0 and var6[2] == 0 Then
var11 = -1;
##### 보조_2호 #####
input : short1(12),long1(26),signal1(9),af(0.8),maxaf(0.2);
var : XX(0),YY(0);
var7 = MACD(short1,long1);
var8 = ema(var7,Signal1);
var9 = sar(af,maxaf);
if var7 > var8 Then{
if C > var9 Then
XX = 6;
Else
XX = 2;
}
Else{
if var9 > C Then
XX = -6;
Else
XX = -2;
}
if var7 > 0 Then
YY = 10;
Else
YY = -10;
if (XX+YY)>0 Then
var12 = 1;
if (XX+YY)<0 Then
var12 = -1;
감사합니다
다음글
이전글