커뮤니티
항상 수고가 많으십니다. 시스템 작성좀 도와주세요
2019-10-12 00:42:45
121
글번호 132722
저는 스톡으로 선을 만들어 사용하고있습니다. 기존식은 아래에 있는데 볼린져 벤드를 덧붙여 매매를 하고 싶습니다.
기존 매매 로직
input : Period11(1),Period12(2),Period13(3);
input : Period21(4),Period22(5),Period23(6);
input : Period31(7),Period32(8),Period33(9);
var : SMI1(0),SMI2(0),SMI3(0),Bcond(false),Scond(false);
SMI1 = SMI(Period11,Period12,Period13);
SMI2 = SMI(Period21,Period22,Period23);
SMI3 = SMI(Period31,Period32,Period33);
Bcond = SMI1 > SMI2 and SMI2 > SMI3 and SMI3 ;
Scond = SMI1 < SMI2 and SMI2 < SMI3 and SMI3;
if Bcond == true and Bcond[1] == false Then
buy();
if Scond == true and Scond[1] == false Then
sell();
매수 신호 : 위 식에서 매수신호 조건이 만들어지고 단가가 볼린져 밴드 하단에 왔을때 매수 진입
매수 청산 : 위식 매수진입후 볼린져 밴드 상단에서 청산
매도 신호 : 위 식에서 매도신호 조건이 만들어지고 단가가 볼린져 밴드 상단에 왔을때 매도 진입
매도 청산 : 위식에서 매도 진입후 볼린져 하단에서 청산
환절기니 감기조심하시고 항상 건강하십시요~
답변 1
예스스탁 예스스탁 답변
2019-10-14 09:16:18
안녕하세요
예스스탁입니다.
input : Period11(1),Period12(2),Period13(3);
input : Period21(4),Period22(5),Period23(6);
input : Period31(7),Period32(8),Period33(9);
Input : Period(20), MultiD(2);
var : SMI1(0),SMI2(0),SMI3(0),Bcond(false),Scond(false);
var : BBmd(0),BBup(0),BBdn(0),T(0);
SMI1 = SMI(Period11,Period12,Period13);
SMI2 = SMI(Period21,Period22,Period23);
SMI3 = SMI(Period31,Period32,Period33);
BBmd = ma(C,Period);
BBup = BollBandUp(Period,MultiD);
BBdn = BollBandDown(Period,MultiD);
Bcond = SMI1 > SMI2 and SMI2 > SMI3 and SMI3 ;
Scond = SMI1 < SMI2 and SMI2 < SMI3 and SMI3;
if MarketPosition <= 0 then
{
if Bcond == true and Bcond[1] == false Then
{
T = 1;
}
if T == 1 Then
buy("b",atlimit,BBdn);
}
if MarketPosition >= 0 then
{
if Scond == true and Scond[1] == false Then
{
T = -1;
}
if T == -1 then
sell("s",Atlimit,BBup);
}
if MarketPosition == 1 then
{
exitlong("bx",atlimit,bbup);
}
if MarketPosition == -1 then
{
ExitShort("sx",atlimit,bbdn);
}
즐거운 하루되세요
> 진짜원칙매매 님이 쓴 글입니다.
> 제목 : 항상 수고가 많으십니다. 시스템 작성좀 도와주세요
> 저는 스톡으로 선을 만들어 사용하고있습니다. 기존식은 아래에 있는데 볼린져 벤드를 덧붙여 매매를 하고 싶습니다.
기존 매매 로직
input : Period11(1),Period12(2),Period13(3);
input : Period21(4),Period22(5),Period23(6);
input : Period31(7),Period32(8),Period33(9);
var : SMI1(0),SMI2(0),SMI3(0),Bcond(false),Scond(false);
SMI1 = SMI(Period11,Period12,Period13);
SMI2 = SMI(Period21,Period22,Period23);
SMI3 = SMI(Period31,Period32,Period33);
Bcond = SMI1 > SMI2 and SMI2 > SMI3 and SMI3 ;
Scond = SMI1 < SMI2 and SMI2 < SMI3 and SMI3;
if Bcond == true and Bcond[1] == false Then
buy();
if Scond == true and Scond[1] == false Then
sell();
매수 신호 : 위 식에서 매수신호 조건이 만들어지고 단가가 볼린져 밴드 하단에 왔을때 매수 진입
매수 청산 : 위식 매수진입후 볼린져 밴드 상단에서 청산
매도 신호 : 위 식에서 매도신호 조건이 만들어지고 단가가 볼린져 밴드 상단에 왔을때 매도 진입
매도 청산 : 위식에서 매도 진입후 볼린져 하단에서 청산
환절기니 감기조심하시고 항상 건강하십시요~
다음글
이전글