커뮤니티
수식 문의 드립니다
2016-11-24 09:42:07
101
글번호 104308
두번째 진입후 두시 청산이되는데요
세번째 신호가나오면 청산만 하고 매매종료하려 합니다 감사합니다
input : 시작시간(090300),당일청산시간(140000);
var : idx(0),entry(0),tt(0),t1(0),count(0);
var1 = ema(c,5);
var2 = ema(c,25);
# 당일진입횟수계산
count = 0 ;
for value1 = 0 to 10 {
if entrydate(value1) == date then count = count + 1 ;
}
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then {
idx = 0;
}
if stime >= 시작시간 and count < 2 Then{
idx = idx+1;
if idx == 1 && var1 > var2
Then buy ("a");
Else
if CrossUp(var1,var2)
then buy("b");
if idx == 1 && var1 < var2
Then sell("c");
Else
if crossdown(var1,var2)
Then sell("d");
}
SetStopEndofday(당일청산시간);
답변 1
예스스탁 예스스탁 답변
2016-11-24 11:44:01
안녕하세요
예스스탁입니다.
input : 시작시간(090300),당일청산시간(140000);
var : idx(0),entry(0),tt(0),t1(0),count(0);
var1 = ema(c,5);
var2 = ema(c,25);
# 당일진입횟수계산
count = 0 ;
for value1 = 0 to 10 {
if entrydate(value1) == date then
count = count + 1 ;
}
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then {
idx = 0;
}
if stime >= 시작시간 and count < 2 Then{
idx = idx+1;
if count < 2 Then{
if idx == 1 && var1 > var2
Then buy ("a");
Else
if CrossUp(var1,var2)
then buy("b");
if idx == 1 && var1 < var2
Then sell("c");
Else
if crossdown(var1,var2)
Then sell("d");
}
}
if count == 2 then{
if MarketPosition == 1 and var1 < var2 then
ExitLong("bx");
if MarketPosition == -1 and var1 > var2 Then
ExitShort("sx");
}
SetStopEndofday(당일청산시간);
즐거운 하루되세요
> 비상8 님이 쓴 글입니다.
> 제목 : 수식 문의 드립니다
> 두번째 진입후 두시 청산이되는데요
세번째 신호가나오면 청산만 하고 매매종료하려 합니다 감사합니다
input : 시작시간(090300),당일청산시간(140000);
var : idx(0),entry(0),tt(0),t1(0),count(0);
var1 = ema(c,5);
var2 = ema(c,25);
# 당일진입횟수계산
count = 0 ;
for value1 = 0 to 10 {
if entrydate(value1) == date then count = count + 1 ;
}
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then {
idx = 0;
}
if stime >= 시작시간 and count < 2 Then{
idx = idx+1;
if idx == 1 && var1 > var2
Then buy ("a");
Else
if CrossUp(var1,var2)
then buy("b");
if idx == 1 && var1 < var2
Then sell("c");
Else
if crossdown(var1,var2)
Then sell("d");
}
SetStopEndofday(당일청산시간);