커뮤니티
청산식 수정좀 요청드립니다.
2014-02-06 23:04:47
138
글번호 72286
14시37분이 지나고,
- 매수 포지션은 호가이평오실레이터가 파란색(전봉보다 작아짐)이면 청산
- 매도 포지션은 호가이평오실레이터가 빨간색(전봉보다 커짐)이면 청산
하는 청산식을 추가했는데 작동하지 않습니다.
if MarketPosition == 1 and stime > 143700 and Var10 < Var10[1] then ExitLong("1신호마감");
if MarketPosition == -1 and stime > 143700 and Var10 > Var10[1] then Exitshort("-1신호마감");
요 부분인데요... 이유를 알려주세요 ㅠㅠ
=======================================================================================
## 변수설정
inputs : 당일청산시간(150310),hoga_p(4);;
var10 = ema(bids,hoga_p)-ema(asks,hoga_p);
## 진입
if MarketPosition == 0 and stime < 130000 Then
{
if bids > asks then Buy("매수");
if bids < asks then Sell("매도");
}
# 청산
if MarketPosition == 1 and stime > 100000 and BarsSinceEntry(0) > 20 and crossdown(ema(c,5),ema(c,20)) then ExitLong("1청산");
if MarketPosition == -1 and stime > 100000 and BarsSinceEntry(0) > 20 and crossup(ema(c,5),ema(c,20)) then ExitShort("-1청산");
if MarketPosition == 1 and stime > 143700 and Var10 < Var10[1] then ExitLong("1신호마감");
if MarketPosition == -1 and stime > 143700 and Var10 > Var10[1] then Exitshort("-1신호마감");
SetStopTrailing(0.01,2.1,PointStop);
setstoploss(1.5,PointStop);
SetStopEndofday(당일청산시간);
답변 3
예스스탁 예스스탁 답변
2014-02-07 10:48:16
안녕하세요
예스스탁입니다.
해당식 정상적으로 작동하는 식입니다.
첨부된 그림은 선물 1분봉 차트에 적용한 리포트입니다.
거래내역에서 청산이름 선택하면 해당 이름의 청산 발생위치 보실수 있습니다.
즐거운 하루되세요
> 피니트 님이 쓴 글입니다.
> 제목 : 청산식 수정좀 요청드립니다.
> 14시37분이 지나고,
- 매수 포지션은 호가이평오실레이터가 파란색(전봉보다 작아짐)이면 청산
- 매도 포지션은 호가이평오실레이터가 빨간색(전봉보다 커짐)이면 청산
하는 청산식을 추가했는데 작동하지 않습니다.
if MarketPosition == 1 and stime > 143700 and Var10 < Var10[1] then ExitLong("1신호마감");
if MarketPosition == -1 and stime > 143700 and Var10 > Var10[1] then Exitshort("-1신호마감");
요 부분인데요... 이유를 알려주세요 ㅠㅠ
=======================================================================================
## 변수설정
inputs : 당일청산시간(150310),hoga_p(4);;
var10 = ema(bids,hoga_p)-ema(asks,hoga_p);
## 진입
if MarketPosition == 0 and stime < 130000 Then
{
if bids > asks then Buy("매수");
if bids < asks then Sell("매도");
}
# 청산
if MarketPosition == 1 and stime > 100000 and BarsSinceEntry(0) > 20 and crossdown(ema(c,5),ema(c,20)) then ExitLong("1청산");
if MarketPosition == -1 and stime > 100000 and BarsSinceEntry(0) > 20 and crossup(ema(c,5),ema(c,20)) then ExitShort("-1청산");
if MarketPosition == 1 and stime > 143700 and Var10 < Var10[1] then ExitLong("1신호마감");
if MarketPosition == -1 and stime > 143700 and Var10 > Var10[1] then Exitshort("-1신호마감");
SetStopTrailing(0.01,2.1,PointStop);
setstoploss(1.5,PointStop);
SetStopEndofday(당일청산시간);
피니트
2014-02-07 11:59:46
다시 해 보니 참조데이터가 분봉일 때는 잘 되는데
300틱으로 할 때는 잘 안됩니다. 특별한 이유가 있나요?? ㅠㅠ
예스스탁 예스스탁 답변
2014-02-07 12:54:06
안녕하세요
예스스탁딥니다.
300틱 차트에서도 신호 발생합니다.
해당식 참조데이터와 관계가 없습니다.
첨부된 그림은 주종목 300틱에 적용한 그림입니다.
즐거운 하루되세요
> 피니트 님이 쓴 글입니다.
> 제목 : 재질문 : 참조데이터를 300틱으로 하니 잘 안됩니다.
> 다시 해 보니 참조데이터가 분봉일 때는 잘 되는데
300틱으로 할 때는 잘 안됩니다. 특별한 이유가 있나요?? ㅠㅠ