커뮤니티

문의드립니다.

프로필 이미지
라떼처럼
2017-09-27 21:37:09
176
글번호 113150
답변완료
아래식 사용시 실제 매매에서는 진입이 없고 시스템을 끄고 다시 켜면 조건에 맞게 진입이 있는 경우가 많습니다 식의 어떤 부분이 잘못 되었는지 확인좀 부탁드립니다. 감사합니다. input : short(12),long(26),sig(9),P1(3),P2(30),P3(120), P4(200), P5(50),Period(14); input : 시작시간(215000), 종료시간(030000); input : 진입회수(1); var : mav1(0,data1),mav2(0,data1),mav3(0,data1),mav4(0,data1),mav5(0,data1); var : MACDO1(0,data1),MACDO2(0,data2),MACDV1(0,data1); var : ii(0,data1),i1(0,data1),i2(0,data1),Bcount(0,data1),Scount(0,data1); var : Bcond(false,data1), Scond(false,data1), Tcond(False); var : BH(0,data1), SL(0,data1); MACDO2 = data2(MACD_OSC(short,long,sig)); mav1 = data1(ma(c,P1)); mav2 = data1(ma(c,P2)); mav3 = data1(ma(c,P3)); mav4 = data1(ma(c,P4)); mav5 = data1(ma(c,P5)); ii = data1(index); if stime == 시작시간 or (stime >시작시간 and stime[1] < 시작시간) Then{ Tcond = true; } if stime == 종료시간 or (stime > 종료시간 and stime[1] < 종료시간) Then{ Tcond = false; } if CrossUp(mav1, mav2) Then{ i1 = ii; } if Crossdown(mav1, mav2) Then{ i1 = ii; } if CrossUp(mav2, mav3) Then{ i2 = ii; Bcount = 0; } if Crossdown(mav2, mav3) Then{ i2 = ii; Scount = 0; } if mav2 > mav3 and MarketPosition != MarketPosition[1] and MarketPosition == 1 Then Bcount = Bcount+1; if mav2 < mav3 and MarketPosition != MarketPosition[1] and MarketPosition == -1 Then Scount = Scount+1; //진입 if Tcond == true Then{ if Bcount < 진입회수 and MACDO2 >0 and mav1 > mav3 and mav2 > mav3 and ii > i1 and i1 > i2 Then buy("Buy"); if Scount < 진입회수 and MACDO2 <0 and mav1 < mav3 and mav2 < mav3 and ii > i1 and i1 > i2 Then sell("Sell"); } //청산1 if MarketPosition == 1 Then{ if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*10 Then ExitLong("B익절1",AtStop,highest(H,BarsSinceEntry)-PriceScale*5); if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*20 Then ExitLong("B익절2",AtStop,highest(H,BarsSinceEntry)-PriceScale*10); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*15 Then ExitLong("B손절1",AtLimit,lowest(L,BarsSinceEntry)+PriceScale*10); ExitLong("B손절2",AtStop,EntryPrice-PriceScale*5); } if MarketPosition == -1 Then{ if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*10 Then ExitShort("S익절1",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*5); if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*20 Then ExitShort("S익절2",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*10); if Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*15 Then ExitShort("S손절1",AtLimit,Highest(H,BarsSinceEntry)-PriceScale*10); ExitShort("S손절2",AtStop,EntryPrice+PriceScale*5); } if 종료시간 <= sTime and sTime < 시작시간 then { if MarketPosition == 1 then{ ExitLong("B장종료"); } if MarketPosition == -1 then{ ExitShort("S장종료"); } }
시스템
답변 2
프로필 이미지

예스스탁 예스스탁 답변

2017-09-28 14:13:19

