첨부 이미지
그림1
첫번째)
kospi선물
if 미결제 이동평균선 5 crosss up 미결제 이동평균선 10 and
거래량 이동평균선 5 crosss up 거래량 이동평균선 10 then
buy();
두번째)
첨부파일은 아래수식으로 시뮬레이션한 결과입니다.
리버스 거래를 원해서 조합해보았는데
buy는 피라미딩이 3개가 되는데
sell 진입은 피라미딩이 되지 않습니다.
동일한 컨셉의 리버스 거래를 원합니다.
수식 살펴주세요.
input : 일(0.30),이(0.30),삼(0.30);
input : 사(0.30),오(0.30),육(0.30);
var : b1(0,Data2),b2(0,data3),gap1(0,Data2);
b1 = Data2((C-CloseD(1))/CloseD(1)*100);
b2 = Data3((C-CloseD(1))/CloseD(1)*100);
gap1 = b1-b2;
if MarketPosition == 0 and gap1 > 일 then
buy("b1");
if MarketPosition == 1 and MaxEntries == 1 and gap1 > 이 then
buy("b2");
if MarketPosition == 1 and MaxEntries == 2 and gap1 > 삼 then
buy("b3");
if MarketPosition == 0 and gap1 < 사 then
Sell("s1");
if MarketPosition == 1 and MaxEntries == 1 and gap1 < 오 then
Sell("s2");
if MarketPosition == 1 and MaxEntries == 2 and gap1 < 육 then
Sell("s3");
답변 1
예스스탁
예스스탁 답변
2021-02-25 17:58:59
안녕하세요
예스스탁입니다.
1
input : P1(5),P2(20);
var1 = ma(OI,P1);
var2 = ma(OI,P2);
if CrossUp(var1,Var2) Then
Buy();
if CrossDown(var1,Var2) Then
Sell();
2
식을 수정했습니다. 포지션이 잘못지정되어 있었습니다.
input : 일(0.30),이(0.30),삼(0.30);
input : 사(0.30),오(0.30),육(0.30);
var : b1(0,Data2),b2(0,data3),gap1(0,Data2);
b1 = Data2((C-CloseD(1))/CloseD(1)*100);
b2 = Data3((C-CloseD(1))/CloseD(1)*100);
gap1 = b1-b2;
if MarketPosition == 0 and gap1 > 일 then
buy("b1");
if MarketPosition == 1 and MaxEntries == 1 and gap1 > 이 then
buy("b2");
if MarketPosition == 1 and MaxEntries == 2 and gap1 > 삼 then
buy("b3");
if MarketPosition == 0 and gap1 < 사 then
Sell("s1");
if MarketPosition == -1 and MaxEntries == 1 and gap1 < 오 then
Sell("s2");
if MarketPosition == -1 and MaxEntries == 2 and gap1 < 육 then
Sell("s3");
즐거운 하루되세요
> 목마와숙녀 님이 쓴 글입니다.
> 제목 : 문의 2가지
>
첫번째)
kospi선물
if 미결제 이동평균선 5 crosss up 미결제 이동평균선 10 and
거래량 이동평균선 5 crosss up 거래량 이동평균선 10 then
buy();
두번째)
첨부파일은 아래수식으로 시뮬레이션한 결과입니다.
리버스 거래를 원해서 조합해보았는데
buy는 피라미딩이 3개가 되는데
sell 진입은 피라미딩이 되지 않습니다.
동일한 컨셉의 리버스 거래를 원합니다.
수식 살펴주세요.
input : 일(0.30),이(0.30),삼(0.30);
input : 사(0.30),오(0.30),육(0.30);
var : b1(0,Data2),b2(0,data3),gap1(0,Data2);
b1 = Data2((C-CloseD(1))/CloseD(1)*100);
b2 = Data3((C-CloseD(1))/CloseD(1)*100);
gap1 = b1-b2;
if MarketPosition == 0 and gap1 > 일 then
buy("b1");
if MarketPosition == 1 and MaxEntries == 1 and gap1 > 이 then
buy("b2");
if MarketPosition == 1 and MaxEntries == 2 and gap1 > 삼 then
buy("b3");
if MarketPosition == 0 and gap1 < 사 then
Sell("s1");
if MarketPosition == 1 and MaxEntries == 1 and gap1 < 오 then
Sell("s2");
if MarketPosition == 1 and MaxEntries == 2 and gap1 < 육 then
Sell("s3");