커뮤니티
시스템 수정요청
2014-09-26 12:39:11
185
글번호 78841
> 항상 감사드립니다
/어제 전화로 상담했던 내용으로 수정했습니다
아래 시스템 시간설정의 오류를 수정하고 싶습니다
input : 시작시간(210000),끝시간(043000);
var : Start(false),entrycnt(0),Bcond(false),Scond(false);
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{
Start = True;
entrycnt = entrycnt+1;
}
if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then
Start = false;
if Start == true and BarsSinceExit(1) == 1 Then{
if MarketPosition(1) == 1 and ExitPrice(1) >= EntryPrice(1)+PriceScale*50 Then
Start == false;
if MarketPosition(1) == 1 and ExitPrice(1) <= EntryPrice(1)-PriceScale*50 Then
Start == false;
}
Bcond = var10==1 and var20==1 and var13==1 and c>var48[25] and macdv>macds and upAroon > DnAroon;
Scond = var10 == -1 and var20==-1 and var13==-1 and c<var48[25] and macdv<macds and upAroon < DnAroon ;
if Start == true and
Bcond == true and Bcond[1] == False Then{
if !(MarketPosition == -1 and C <= EntryPrice-PriceScale*50) Then
buy("B1");
if MarketPosition == -1 and C <= EntryPrice-PriceScale*50 Then
ExitShort("sx");
}
if Start == true and
Scond == true and Scond[1] == False Then {
if !(MarketPosition == 1 and C <= EntryPrice+PriceScale*50) Then
sell("S1");
if MarketPosition == 1 and C >= EntryPrice+PriceScale*50 Then
ExitLong("bx");
}
1.위시스템에서 익절조건삭제후 시간만 적용시 아래와 같이 적용하면 되는지?
(따로작성하고 싶습니다)
-21:00 이후에 발생하는 첫진입신호는 무시하고 두번째 신호부터 시스템적용
input : 시작시간(210000),끝시간(043000);
var : Start(false),entrycnt(0),Bcond(false),Scond(false);
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{
Start = True;
entrycnt = entrycnt+1;
}
if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then
Start = false;
Bcond = var10==1 and var20==1 and var13==1 and c>var48[25] and macdv>macds and upAroon > DnAroon;
Scond = var10==-1 and var20==-1 and var13==-1 and c<var48[25] and macdv<macds and upAroon < DnAroon ;
if Start == true and
Bcond == true and Bcond[1] == False Then
buy("B1");
if Start == true and
Scond == true and Scond[1] == False Then {
sell("S1");
2.위의 시스템에서
매수/매도신호 진입후 청산이익이 50틱이상이 발생하면 청산후 시스템종료
(시스템가동시간안에 청산이익이 한번이라도 50틱발생하면 시스템종료하고 싶습니다)
매수매도진입신호가 반복해서 나와도 청산이익이 50틱을 만족하지 못하면 시스템가동
지금위의식은 계속 진입이 되는것 같습니다 (시스템 따로 작성해주시기 바랍니다)
3.아래 시스템조건식을 이용해서 주챠트와 타주기 챠트에서 신호발생시 5개봉이내일때
매수/매도진입식을 만들고 싶습니다
if var10==1 and var20==1 and var13==1 and c>var48[25] and macdv>macds
and upAroon > DnAroon then
buy("b1");
if var10 == -1 and var20==-1 and var13==-1 and c<var48[25] and macdv<macds
and upAroon < DnAroon then
sell("s1");
# 주챠트:200틱 /타주기챠트 :1분
# 주챠트와 타주기챠트에서 발생하는 신호가 5개봉이내일때만 신호발생
-주챠트 200틱에서 매수신호가 발생/ 타주기챠트 1분봉에서 매수신호발생시 매수진입(b1)
-주챠트 200틱에서 매도신호가 발생/ 타주기챠트 1분봉에서 매도신호발생시 매도진입(s1)
-타주기챠트1분봉에서 매수신호가 발생/ 주챠트200틱에서 매수신호발생시 매수진입(b2)
-타주기챠트1분봉에서 매도신호가 발생/ 주챠트200틱에서 매도신호발생시 매도진입(s2)
4.익절조건추가
매수/매도진입후 최대수익이 50틱이상일때 VAR1을 돌파하면 청산
청산후 다음신호까지 재진입금지
ex)진입후 최대수익이 51틱이고 현재 40틱수익이며,VAR1을 돌파하면 청산)
감사합니다
답변 1
예스스탁 예스스탁 답변
2014-09-26 17:53:53
안녕하세요
예스스탁입니다.
죄송합니다. 통화후 회의에 들어가 답변을 못드렸습니다.
1.
어제 말씀드린부분과 같이 시작시간 이후에 봉수를 카운트 해서
첫봉에서는 신호가 나오지 않게 하는 처리한 식입니다.
input : 시작시간(210000),끝시간(043000);
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;
if Start == true and BarsSinceExit(1) == 1 Then{
if MarketPosition(1) == 1 and ExitPrice(1) >= EntryPrice(1)+PriceScale*50 Then
Start == false;
if MarketPosition(1) == 1 and ExitPrice(1) <= EntryPrice(1)-PriceScale*50 Then
Start == false;
}
Bcond = var10==1 and var20==1 and var13==1 and c>var48[25] and macdv>macds and upAroon > DnAroon;
Scond = var10 == -1 and var20==-1 and var13==-1 and c<var48[25] and macdv<macds and upAroon < DnAroon ;
if Idx >= 2 and
Start == true and
Bcond == true and Bcond[1] == False Then{
if !(MarketPosition == -1 and C <= EntryPrice-PriceScale*50) Then
buy("B1");
if MarketPosition == -1 and C <= EntryPrice-PriceScale*50 Then
ExitShort("sx");
}
if Idx >= 2 and
Start == true and
Scond == true and Scond[1] == False Then {
if !(MarketPosition == 1 and C <= EntryPrice+PriceScale*50) Then
sell("S1");
if MarketPosition == 1 and C >= EntryPrice+PriceScale*50 Then
ExitLong("bx");
}
2.
var : b1(0,data1),b2(0,data1);
var : s1(0,data1),s2(0,data1);
if MarketPosition == 0 Then
if data1(매수조건) Then{
b1 = data1(index);
if b1 <= b2+5 Then
buy("b1");
}
if data2(매수조건) Then{
b2 = data1(index);
if b2 <= b1+5 Then
buy("b2");
}
if data1(매도조건) Then{
s1 = data1(index);
if s1 <= s2+5 Then
sell("s1");
}
if data2(매도조건) Then{
s2 = data1(index);
if s2 <= s1+5 Then
sell("s2");
}
if MarketPosition == 1 and highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*50 and crossup(c,var1) Then
exitlong();
if MarketPosition == -1 and Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*50 and CrossDown(c,var1) Then
ExitShort();
즐거운 하루되세요
> 조민철 님이 쓴 글입니다.
> 제목 : 시스템 수정요청
> > 항상 감사드립니다
/어제 전화로 상담했던 내용으로 수정했습니다
아래 시스템 시간설정의 오류를 수정하고 싶습니다
input : 시작시간(210000),끝시간(043000);
var : Start(false),entrycnt(0),Bcond(false),Scond(false);
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{
Start = True;
entrycnt = entrycnt+1;
}
if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then
Start = false;
if Start == true and BarsSinceExit(1) == 1 Then{
if MarketPosition(1) == 1 and ExitPrice(1) >= EntryPrice(1)+PriceScale*50 Then
Start == false;
if MarketPosition(1) == 1 and ExitPrice(1) <= EntryPrice(1)-PriceScale*50 Then
Start == false;
}
Bcond = var10==1 and var20==1 and var13==1 and c>var48[25] and macdv>macds and upAroon > DnAroon;
Scond = var10 == -1 and var20==-1 and var13==-1 and c<var48[25] and macdv<macds and upAroon < DnAroon ;
if Start == true and
Bcond == true and Bcond[1] == False Then{
if !(MarketPosition == -1 and C <= EntryPrice-PriceScale*50) Then
buy("B1");
if MarketPosition == -1 and C <= EntryPrice-PriceScale*50 Then
ExitShort("sx");
}
if Start == true and
Scond == true and Scond[1] == False Then {
if !(MarketPosition == 1 and C <= EntryPrice+PriceScale*50) Then
sell("S1");
if MarketPosition == 1 and C >= EntryPrice+PriceScale*50 Then
ExitLong("bx");
}
1.위시스템에서 익절조건삭제후 시간만 적용시 아래와 같이 적용하면 되는지?
(따로작성하고 싶습니다)
-21:00 이후에 발생하는 첫진입신호는 무시하고 두번째 신호부터 시스템적용
input : 시작시간(210000),끝시간(043000);
var : Start(false),entrycnt(0),Bcond(false),Scond(false);
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{
Start = True;
entrycnt = entrycnt+1;
}
if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then
Start = false;
Bcond = var10==1 and var20==1 and var13==1 and c>var48[25] and macdv>macds and upAroon > DnAroon;
Scond = var10==-1 and var20==-1 and var13==-1 and c<var48[25] and macdv<macds and upAroon < DnAroon ;
if Start == true and
Bcond == true and Bcond[1] == False Then
buy("B1");
if Start == true and
Scond == true and Scond[1] == False Then {
sell("S1");
2.위의 시스템에서
매수/매도신호 진입후 청산이익이 50틱이상이 발생하면 청산후 시스템종료
(시스템가동시간안에 청산이익이 한번이라도 50틱발생하면 시스템종료하고 싶습니다)
매수매도진입신호가 반복해서 나와도 청산이익이 50틱을 만족하지 못하면 시스템가동
지금위의식은 계속 진입이 되는것 같습니다 (시스템 따로 작성해주시기 바랍니다)
3.아래 시스템조건식을 이용해서 주챠트와 타주기 챠트에서 신호발생시 5개봉이내일때
매수/매도진입식을 만들고 싶습니다
if var10==1 and var20==1 and var13==1 and c>var48[25] and macdv>macds
and upAroon > DnAroon then
buy("b1");
if var10 == -1 and var20==-1 and var13==-1 and c<var48[25] and macdv<macds
and upAroon < DnAroon then
sell("s1");
# 주챠트:200틱 /타주기챠트 :1분
# 주챠트와 타주기챠트에서 발생하는 신호가 5개봉이내일때만 신호발생
-주챠트 200틱에서 매수신호가 발생/ 타주기챠트 1분봉에서 매수신호발생시 매수진입(b1)
-주챠트 200틱에서 매도신호가 발생/ 타주기챠트 1분봉에서 매도신호발생시 매도진입(s1)
-타주기챠트1분봉에서 매수신호가 발생/ 주챠트200틱에서 매수신호발생시 매수진입(b2)
-타주기챠트1분봉에서 매도신호가 발생/ 주챠트200틱에서 매도신호발생시 매도진입(s2)
4.익절조건추가
매수/매도진입후 최대수익이 50틱이상일때 VAR1을 돌파하면 청산
청산후 다음신호까지 재진입금지
ex)진입후 최대수익이 51틱이고 현재 40틱수익이며,VAR1을 돌파하면 청산)
감사합니다
다음글
이전글