커뮤니티
문의드립니다.
2018-07-02 14:20:21
169
글번호 120211
볼린저밴드를 이용한 수식 부탁드립니다
1. 볼린저밴드 중앙선 기준으로 캔들봉이 중앙선을 물렸을경우 음봉 일경우 매도신호
양봉 일경우 매수신호 반대신호가 나오면 기존 계약수들은
청산후 반대신호진입
1-1 볼린저밴드 중앙성 기준으로 캔들봉이 중앙선을 확실히 내려온뒤 음봉 일경우 매도신호
반대는 매수신호 반대신호가 나오면 기존 계약수들은
청산후 반대신호진입
2. 진입 수량 조절 가능하게 부탁드립니다
예: 5계약 4계약 조절 가능하게.
3. 청산 각기 다른 조절 수를 부탁드립니다 (따로 조절 할수있게 부탁드립니다)
예) 1계약:20틱 청산 1계약:40틱 청산 1계약:60틱 청산 1계약 다음신호까지
4..시간 설정 10시 15분부터 오후 5시 이후 매매종료
.시간 설정 가능하게 부탁드립니다
수식 1번 하고 1-1 번 하고 쫌부탁드립니다
감사합니다.
답변 1
예스스탁 예스스탁 답변
2018-07-02 16:31:12
안녕하세요
예스스탁입니다.
1.
Input : Period(20), MultiD(2),vol(0);
input : Profit1(20),Profit2(40),Profit3(60);
input : 시작시간(101500),종료시간(170000);
var : BBmd(0),BBup(0),BBdn(0),Tcond(false);
if (sdate != sdate[1] and stime >= 시작시간) or
(sdate == sdate[1] and stime >= 시작시간 and stime[1] < 시작시간) Then
Tcond = true;
if (sdate != sdate[1] and stime >= 종료시간) or
(sdate == sdate[1] and stime >= 종료시간 and stime[1] < 종료시간) Then{
Tcond = false;
if MarketPosition == 1 Then
exitlong("bx");
if MarketPosition == -1 Then
ExitShort("sx");
}
BBmd = ma(C,Period);
BBup = BollBandUp(Period,MultiD);
BBdn = BollBandDown(Period,MultiD);
if H >= bbmd and bbmd >= L and Tcond == true Then
{
if C > O Then
buy("b",OnClose,def,vol);
if C < O Then
sell("s",OnClose,def,vol);
}
if MarketPosition == 1 then
{
ExitLong("bx1",atlimit,EntryPrice+PriceScale*Profit1,"",1,1);
ExitLong("bx2",atlimit,EntryPrice+PriceScale*Profit2,"",1,1);
ExitLong("bx3",atlimit,EntryPrice+PriceScale*Profit3,"",1,1);
}
if MarketPosition == -1 then
{
ExitShort("sx1",atlimit,EntryPrice-PriceScale*Profit1,"",1,1);
ExitShort("sx2",atlimit,EntryPrice-PriceScale*Profit2,"",1,1);
ExitShort("sx3",atlimit,EntryPrice-PriceScale*Profit3,"",1,1);
}
2
Input : Period(20), MultiD(2),vol(0);
input : Profit1(20),Profit2(40),Profit3(60);
input : 시작시간(101500),종료시간(170000);
var : BBmd(0),BBup(0),BBdn(0),Tcond(false);
if (sdate != sdate[1] and stime >= 시작시간) or
(sdate == sdate[1] and stime >= 시작시간 and stime[1] < 시작시간) Then
Tcond = true;
if (sdate != sdate[1] and stime >= 종료시간) or
(sdate == sdate[1] and stime >= 종료시간 and stime[1] < 종료시간) Then{
Tcond = false;
if MarketPosition == 1 Then
exitlong("bx");
if MarketPosition == -1 Then
ExitShort("sx");
}
BBmd = ma(C,Period);
BBup = BollBandUp(Period,MultiD);
BBdn = BollBandDown(Period,MultiD);
if Tcond == true Then
{
if L > BBmd and C > O Then
buy("b",OnClose,def,vol);
if H < BBmd and C < O Then
sell("s",OnClose,def,vol);
}
if MarketPosition == 1 then
{
ExitLong("bx1",atlimit,EntryPrice+PriceScale*Profit1,"",1,1);
ExitLong("bx2",atlimit,EntryPrice+PriceScale*Profit2,"",1,1);
ExitLong("bx3",atlimit,EntryPrice+PriceScale*Profit3,"",1,1);
}
if MarketPosition == -1 then
{
ExitShort("sx1",atlimit,EntryPrice-PriceScale*Profit1,"",1,1);
ExitShort("sx2",atlimit,EntryPrice-PriceScale*Profit2,"",1,1);
ExitShort("sx3",atlimit,EntryPrice-PriceScale*Profit3,"",1,1);
}
즐거운 하루되세요
> 곽민수 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> 볼린저밴드를 이용한 수식 부탁드립니다
1. 볼린저밴드 중앙선 기준으로 캔들봉이 중앙선을 물렸을경우 음봉 일경우 매도신호
양봉 일경우 매수신호 반대신호가 나오면 기존 계약수들은
청산후 반대신호진입
1-1 볼린저밴드 중앙성 기준으로 캔들봉이 중앙선을 확실히 내려온뒤 음봉 일경우 매도신호
반대는 매수신호 반대신호가 나오면 기존 계약수들은
청산후 반대신호진입
2. 진입 수량 조절 가능하게 부탁드립니다
예: 5계약 4계약 조절 가능하게.
3. 청산 각기 다른 조절 수를 부탁드립니다 (따로 조절 할수있게 부탁드립니다)
예) 1계약:20틱 청산 1계약:40틱 청산 1계약:60틱 청산 1계약 다음신호까지
4..시간 설정 10시 15분부터 오후 5시 이후 매매종료
.시간 설정 가능하게 부탁드립니다
수식 1번 하고 1-1 번 하고 쫌부탁드립니다
감사합니다.