안녕하세요 예스스탁입니다. 수식은 별도로 수정해 드릴만한 부분이 없습니다. 수식은 차트에 완성봉을 기준으로 조건을 체크하고 신호를 발생하는데 참조데이터를 이용하는 경우 기본종목과 참조데이터의 봉완성시점의 차이로 실제거래와 시뮬레이션이 다를수가 있습니다. 아래 내용 참고하시기 바랍니다. https://www.yesstock.com/YesTrader/YesLanguage/YesLanguage_help/4_9_3.htm 즐거운 하루되세요 > 라떼처럼 님이 쓴 글입니다. > 제목 : 문의드립니다. > 아래식 사용시 실제 매매에서는 진입이 없고 시스템을 끄고 다시 켜면 조건에 맞게 진입이 있는 경우가 많습니다 식의 어떤 부분이 잘못 되었는지 확인좀 부탁드립니다. 감사합니다. input : short(12),long(26),sig(9),P1(3),P2(30),P3(120), P4(200), P5(50),Period(14); input : 시작시간(215000), 종료시간(030000); input : 진입회수(1); var : mav1(0,data1),mav2(0,data1),mav3(0,data1),mav4(0,data1),mav5(0,data1); var : MACDO1(0,data1),MACDO2(0,data2),MACDV1(0,data1); var : ii(0,data1),i1(0,data1),i2(0,data1),Bcount(0,data1),Scount(0,data1); var : Bcond(false,data1), Scond(false,data1), Tcond(False); var : BH(0,data1), SL(0,data1); MACDO2 = data2(MACD_OSC(short,long,sig)); mav1 = data1(ma(c,P1)); mav2 = data1(ma(c,P2)); mav3 = data1(ma(c,P3)); mav4 = data1(ma(c,P4)); mav5 = data1(ma(c,P5)); ii = data1(index); if stime == 시작시간 or (stime >시작시간 and stime[1] < 시작시간) Then{ Tcond = true; } if stime == 종료시간 or (stime > 종료시간 and stime[1] < 종료시간) Then{ Tcond = false; } if CrossUp(mav1, mav2) Then{ i1 = ii; } if Crossdown(mav1, mav2) Then{ i1 = ii; } if CrossUp(mav2, mav3) Then{ i2 = ii; Bcount = 0; } if Crossdown(mav2, mav3) Then{ i2 = ii; Scount = 0; } if mav2 > mav3 and MarketPosition != MarketPosition[1] and MarketPosition == 1 Then Bcount = Bcount+1; if mav2 < mav3 and MarketPosition != MarketPosition[1] and MarketPosition == -1 Then Scount = Scount+1; //진입 if Tcond == true Then{ if Bcount < 진입회수 and MACDO2 >0 and mav1 > mav3 and mav2 > mav3 and ii > i1 and i1 > i2 Then buy("Buy"); if Scount < 진입회수 and MACDO2 <0 and mav1 < mav3 and mav2 < mav3 and ii > i1 and i1 > i2 Then sell("Sell"); } //청산1 if MarketPosition == 1 Then{ if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*10 Then ExitLong("B익절1",AtStop,highest(H,BarsSinceEntry)-PriceScale*5); if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*20 Then ExitLong("B익절2",AtStop,highest(H,BarsSinceEntry)-PriceScale*10); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*15 Then ExitLong("B손절1",AtLimit,lowest(L,BarsSinceEntry)+PriceScale*10); ExitLong("B손절2",AtStop,EntryPrice-PriceScale*5); } if MarketPosition == -1 Then{ if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*10 Then ExitShort("S익절1",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*5); if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*20 Then ExitShort("S익절2",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*10); if Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*15 Then ExitShort("S손절1",AtLimit,Highest(H,BarsSinceEntry)-PriceScale*10); ExitShort("S손절2",AtStop,EntryPrice+PriceScale*5); } if 종료시간 <= sTime and sTime < 시작시간 then { if MarketPosition == 1 then{ ExitLong("B장종료"); } if MarketPosition == -1 then{ ExitShort("S장종료"); } }
프로필 이미지

라떼처럼

2017-09-29 08:33:38

