커뮤니티
5069번 질문자 입니다. 재 매수가 안됩니다.
2006-08-12 16:11:07
1314
글번호 10612
스탑로스만 되고, 2차부터 4번째봉 시가+0.1 로써 매수해야 하는데, 2,3,4..차 재 매수가 안됩니다. 그리고 매도쪽도 수식 부탁 드립니다.
감사합니다.
답변 1
예스스탁 예스스탁 답변
2006-08-14 11:36:00
안녕하세요
예스스탁입니다.
식을 수정해서 올려드립니다.
1.매수
if date != date[1] then
var3 = 0;
setstoploss(0.5,pointstop);
setstopendofday(1500);
if marketposition() == 0 and dayindex() == 3 and C > O then{
buy();
var1 = C;
}
if marketposition() == 0 and dayindex() > 3 and var3 < 4 then{
if crossup(c,var1+0.1) then{
buy();
var3 = var3 +1;
}
}
2. 매도
if date != date[1] then
var3 = 0;
setstoploss(0.5,pointstop);
setstopendofday(1500);
if marketposition() == 0 and dayindex() == 3 and C < O then{
sell();
var1 = C;
}
if marketposition() == 0 and dayindex() > 3 and var3 < 4 then{
if crossdown(c,var1-0.1) then{
sell();
var3 = var3 +1;
}
}
4. 매수+매도
if date != date[1] then
var3 = 0;
setstoploss(0.5,pointstop);
setstopendofday(1500);
if marketposition() == 0 and dayindex() == 3 and C > O then{
buy();
var1 = C;
}
if marketposition() == 0 and dayindex() > 3 and var3 < 4 then{
if crossdown(c,var1+0.1) then{
buy();
var3 = var3 +1;
}
}
if marketposition() == 0 and dayindex() == 3 and C < O then{
sell();
var1 = C;
}
if marketposition() == 0 and dayindex() > 3 and var3 < 4 then{
if crossdown(c,var1-0.1) then{
sell();
var3 = var3 +1;
}
}
즐거운 하루되세요
> CJ_coco 님이 쓴 글입니다.
> 제목 : 5069번 질문자 입니다. 재 매수가 안됩니다.
> 스탑로스만 되고, 2차부터 4번째봉 시가+0.1 로써 매수해야 하는데, 2,3,4..차 재 매수가 안됩니다. 그리고 매도쪽도 수식 부탁 드립니다.
감사합니다.