커뮤니티
문의드립니다
2015-07-14 15:12:44
113
글번호 88401
안녕하세요
43027과관련하여
지표식및 시스템식이 이상합니다
지표식은 작성되지않고 시스템식은 17시10분에서 매수매도청산발생
시작시간 17시제외하면 날자변경선에서 매수매도청산
다시한번검토부탁드립니다
========================================
식수정후 그시스템에 아래조건을 추가하여 별도로 시스템식 부탁드립니다.
기존시스템식1개
조건추가시스템식1개
총 2개 부탁드립니다
기존수식에서 매매횟수및 같은방향 진입제어가 되어있는데요
여기 다음수식을 추가하고자합니다.
재매수조건 = 당일 매수청산이 한번 발생한적이 있으면 당일 최고점돌파시매수
매매횟수 1회만발생하게해주세요.
그러면 기존수식에서 매수 1회 그리고 재매수에서 1회
당일 매수포지션에서만 총 2번 발생되게해주세요.
재매도조건 = 재매수반대.
감사합니다.
답변 1
예스스탁 예스스탁 답변
2015-07-14 17:14:52
안녕하세요
예스스탁입니다.
식을 수정했습니다.
1.
input : P(25);
var : cnt(0);
Array : OO[10](0),HH[10](0),LL[10](0);
if Bdate != Bdate[1] Then{
OO[0] = O;
HH[0] = H;
LL[0] = L;
for cnt = 1 to 9{
OO[cnt] = OO[cnt-1][1];
HH[cnt] = HH[cnt-1][1];
LL[cnt] = LL[cnt-1][1];
}
}
if H > HH[0] then
HH[0] = H;
if L < LL[0] then
LL[0] = L;
var1 = OO[0];
var2 = OO[0]+(HH[1]-LL[1])*(P/100);
var3 = OO[0]-(HH[1]-LL[1])*(P/100);
plot1(var1,"dayopen");
plot2(var2,"25");
plot3(var3,"25");
2.
input : len(0.25), len1(2.7),n(20),tcount(2);
var: entry(0);
var : cnt(0);
Array : OO[10](0),HH[10](0),LL[10](0);
if Bdate != Bdate[1] Then{
OO[0] = O;
HH[0] = H;
LL[0] = L;
for cnt = 1 to 9{
OO[cnt] = OO[cnt-1][1];
HH[cnt] = HH[cnt-1][1];
LL[cnt] = LL[cnt-1][1];
}
}
if H > HH[0] then
HH[0] = H;
if L < LL[0] then
LL[0] = L;
var1 = HH[1]-LL[1];
if bdate <> bdate[1] Then {
entry = 0;
}
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
entry = entry+1;
Condition1 = date==exitdate(1) And MarketPosition(1) == 1;
Condition2 = date==exitdate(1) And MarketPosition(1) == -1;
if stime >= 170000 or stime < 160000 then {
if entry < tcount and Condition1 == false and MarketPosition <> 1 Then
buy("매수", atstop, OO[0]+var1*len);
if entry < tcount and Condition2 == false and MarketPosition <> -1 Then
sell("매도", atstop, OO[0]-var1*len);
}
//청산
If marketposition == 1 Then {
exitlong("매수청산",Atstop,highest(high,barssinceentry+1)-atr(n)*len1);
}
if MarketPosition == -1 then{
exitshort("매도청산",Atstop,lowest(low,barssinceentry+1)+atr(n)*len1);
}
if stime == 160000 or (stime > 160000 and stime[1] < 160000) Then{
exitlong();
ExitShort();
}
3.
input : len(0.25), len1(2.7),n(20),tcount(2);
var: entry(0);
var : cnt(0);
Array : OO[10](0),HH[10](0),LL[10](0);
if Bdate != Bdate[1] Then{
OO[0] = O;
HH[0] = H;
LL[0] = L;
for cnt = 1 to 9{
OO[cnt] = OO[cnt-1][1];
HH[cnt] = HH[cnt-1][1];
LL[cnt] = LL[cnt-1][1];
}
}
if H > HH[0] then
HH[0] = H;
if L < LL[0] then
LL[0] = L;
var1 = HH[1]-LL[1];
if bdate <> bdate[1] Then {
entry = 0;
}
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
entry = entry+1;
Condition1 = date==exitdate(1) And MarketPosition(1) == 1;
Condition2 = date==exitdate(1) And MarketPosition(1) == -1;
if stime >= 170000 or stime < 160000 then {
if entry < 1 and Condition1 == false and MarketPosition <> 1 Then
buy("매수1", atstop, OO[0]+var1*len);
if entry < 1 and Condition2 == false and MarketPosition <> -1 Then
sell("매도1", atstop, OO[0]-var1*len);
if MarketPosition == 0 and MarketPosition(1) == 1 and entry == 1 Then
buy("매수2", atstop, HH[0]+PriceScale);
if MarketPosition == 0 and MarketPosition(1) == -1 and entry == 1 Then
sell("매도2", atstop, LL[0]-PriceScale);
}
//청산
If marketposition == 1 Then {
exitlong("매수청산",Atstop,highest(high,barssinceentry+1)-atr(n)*len1);
}
if MarketPosition == -1 then{
exitshort("매도청산",Atstop,lowest(low,barssinceentry+1)+atr(n)*len1);
}
if stime == 160000 or (stime > 160000 and stime[1] < 160000) Then{
exitlong();
ExitShort();
}
즐거운 하루되세요
> 베드로 님이 쓴 글입니다.
> 제목 : 문의드립니다
> 안녕하세요
43027과관련하여
지표식및 시스템식이 이상합니다
지표식은 작성되지않고 시스템식은 17시10분에서 매수매도청산발생
시작시간 17시제외하면 날자변경선에서 매수매도청산
다시한번검토부탁드립니다
========================================
식수정후 그시스템에 아래조건을 추가하여 별도로 시스템식 부탁드립니다.
기존시스템식1개
조건추가시스템식1개
총 2개 부탁드립니다
기존수식에서 매매횟수및 같은방향 진입제어가 되어있는데요
여기 다음수식을 추가하고자합니다.
재매수조건 = 당일 매수청산이 한번 발생한적이 있으면 당일 최고점돌파시매수
매매횟수 1회만발생하게해주세요.
그러면 기존수식에서 매수 1회 그리고 재매수에서 1회
당일 매수포지션에서만 총 2번 발생되게해주세요.
재매도조건 = 재매수반대.
감사합니다.