커뮤니티
추세매매식을 예스트레이더에서 활용할려면?
2015-08-03 23:21:50
499
글번호 89120
==>아래 추세매매식을 예스트레이터 yeslanguage편집기에 넣으니 알수없는 문자로
검증이 않되고 있슴당
수정해야될부분과 어떤매매스타일인지 간략하게 설명 부탁드립니다
----------------------------------------------------------
yestrader에서 6132 예스스팟 편집기에서는 정상인데요
해외차이나50과 미국 s&ps나스닥100,s&p500은 있는데===>오일,골드,유로,홍콩항생지수는 없어요--->어디에서 찾아야 하는지요--->yestrader에는 없고 매매할수 없는지요?
input:b_time1(000001),e_time1(030000),목표청산1(0.3),
stoK_p11(50),stoK_p12(50),stoK_p13(10),
ma_p11(10),ma_p12(5),ma_p13(15),ma_p14(250),
ma_p15(20),ma_p16(10),ma_p17(38),
b_time2(030001),e_time2(180000),목표청산2(0.31),
stoK_p21(50),stoK_p22(50),stoK_p23(10),
ma_p21(25),ma_p22(5),ma_p23(15),ma_p24(127),
ma_p25(68),ma_p26(10),ma_p27(15),
b_time3(180001),e_time3(240000),목표청산3(0.43),
stoK_p31(50),stoK_p32(50),stoK_p33(10),
ma_p31(25),ma_p32(5),ma_p33(15),ma_p34(102),
ma_p35(40),ma_p36(10),ma_p37(15);
Var:stoK(0),stoD(0),TRIXv(0),TRIXsig(0);
If b_time1 <= Time and Time <= e_time1 Then
{
stoK = StochasticsKS(stoK_p11,stoK_p12);
stoD = StochasticsDS(stoK_p11,stoK_p12,stoK_p13);
If countif(ma(C,ma_p11)[1] < ma(C,ma_p11),1) == 1
and (ma(C,ma_p12)[1] <= ma(C,ma_p13)[1] and ma(C,ma_p12) > ma(C,ma_p13))
and countif(ma(C,ma_p14)[1] < ma(C,ma_p14),1) == 1
and countif(ma(C,ma_p15)[1] < ma(C,ma_p15),1) == 1
and countif(ma(C,ma_p16)[1] < ma(C,ma_p16),1) == 1
and countif(ma(C,ma_p17)[1] < ma(C,ma_p17),1) == 1
Then
{
If !(ExitName(1) == "StopProfitTarget" and
(EntryName(1) == "매수1" or EntryName(1) == "매수2" or EntryName(1) == "매수3") and
MarketPosition == 0) Then
Buy("매수1",AtMarket);
}
If countif(ma(C,ma_p11)[1] > ma(C,ma_p11),1) == 1
and (ma(C,ma_p12)[1] >= ma(C,ma_p13)[1] and ma(C,ma_p12) < ma(C,ma_p13))
and countif(ma(C,ma_p14)[1] > ma(C,ma_p14),1) == 1
and countif(ma(C,ma_p15)[1] > ma(C,ma_p15),1) == 1
and countif(ma(C,ma_p16)[1] > ma(C,ma_p16),1) == 1
and countif(ma(C,ma_p17)[1] > ma(C,ma_p17),1) == 1
Then
{
If !(ExitName(1) == "StopProfitTarget" and
(EntryName(1) == "매도1" or EntryName(1) == "매도2" or EntryName(1) == "매도3") and
MarketPosition == 0) Then
Sell("매도1",AtMarket);
}
SetStopProfittarget(목표청산1);
}
If b_time2 <= Time and Time <= e_time2 Then
{
stoK = StochasticsKS(stoK_p21,stoK_p22);
stoD = StochasticsDS(stoK_p21,stoK_p22,stoK_p23);
If countif(ma(C,ma_p21)[1] < ma(C,ma_p21),1) == 1
and (ma(C,ma_p22)[1] <= ma(C,ma_p23)[1] and ma(C,ma_p22) > ma(C,ma_p23))
and countif(ma(C,ma_p24)[1] < ma(C,ma_p24),1) == 1
and countif(ma(C,ma_p25)[1] < ma(C,ma_p25),1) == 1
and countif(ma(C,ma_p26)[1] < ma(C,ma_p26),1) == 1
and countif(ma(C,ma_p27)[1] < ma(C,ma_p27),1) == 1
Then
{
If !(ExitName(1) == "StopProfitTarget" and
(EntryName(1) == "매수1" or EntryName(1) == "매수2" or EntryName(1) == "매수3") and
MarketPosition == 0) Then
Buy("매수2",AtMarket);
}
If countif(ma(C,ma_p21)[1] > ma(C,ma_p21),1) == 1
and (ma(C,ma_p22)[1] >= ma(C,ma_p23)[1] and ma(C,ma_p22) < ma(C,ma_p23))
and countif(ma(C,ma_p24)[1] > ma(C,ma_p24),1) == 1
and countif(ma(C,ma_p25)[1] > ma(C,ma_p25),1) == 1
and countif(ma(C,ma_p26)[1] > ma(C,ma_p26),1) == 1
and countif(ma(C,ma_p27)[1] > ma(C,ma_p27),1) == 1
Then
{
If !(ExitName(1) == "StopProfitTarget" and
(EntryName(1) == "매도1" or EntryName(1) == "매도2" or EntryName(1) == "매도3") and
MarketPosition == 0) Then
Sell("매도2",AtMarket);
}
SetStopProfittarget(목표청산2);
}
If b_time3 <= Time and Time <= e_time3 Then
{
stoK = StochasticsKS(stoK_p31,stoK_p32);
stoD = StochasticsDS(stoK_p31,stoK_p32,stoK_p33);
If countif(ma(C,ma_p31)[1] < ma(C,ma_p31),1) == 1
and (ma(C,ma_p32)[1] <= ma(C,ma_p33)[1] and ma(C,ma_p32) > ma(C,ma_p33))
and countif(ma(C,ma_p34)[1] < ma(C,ma_p34),1) == 1
and countif(ma(C,ma_p35)[1] < ma(C,ma_p35),1) == 1
and countif(ma(C,ma_p36)[1] < ma(C,ma_p36),1) == 1
and countif(ma(C,ma_p37)[1] < ma(C,ma_p37),1) == 1
Then
{
If !(ExitName(1) == "StopProfitTarget" and
(EntryName(1) == "매수1" or EntryName(1) == "매수2" or EntryName(1) == "매수3") and
MarketPosition == 0) Then
Buy("매수3",AtMarket);
}
If countif(ma(C,ma_p31)[1] > ma(C,ma_p31),1) == 1
and (ma(C,ma_p32)[1] >= ma(C,ma_p33)[1] and ma(C,ma_p32) < ma(C,ma_p33))
and countif(ma(C,ma_p34)[1] > ma(C,ma_p34),1) == 1
and countif(ma(C,ma_p35)[1] > ma(C,ma_p35),1) == 1
and countif(ma(C,ma_p36)[1] > ma(C,ma_p36),1) == 1
and countif(ma(C,ma_p37)[1] > ma(C,ma_p37),1) == 1
Then
{
If !(ExitName(1) == "StopProfitTarget" and
(EntryName(1) == "매도1" or EntryName(1) == "매도2" or EntryName(1) == "매도3") and
MarketPosition == 0) Then
Sell("매도3",AtMarket);
}
SetStopProfittarget(목표청산3);
}
답변 1
예스스탁 예스스탁 답변
2015-08-04 11:23:05
안녕하세요
예스스탁입니다.
해당 수식에서 StochasticsKS,StochasticsDS함수는
기본으로 제공되는 함수가 아닌작성자가 임의로 만들어 사용하는 사용자함수입니다.
정확하지는 않지만 스토케스틱을
단순이평을 사용해 계산한 식같습니다.
기본제공 스토케스틱은 지수이평을 기준으로 계산합니다.
단순이평으로 계산한 값으로 수정해서 답변드립니다.
input:b_time1(000001),e_time1(030000),목표청산1(0.3),
stoK_p11(50),stoK_p12(50),stoK_p13(10),
ma_p11(10),ma_p12(5),ma_p13(15),ma_p14(250),
ma_p15(20),ma_p16(10),ma_p17(38),
b_time2(030001),e_time2(180000),목표청산2(0.31),
stoK_p21(50),stoK_p22(50),stoK_p23(10),
ma_p21(25),ma_p22(5),ma_p23(15),ma_p24(127),
ma_p25(68),ma_p26(10),ma_p27(15),
b_time3(180001),e_time3(240000),목표청산3(0.43),
stoK_p31(50),stoK_p32(50),stoK_p33(10),
ma_p31(25),ma_p32(5),ma_p33(15),ma_p34(102),
ma_p35(40),ma_p36(10),ma_p37(15);
Var:stoK(0),stoD(0),TRIXv(0),TRIXsig(0);
var : StochasticsKS1(0),StochasticsDS1(0),HV1(0),Lv1(0),FK1(0);
var : StochasticsKS2(0),StochasticsDS2(0),HV2(0),Lv2(0),FK2(0);
var : StochasticsKS3(0),StochasticsDS3(0),HV3(0),Lv3(0),FK3(0);
LV1 = Lowest(L, stoK_p11);
HV1 = Highest(H, stoK_p11);
FK1 = (Close - LV1) / (HV1 - LV1) * 100;
StochasticsKS1 = ma(FK1,stoK_p12);
StochasticsDS1 = ma(StochasticsKS1,stoK_p13);
LV2 = Lowest(L, stoK_p21);
HV2 = Highest(H, stoK_p21);
FK2 = (Close - LV2) / (HV2 - LV2) * 100;
StochasticsKS2 = ma(FK2,stoK_p22);
StochasticsDS2 = ma(StochasticsKS2,stoK_p23);
LV3 = Lowest(L, stoK_p31);
HV3 = Highest(H, stoK_p31);
FK3 = (Close - LV3) / (HV3 - LV3) * 100;
StochasticsKS3 = ma(FK3,stoK_p32);
StochasticsDS3 = ma(StochasticsKS3,stoK_p33);
If b_time1 <= Time and Time <= e_time1 Then
{
stoK = StochasticsKS1;
stoD = StochasticsDS1;
If countif(ma(C,ma_p11)[1] < ma(C,ma_p11),1) == 1
and (ma(C,ma_p12)[1] <= ma(C,ma_p13)[1] and ma(C,ma_p12) > ma(C,ma_p13))
and countif(ma(C,ma_p14)[1] < ma(C,ma_p14),1) == 1
and countif(ma(C,ma_p15)[1] < ma(C,ma_p15),1) == 1
and countif(ma(C,ma_p16)[1] < ma(C,ma_p16),1) == 1
and countif(ma(C,ma_p17)[1] < ma(C,ma_p17),1) == 1
Then
{
If !(ExitName(1) == "StopProfitTarget" and
(EntryName(1) == "매수1" or EntryName(1) == "매수2" or EntryName(1) == "매수3") and
MarketPosition == 0) Then
Buy("매수1",AtMarket);
}
If countif(ma(C,ma_p11)[1] > ma(C,ma_p11),1) == 1
and (ma(C,ma_p12)[1] >= ma(C,ma_p13)[1] and ma(C,ma_p12) < ma(C,ma_p13))
and countif(ma(C,ma_p14)[1] > ma(C,ma_p14),1) == 1
and countif(ma(C,ma_p15)[1] > ma(C,ma_p15),1) == 1
and countif(ma(C,ma_p16)[1] > ma(C,ma_p16),1) == 1
and countif(ma(C,ma_p17)[1] > ma(C,ma_p17),1) == 1
Then
{
If !(ExitName(1) == "StopProfitTarget" and
(EntryName(1) == "매도1" or EntryName(1) == "매도2" or EntryName(1) == "매도3") and
MarketPosition == 0) Then
Sell("매도1",AtMarket);
}
SetStopProfittarget(목표청산1);
}
If b_time2 <= Time and Time <= e_time2 Then
{
stoK = StochasticsKS2;
stoD = StochasticsDS2;
If countif(ma(C,ma_p21)[1] < ma(C,ma_p21),1) == 1
and (ma(C,ma_p22)[1] <= ma(C,ma_p23)[1] and ma(C,ma_p22) > ma(C,ma_p23))
and countif(ma(C,ma_p24)[1] < ma(C,ma_p24),1) == 1
and countif(ma(C,ma_p25)[1] < ma(C,ma_p25),1) == 1
and countif(ma(C,ma_p26)[1] < ma(C,ma_p26),1) == 1
and countif(ma(C,ma_p27)[1] < ma(C,ma_p27),1) == 1
Then
{
If !(ExitName(1) == "StopProfitTarget" and
(EntryName(1) == "매수1" or EntryName(1) == "매수2" or EntryName(1) == "매수3") and
MarketPosition == 0) Then
Buy("매수2",AtMarket);
}
If countif(ma(C,ma_p21)[1] > ma(C,ma_p21),1) == 1
and (ma(C,ma_p22)[1] >= ma(C,ma_p23)[1] and ma(C,ma_p22) < ma(C,ma_p23))
and countif(ma(C,ma_p24)[1] > ma(C,ma_p24),1) == 1
and countif(ma(C,ma_p25)[1] > ma(C,ma_p25),1) == 1
and countif(ma(C,ma_p26)[1] > ma(C,ma_p26),1) == 1
and countif(ma(C,ma_p27)[1] > ma(C,ma_p27),1) == 1
Then
{
If !(ExitName(1) == "StopProfitTarget" and
(EntryName(1) == "매도1" or EntryName(1) == "매도2" or EntryName(1) == "매도3") and
MarketPosition == 0) Then
Sell("매도2",AtMarket);
}
SetStopProfittarget(목표청산2);
}
If b_time3 <= Time and Time <= e_time3 Then
{
stoK = StochasticsKS3;
stoD = StochasticsDS3;
If countif(ma(C,ma_p31)[1] < ma(C,ma_p31),1) == 1
and (ma(C,ma_p32)[1] <= ma(C,ma_p33)[1] and ma(C,ma_p32) > ma(C,ma_p33))
and countif(ma(C,ma_p34)[1] < ma(C,ma_p34),1) == 1
and countif(ma(C,ma_p35)[1] < ma(C,ma_p35),1) == 1
and countif(ma(C,ma_p36)[1] < ma(C,ma_p36),1) == 1
and countif(ma(C,ma_p37)[1] < ma(C,ma_p37),1) == 1
Then
{
If !(ExitName(1) == "StopProfitTarget" and
(EntryName(1) == "매수1" or EntryName(1) == "매수2" or EntryName(1) == "매수3") and
MarketPosition == 0) Then
Buy("매수3",AtMarket);
}
If countif(ma(C,ma_p31)[1] > ma(C,ma_p31),1) == 1
and (ma(C,ma_p32)[1] >= ma(C,ma_p33)[1] and ma(C,ma_p32) < ma(C,ma_p33))
and countif(ma(C,ma_p34)[1] > ma(C,ma_p34),1) == 1
and countif(ma(C,ma_p35)[1] > ma(C,ma_p35),1) == 1
and countif(ma(C,ma_p36)[1] > ma(C,ma_p36),1) == 1
and countif(ma(C,ma_p37)[1] > ma(C,ma_p37),1) == 1
Then
{
If !(ExitName(1) == "StopProfitTarget" and
(EntryName(1) == "매도1" or EntryName(1) == "매도2" or EntryName(1) == "매도3") and
MarketPosition == 0) Then
Sell("매도3",AtMarket);
}
SetStopProfittarget(목표청산3);
}
즐거운 하루되세요.
> 강남쏠라 님이 쓴 글입니다.
> 제목 : 추세매매식을 예스트레이더에서 활용할려면?
> ==>아래 추세매매식을 예스트레이터 yeslanguage편집기에 넣으니 알수없는 문자로
검증이 않되고 있슴당
수정해야될부분과 어떤매매스타일인지 간략하게 설명 부탁드립니다
----------------------------------------------------------
yestrader에서 6132 예스스팟 편집기에서는 정상인데요
해외차이나50과 미국 s&ps나스닥100,s&p500은 있는데===>오일,골드,유로,홍콩항생지수는 없어요--->어디에서 찾아야 하는지요--->yestrader에는 없고 매매할수 없는지요?
input:b_time1(000001),e_time1(030000),목표청산1(0.3),
stoK_p11(50),stoK_p12(50),stoK_p13(10),
ma_p11(10),ma_p12(5),ma_p13(15),ma_p14(250),
ma_p15(20),ma_p16(10),ma_p17(38),
b_time2(030001),e_time2(180000),목표청산2(0.31),
stoK_p21(50),stoK_p22(50),stoK_p23(10),
ma_p21(25),ma_p22(5),ma_p23(15),ma_p24(127),
ma_p25(68),ma_p26(10),ma_p27(15),
b_time3(180001),e_time3(240000),목표청산3(0.43),
stoK_p31(50),stoK_p32(50),stoK_p33(10),
ma_p31(25),ma_p32(5),ma_p33(15),ma_p34(102),
ma_p35(40),ma_p36(10),ma_p37(15);
Var:stoK(0),stoD(0),TRIXv(0),TRIXsig(0);
If b_time1 <= Time and Time <= e_time1 Then
{
stoK = StochasticsKS(stoK_p11,stoK_p12);
stoD = StochasticsDS(stoK_p11,stoK_p12,stoK_p13);
If countif(ma(C,ma_p11)[1] < ma(C,ma_p11),1) == 1
and (ma(C,ma_p12)[1] <= ma(C,ma_p13)[1] and ma(C,ma_p12) > ma(C,ma_p13))
and countif(ma(C,ma_p14)[1] < ma(C,ma_p14),1) == 1
and countif(ma(C,ma_p15)[1] < ma(C,ma_p15),1) == 1
and countif(ma(C,ma_p16)[1] < ma(C,ma_p16),1) == 1
and countif(ma(C,ma_p17)[1] < ma(C,ma_p17),1) == 1
Then
{
If !(ExitName(1) == "StopProfitTarget" and
(EntryName(1) == "매수1" or EntryName(1) == "매수2" or EntryName(1) == "매수3") and
MarketPosition == 0) Then
Buy("매수1",AtMarket);
}
If countif(ma(C,ma_p11)[1] > ma(C,ma_p11),1) == 1
and (ma(C,ma_p12)[1] >= ma(C,ma_p13)[1] and ma(C,ma_p12) < ma(C,ma_p13))
and countif(ma(C,ma_p14)[1] > ma(C,ma_p14),1) == 1
and countif(ma(C,ma_p15)[1] > ma(C,ma_p15),1) == 1
and countif(ma(C,ma_p16)[1] > ma(C,ma_p16),1) == 1
and countif(ma(C,ma_p17)[1] > ma(C,ma_p17),1) == 1
Then
{
If !(ExitName(1) == "StopProfitTarget" and
(EntryName(1) == "매도1" or EntryName(1) == "매도2" or EntryName(1) == "매도3") and
MarketPosition == 0) Then
Sell("매도1",AtMarket);
}
SetStopProfittarget(목표청산1);
}
If b_time2 <= Time and Time <= e_time2 Then
{
stoK = StochasticsKS(stoK_p21,stoK_p22);
stoD = StochasticsDS(stoK_p21,stoK_p22,stoK_p23);
If countif(ma(C,ma_p21)[1] < ma(C,ma_p21),1) == 1
and (ma(C,ma_p22)[1] <= ma(C,ma_p23)[1] and ma(C,ma_p22) > ma(C,ma_p23))
and countif(ma(C,ma_p24)[1] < ma(C,ma_p24),1) == 1
and countif(ma(C,ma_p25)[1] < ma(C,ma_p25),1) == 1
and countif(ma(C,ma_p26)[1] < ma(C,ma_p26),1) == 1
and countif(ma(C,ma_p27)[1] < ma(C,ma_p27),1) == 1
Then
{
If !(ExitName(1) == "StopProfitTarget" and
(EntryName(1) == "매수1" or EntryName(1) == "매수2" or EntryName(1) == "매수3") and
MarketPosition == 0) Then
Buy("매수2",AtMarket);
}
If countif(ma(C,ma_p21)[1] > ma(C,ma_p21),1) == 1
and (ma(C,ma_p22)[1] >= ma(C,ma_p23)[1] and ma(C,ma_p22) < ma(C,ma_p23))
and countif(ma(C,ma_p24)[1] > ma(C,ma_p24),1) == 1
and countif(ma(C,ma_p25)[1] > ma(C,ma_p25),1) == 1
and countif(ma(C,ma_p26)[1] > ma(C,ma_p26),1) == 1
and countif(ma(C,ma_p27)[1] > ma(C,ma_p27),1) == 1
Then
{
If !(ExitName(1) == "StopProfitTarget" and
(EntryName(1) == "매도1" or EntryName(1) == "매도2" or EntryName(1) == "매도3") and
MarketPosition == 0) Then
Sell("매도2",AtMarket);
}
SetStopProfittarget(목표청산2);
}
If b_time3 <= Time and Time <= e_time3 Then
{
stoK = StochasticsKS(stoK_p31,stoK_p32);
stoD = StochasticsDS(stoK_p31,stoK_p32,stoK_p33);
If countif(ma(C,ma_p31)[1] < ma(C,ma_p31),1) == 1
and (ma(C,ma_p32)[1] <= ma(C,ma_p33)[1] and ma(C,ma_p32) > ma(C,ma_p33))
and countif(ma(C,ma_p34)[1] < ma(C,ma_p34),1) == 1
and countif(ma(C,ma_p35)[1] < ma(C,ma_p35),1) == 1
and countif(ma(C,ma_p36)[1] < ma(C,ma_p36),1) == 1
and countif(ma(C,ma_p37)[1] < ma(C,ma_p37),1) == 1
Then
{
If !(ExitName(1) == "StopProfitTarget" and
(EntryName(1) == "매수1" or EntryName(1) == "매수2" or EntryName(1) == "매수3") and
MarketPosition == 0) Then
Buy("매수3",AtMarket);
}
If countif(ma(C,ma_p31)[1] > ma(C,ma_p31),1) == 1
and (ma(C,ma_p32)[1] >= ma(C,ma_p33)[1] and ma(C,ma_p32) < ma(C,ma_p33))
and countif(ma(C,ma_p34)[1] > ma(C,ma_p34),1) == 1
and countif(ma(C,ma_p35)[1] > ma(C,ma_p35),1) == 1
and countif(ma(C,ma_p36)[1] > ma(C,ma_p36),1) == 1
and countif(ma(C,ma_p37)[1] > ma(C,ma_p37),1) == 1
Then
{
If !(ExitName(1) == "StopProfitTarget" and
(EntryName(1) == "매도1" or EntryName(1) == "매도2" or EntryName(1) == "매도3") and
MarketPosition == 0) Then
Sell("매도3",AtMarket);
}
SetStopProfittarget(목표청산3);
}
다음글
이전글