그럼 예스스팟을 이용하여 만들면 문제가 해결될까요? > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 문의드립니다. > 안녕하세요 예스스탁입니다. 수식은 별도로 수정해 드릴만한 부분이 없습니다. 수식은 차트에 완성봉을 기준으로 조건을 체크하고 신호를 발생하는데 참조데이터를 이용하는 경우 기본종목과 참조데이터의 봉완성시점의 차이로 실제거래와 시뮬레이션이 다를수가 있습니다. 아래 내용 참고하시기 바랍니다. https://www.yesstock.com/YesTrader/YesLanguage/YesLanguage_help/4_9_3.htm 즐거운 하루되세요 > 라떼처럼 님이 쓴 글입니다. > 제목 : 문의드립니다. > 아래식 사용시 실제 매매에서는 진입이 없고 시스템을 끄고 다시 켜면 조건에 맞게 진입이 있는 경우가 많습니다 식의 어떤 부분이 잘못 되었는지 확인좀 부탁드립니다. 감사합니다. input : short(12),long(26),sig(9),P1(3),P2(30),P3(120), P4(200), P5(50),Period(14); input : 시작시간(215000), 종료시간(030000); input : 진입회수(1); var : mav1(0,data1),mav2(0,data1),mav3(0,data1),mav4(0,data1),mav5(0,data1); var : MACDO1(0,data1),MACDO2(0,data2),MACDV1(0,data1); var : ii(0,data1),i1(0,data1),i2(0,data1),Bcount(0,data1),Scount(0,data1); var : Bcond(false,data1), Scond(false,data1), Tcond(False); var : BH(0,data1), SL(0,data1); MACDO2 = data2(MACD_OSC(short,long,sig)); mav1 = data1(ma(c,P1)); mav2 = data1(ma(c,P2)); mav3 = data1(ma(c,P3)); mav4 = data1(ma(c,P4)); mav5 = data1(ma(c,P5)); ii = data1(index); if stime == 시작시간 or (stime >시작시간 and stime[1] < 시작시간) Then{ Tcond = true; } if stime == 종료시간 or (stime > 종료시간 and stime[1] < 종료시간) Then{ Tcond = false; } if CrossUp(mav1, mav2) Then{ i1 = ii; } if Crossdown(mav1, mav2) Then{ i1 = ii; } if CrossUp(mav2, mav3) Then{ i2 = ii; Bcount = 0; } if Crossdown(mav2, mav3) Then{ i2 = ii; Scount = 0; } if mav2 > mav3 and MarketPosition != MarketPosition[1] and MarketPosition == 1 Then Bcount = Bcount+1; if mav2 < mav3 and MarketPosition != MarketPosition[1] and MarketPosition == -1 Then Scount = Scount+1; //진입 if Tcond == true Then{ if Bcount < 진입회수 and MACDO2 >0 and mav1 > mav3 and mav2 > mav3 and ii > i1 and i1 > i2 Then buy("Buy"); if Scount < 진입회수 and MACDO2 <0 and mav1 < mav3 and mav2 < mav3 and ii > i1 and i1 > i2 Then sell("Sell"); } //청산1 if MarketPosition == 1 Then{ if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*10 Then ExitLong("B익절1",AtStop,highest(H,BarsSinceEntry)-PriceScale*5); if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*20 Then ExitLong("B익절2",AtStop,highest(H,BarsSinceEntry)-PriceScale*10); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*15 Then ExitLong("B손절1",AtLimit,lowest(L,BarsSinceEntry)+PriceScale*10); ExitLong("B손절2",AtStop,EntryPrice-PriceScale*5); } if MarketPosition == -1 Then{ if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*10 Then ExitShort("S익절1",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*5); if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*20 Then ExitShort("S익절2",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*10); if Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*15 Then ExitShort("S손절1",AtLimit,Highest(H,BarsSinceEntry)-PriceScale*10); ExitShort("S손절2",AtStop,EntryPrice+PriceScale*5); } if 종료시간 <= sTime and sTime < 시작시간 then { if MarketPosition == 1 then{ ExitLong("B장종료"); } if MarketPosition == -1 then{ ExitShort("S장종료"); } }