커뮤니티
64494질문자 입니다.~문의 드립니다.
2019-10-15 16:34:31
215
글번호 132809
제가 문의 드린내용과 조금 달라^^;; 다시 문의 드립니다.
매수조건 smi1>smi2>smi3 일때 smi4>smi5>smi6>smi7도 만족할때 볼린저 밴드 하한선터치시진입
매수 청산 조건 볼린져밴드 하단 터치시
매도조건 smi1<smi2<smi3 일때 smi4<smi5<smi6<smi7도 만족할때 볼린저 밴드 상한선 터치시진입
매도 청산 조건 볼린져밴드 상단 터치시
저에게 주신 식은 smi1 smi2 smi3 만족시 진입도 되고 smi4~7도 만족시 또 진입이되는
식입니다. 제가 바라는 식은 위의 2가지의 조건이 모두 만족했을시 진입신호가 뜨는것입니다.
저에게 주신 식은 아래와 같습니다.
input : Period11(1),Period12(2),Period13(3);
input : Period21(4),Period22(5),Period23(6);
input : Period31(7),Period32(8),Period33(9);
input : Period41(10),Period42(11),Period43(12);
input : Period51(13),Period52(14),Period53(15);
input : Period61(16),Period62(17),Period63(18);
input : Period71(19),Period72(20),Period73(21);
Input : Period(20), MultiD(2);
var : SMI1(0),SMI2(0),SMI3(0);
var : Bcond1(false),Scond1(false);
var : SMI4(0),SMI5(0),SMI6(0),SMI7(0);
var : Bcond2(false),Scond2(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);
SMI4 = SMI(Period41,Period42,Period43);
SMI5 = SMI(Period51,Period52,Period53);
SMI6 = SMI(Period61,Period62,Period63);
SMI7 = SMI(Period71,Period72,Period73);
BBmd = ma(C,Period);
BBup = BollBandUp(Period,MultiD);
BBdn = BollBandDown(Period,MultiD);
Bcond1 = SMI1 > SMI2 and SMI2 > SMI3;
Scond1 = SMI1 < SMI2 and SMI2 < SMI3;
Bcond2 = SMI4 > SMI5 and SMI5 > SMI6 and SMI6 > SMI7;
Scond2 = SMI4 < SMI5 and SMI5 < SMI6 and SMI6 < SMI7;
if MarketPosition <= 0 then
{
if Bcond1 == true and Bcond1[1] == false Then
{
T = 1;
}
if T == 1 and Bcond1 == true Then
buy("b1",atlimit,BBdn);
}
if MarketPosition <= 0 then
{
if Bcond2 == true and Bcond2[1] == false Then
{
T = 1;
}
if T == 1 and Bcond2 == true Then
buy("b2",atlimit,BBdn);
}
if MarketPosition >= 0 then
{
if Scond1 == true and Scond1[1] == false Then
{
T = -1;
}
if T == -1 and Scond1 == true then
sell("s",Atlimit,BBup);
}
if MarketPosition >= 0 then
{
if Scond2 == true and Scond2[1] == false Then
{
T = -1;
}
if T == -1 and Scond2 == true then
sell("s2",Atlimit,BBup);
}
if MarketPosition == 1 then
{
exitlong("bx",atlimit,bbup);
}
if MarketPosition == -1 then
{
ExitShort("sx",atlimit,bbdn);
}
답변 1
예스스탁 예스스탁 답변
2019-10-17 09:21:02
안녕하세요
예스스탁입니다.
input : Period11(1),Period12(2),Period13(3);
input : Period21(4),Period22(5),Period23(6);
input : Period31(7),Period32(8),Period33(9);
input : Period41(10),Period42(11),Period43(12);
input : Period51(13),Period52(14),Period53(15);
input : Period61(16),Period62(17),Period63(18);
input : Period71(19),Period72(20),Period73(21);
Input : Period(20), MultiD(2);
var : SMI1(0),SMI2(0),SMI3(0);
var : Bcond1(false),Scond1(false);
var : SMI4(0),SMI5(0),SMI6(0),SMI7(0);
var : BBmd(0),BBup(0),BBdn(0),T(0);
SMI1 = SMI(Period11,Period12,Period13);
SMI2 = SMI(Period21,Period22,Period23);
SMI3 = SMI(Period31,Period32,Period33);
SMI4 = SMI(Period41,Period42,Period43);
SMI5 = SMI(Period51,Period52,Period53);
SMI6 = SMI(Period61,Period62,Period63);
SMI7 = SMI(Period71,Period72,Period73);
BBmd = ma(C,Period);
BBup = BollBandUp(Period,MultiD);
BBdn = BollBandDown(Period,MultiD);
Bcond1 = SMI1 > SMI2 and SMI2 > SMI3 and SMI4 > SMI5 and SMI5 > SMI6 and SMI6 > SMI7;
Scond1 = SMI1 < SMI2 and SMI2 < SMI3 and SMI4 < SMI5 and SMI5 < SMI6 and SMI6 < SMI7;
if MarketPosition <= 0 then
{
if Bcond1 == true and Bcond1[1] == false Then
{
T = 1;
}
if T == 1 and Bcond1 == true Then
buy("b1",atlimit,BBdn);
}
if MarketPosition >= 0 then
{
if Scond1 == true and Scond1[1] == false Then
{
T = -1;
}
if T == -1 and Scond1 == true then
sell("s",Atlimit,BBup);
}
if MarketPosition == 1 then
{
exitlong("bx",atlimit,bbup);
}
if MarketPosition == -1 then
{
ExitShort("sx",atlimit,bbdn);
}
즐거운 하루되세요
> 진짜원칙매매 님이 쓴 글입니다.
> 제목 : 64494질문자 입니다.~문의 드립니다.
> 제가 문의 드린내용과 조금 달라^^;; 다시 문의 드립니다.
매수조건 smi1>smi2>smi3 일때 smi4>smi5>smi6>smi7도 만족할때 볼린저 밴드 하한선터치시진입
매수 청산 조건 볼린져밴드 하단 터치시
매도조건 smi1<smi2<smi3 일때 smi4<smi5<smi6<smi7도 만족할때 볼린저 밴드 상한선 터치시진입
매도 청산 조건 볼린져밴드 상단 터치시
저에게 주신 식은 smi1 smi2 smi3 만족시 진입도 되고 smi4~7도 만족시 또 진입이되는
식입니다. 제가 바라는 식은 위의 2가지의 조건이 모두 만족했을시 진입신호가 뜨는것입니다.
저에게 주신 식은 아래와 같습니다.
input : Period11(1),Period12(2),Period13(3);
input : Period21(4),Period22(5),Period23(6);
input : Period31(7),Period32(8),Period33(9);
input : Period41(10),Period42(11),Period43(12);
input : Period51(13),Period52(14),Period53(15);
input : Period61(16),Period62(17),Period63(18);
input : Period71(19),Period72(20),Period73(21);
Input : Period(20), MultiD(2);
var : SMI1(0),SMI2(0),SMI3(0);
var : Bcond1(false),Scond1(false);
var : SMI4(0),SMI5(0),SMI6(0),SMI7(0);
var : Bcond2(false),Scond2(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);
SMI4 = SMI(Period41,Period42,Period43);
SMI5 = SMI(Period51,Period52,Period53);
SMI6 = SMI(Period61,Period62,Period63);
SMI7 = SMI(Period71,Period72,Period73);
BBmd = ma(C,Period);
BBup = BollBandUp(Period,MultiD);
BBdn = BollBandDown(Period,MultiD);
Bcond1 = SMI1 > SMI2 and SMI2 > SMI3;
Scond1 = SMI1 < SMI2 and SMI2 < SMI3;
Bcond2 = SMI4 > SMI5 and SMI5 > SMI6 and SMI6 > SMI7;
Scond2 = SMI4 < SMI5 and SMI5 < SMI6 and SMI6 < SMI7;
if MarketPosition <= 0 then
{
if Bcond1 == true and Bcond1[1] == false Then
{
T = 1;
}
if T == 1 and Bcond1 == true Then
buy("b1",atlimit,BBdn);
}
if MarketPosition <= 0 then
{
if Bcond2 == true and Bcond2[1] == false Then
{
T = 1;
}
if T == 1 and Bcond2 == true Then
buy("b2",atlimit,BBdn);
}
if MarketPosition >= 0 then
{
if Scond1 == true and Scond1[1] == false Then
{
T = -1;
}
if T == -1 and Scond1 == true then
sell("s",Atlimit,BBup);
}
if MarketPosition >= 0 then
{
if Scond2 == true and Scond2[1] == false Then
{
T = -1;
}
if T == -1 and Scond2 == true then
sell("s2",Atlimit,BBup);
}
if MarketPosition == 1 then
{
exitlong("bx",atlimit,bbup);
}
if MarketPosition == -1 then
{
ExitShort("sx",atlimit,bbdn);
}