커뮤니티
시스템식
2011-02-13 15:10:57
870
글번호 35666
아래식의 매수 매도를 다음과 같이 변형해 주세요.
----------------------------------------------------------------------
1)
매수:매수 시그날이 나오면 매도 시그날이 나오기전까지 매일 종가와 시작가로
별도매수하기 시작함 (피라미딩 가능)
매도: 매수한 포지션을 전부 매도청산
if crossup(ma(v,3),ma(v,10)) and data2(countif(C>C[1],3)) == 3 Then
buy();
if CrossDown(ma(v,3),ma(v,10)) and data2(countif(C<C[1],3)) == 3 Then
sell();
-------------------------------------------------------------------------
2)
매도후 중복된 매수 시그날이 나오지 않도록 하루 한번만 나오게 변형
if stime >= 90000 and data2(C) > 0 then
buy();
if stime >= 90000 and data2(C) < 0 then
sell();
답변 1
예스스탁 예스스탁 답변
2011-02-14 09:43:15
안녕하세요
예스스탁입니다.
1.
종가와 시작가로 피라미딩을 한다고 하신 부분은 정확한 의미를 모르겠습니다.
해당 식에서는 한봉에 하나의 신호만 가능합니다.
해당조건이후 매수청산 전까지 매봉 추가매수하는 식으로 변경했습니다.
if MarketPosition == 0 and crossup(ma(v,3),ma(v,10)) and data2(countif(C>C[1],3)) == 3 Then
buy();
if MarketPosition == 1 Then
buy();
if CrossDown(ma(v,3),ma(v,10)) and data2(countif(C<C[1],3)) == 3 Then
ExitLong();
2.
if dayindex == 0 Then
Condition1 = false;
if stime >= 90000 and data2(C) > 0 and Condition1 == false then{
buy();
Condition1 = true;
}
if stime >= 90000 and data2(C) < 0 then
ExitLong();
즐거운 하루되세요
> erwe343 님이 쓴 글입니다.
> 제목 : 시스템식
> 아래식의 매수 매도를 다음과 같이 변형해 주세요.
----------------------------------------------------------------------
1)
매수:매수 시그날이 나오면 매도 시그날이 나오기전까지 매일 종가와 시작가로
별도매수하기 시작함 (피라미딩 가능)
매도: 매수한 포지션을 전부 매도청산
if crossup(ma(v,3),ma(v,10)) and data2(countif(C>C[1],3)) == 3 Then
buy();
if CrossDown(ma(v,3),ma(v,10)) and data2(countif(C<C[1],3)) == 3 Then
sell();
-------------------------------------------------------------------------
2)
매도후 중복된 매수 시그날이 나오지 않도록 하루 한번만 나오게 변형
if stime >= 90000 and data2(C) > 0 then
buy();
if stime >= 90000 and data2(C) < 0 then
sell();
다음글