커뮤니티
문의드립니다.
2015-03-02 14:55:22
142
글번호 83581
smi지표로 시스템을 만들고 싶읍니다.
input : Period1(13),Period2(25),Period3(2),Length1(26),Length2(50),Length3(2);
var : StMomentum1(0),StMomentum2(0);
StMomentum1 = SMI(Period1,Period2,Period3);
StMomentum2 = SMI(Length1,Length2,Length3);
if StMomentum1 > StMomentum1[1] Then
Plot1(StMomentum1, "매수잔량이평",RED);
Else
Plot1(StMomentum1, "매수잔량이평",BLUE);
if StMomentum2 > StMomentum2[1] Then
Plot2(StMomentum2, "매도잔량이평",LMAGENTA);
Else
Plot2(StMomentum2, "매도잔량이평",YELLOW);
PlotBaseLine1(50,"과열");
PlotBaseLine2(-50,"침체");
지표식인데..
1. 매수식
** 매수는 plot2가 매수전환되면 매수진입 해주시고 청산은 plot1이 매도로 돌아설때.
** 청산후 plot2가 매수유지이며 plot1이 다시 매수로 전환되면 매수.
2.매도식
매수식 반대.
미리 감사드립니다.
답변 1
예스스탁 예스스탁 답변
2015-03-02 18:18:09
안녕하세요
예스스탁입니다.
input : Period1(13),Period2(25),Period3(2),Length1(26),Length2(50),Length3(2);
var : StMomentum1(0),StMomentum2(0),T1(0),T2(0);
StMomentum1 = SMI(Period1,Period2,Period3);
StMomentum2 = SMI(Length1,Length2,Length3);
if StMomentum1 > StMomentum1[1] Then
T1 = 1;
if StMomentum1 < StMomentum1[1] Then
T1 = -1;
if StMomentum2 > StMomentum2[1] Then
T2 = 1;
if StMomentum2 < StMomentum2[1] Then
T2 = -1;
if MarketPosition <= 0 and T2 ==1 and T2[1] != 1 Then
buy("b");
if MarketPosition == 1 and T1 == -1 and T1[1] != -1 Then
exitlong("bx");
if MarketPosition == 0 and MarketPosition(1) == 1 and T1 == 1 and T1[1] != 1 Then
buy("bb");
if MarketPosition >= 0 and T2 == -1 and T2[1] != -1 Then
sell("s");
if MarketPosition == -1 and T1 == 1 and T1[1] != 1 Then
ExitShort("sx");
if MarketPosition == 0 and MarketPosition(1) == -1 and T1 == -1 and T1[1] != -1 Then
sell("ss");
즐거운 하루되세요
> vmfha 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> smi지표로 시스템을 만들고 싶읍니다.
input : Period1(13),Period2(25),Period3(2),Length1(26),Length2(50),Length3(2);
var : StMomentum1(0),StMomentum2(0);
StMomentum1 = SMI(Period1,Period2,Period3);
StMomentum2 = SMI(Length1,Length2,Length3);
if StMomentum1 > StMomentum1[1] Then
Plot1(StMomentum1, "매수잔량이평",RED);
Else
Plot1(StMomentum1, "매수잔량이평",BLUE);
if StMomentum2 > StMomentum2[1] Then
Plot2(StMomentum2, "매도잔량이평",LMAGENTA);
Else
Plot2(StMomentum2, "매도잔량이평",YELLOW);
PlotBaseLine1(50,"과열");
PlotBaseLine2(-50,"침체");
지표식인데..
1. 매수식
** 매수는 plot2가 매수전환되면 매수진입 해주시고 청산은 plot1이 매도로 돌아설때.
** 청산후 plot2가 매수유지이며 plot1이 다시 매수로 전환되면 매수.
2.매도식
매수식 반대.
미리 감사드립니다.