예스스탁
예스스탁 답변
2020-08-06 11:23:19
안녕하세요
예스스탁입니다.
각 진입식에 MarketPosition == 0을 지정하시면 청산후에 무포지션일때만 진입합니다.
2번 내용은 기존 수식에 이미 처리되어 있습니다.
n1과 n2변수로 지정하시면 됩니다.
전봉음봉의 시가보다 종가가 n1틱(외부변수) 이상 큰 양봉에 매수
전봉양봉의 시가보다 종가가 n2틱(외부변수) 이상 작은 음봉에 매도
정확히 지정한 틱수에 종가가 긑나는 것을 의미하시면 ==로 변경하시면 됩니다.
아래식은 ==로 변경해 드립니다.
1
input : P1(5),P2(20);
input : n1(1),n2(2),익절틱수(50),손절틱수(50),진입횟수(0);
var : entry(0);
var1 = ma(C,P1);
Var2 = ma(C,P2);
if Bdate != Bdate[1] Then
entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == 0 and TotalTrades > TotalTrades[1]) Then
entry = entry + 1;
if MarketPosition == 0
and var1 < Var2
and C > O and C == O[1]+PriceScale*n1
and C[1] < O[1]
and entry < 진입횟수 Then
Buy("b");
if MarketPosition == 0
and var1 > Var2
and C < O and C == O[1]-PriceScale*n2
and C[1] > O[1]
and entry < 진입횟수 Then
Sell("s");
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
2
input : n1(1),n2(2),익절틱수(50),손절틱수(50),진입횟수(0);
var : entry(0);
if Bdate != Bdate[1] Then
entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == 0 and TotalTrades > TotalTrades[1]) Then
entry = entry + 1;
if MarketPosition == 0
and C > O and C >= O[1]+PriceScale*n1
and C[1] < O[1]
and entry < 진입횟수 Then
Buy("b");
if MarketPosition == 0
and C < O and C <= O[1]-PriceScale*n2
and C[1] > O[1]
and entry < 진입횟수 Then
Sell("s");
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
즐거운 하루되세요
> 대구어린울프 님이 쓴 글입니다.
> 제목 : 수정 부탁드립니다.
> 안녕하세요? 아래와같이 답변을 받았습니다.
수정하고싶은 부분이 있어 부탁드립니다.
1. 교차매매가 되지않고 현재포지션 청산후 다음신호발생시 진입으로 바꾸고싶습니다.
2. 진입신호를 조금 바꾸고싶습니다.
진입 : 전봉음봉의 시가보다 종가가 1틱(외부변수) 큰 양봉에 매수
전봉양봉의 시가보다 종가가 2틱(외부변수) 작은 음봉에 매도
감사합니다.
------------------------------------------------------------------------------------
안녕하세요
예스스탁입니다.
1
input : P1(5),P2(20);
input : n1(1),n2(2),익절틱수(50),손절틱수(50),진입횟수(0);
var : entry(0);
var1 = ma(C,P1);
Var2 = ma(C,P2);
if Bdate != Bdate[1] Then
entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == 0 and TotalTrades > TotalTrades[1]) Then
entry = entry + 1;
if MarketPosition <= 0
and var1 < Var2
and C > O and C >= O[1]+PriceScale*n1
and C[1] < O[1]
and entry < 진입횟수 Then
Buy("b");
if MarketPosition >= 0
and var1 > Var2
and C < O and C <= O[1]-PriceScale*n2
and C[1] > O[1]
and entry < 진입횟수 Then
Sell("s");
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
2
input : n1(1),n2(2),익절틱수(50),손절틱수(50),진입횟수(0);
var : entry(0);
if Bdate != Bdate[1] Then
entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == 0 and TotalTrades > TotalTrades[1]) Then
entry = entry + 1;
if MarketPosition <= 0
and C > O and C >= O[1]+PriceScale*n1
and C[1] < O[1]
and entry < 진입횟수 Then
Buy("b");
if MarketPosition >= 0
and C < O and C <= O[1]-PriceScale*n2
and C[1] > O[1]
and entry < 진입횟수 Then
Sell("s");
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
즐거운 하루되세요
> 대구어린울프 님이 쓴 글입니다.
> 제목 : 수식 작성 부탁드립니다.
> 안녕하세요?
수식작성 부탁드립니다.
두가지인데, 이동평균선 유무의 차이만 있을뿐 동일합니다.
감사합니다.
1) 이동평균선 2가지(외부변수), 정배열에서 매도 역배열에서 매수
진입 : 전봉음봉의 시가보다 1틱(외부변수) 큰 양봉에 매수
전봉양봉의 시가보다 2틱(외부변수) 작은 음봉에 매도
청산 : 익절/손절 (외부변수)
횟수 : 하루매매횟수 (외부변수)
2) 이동평균선 없음
진입 : 전봉음봉의 시가보다 1틱(외부변수) 큰 양봉에 매수
전봉양봉의 시가보다 2틱(외부변수) 작은 음봉에 매도
청산 : 익절/손절 (외부변수)
횟수 : 하루매매횟수 (외부변수)