커뮤니티

사용하고 있는 수식중에서 4가지 정도 정말 궁금한사항이 있습니다.

프로필 이미지
이형지
2020-04-08 20:59:32
979
글번호 137688
답변완료
쿠르드 오일 14분봉 차트를 활용하고 있습니다. 기본적인 컨셉은 RSI와 심리도의 저점에 진입해서일정 수준 반등시 청산하는 (역추세매매 컨셉) 것이 기본 논리로 작성하였고 부가적으로 일봉 RSI 중위부위(저점/고점 제외)에서만 적용 거래량도 적절한 수준일때 적용으로 변수를 반영한 수식이며 청산은 5가지 버전을 운용하고 있습니다. ( 목표가 도달시 청산 / 손절가도달시 청산, 상승후 하락시 청산, 하락후 반등시 청산 /주말청산 ) 1. 제가 원하는 수식이 제대로 구현되는 수식이 맞는지 검토 해주시고요 ..( 매수 진입 및 청산 수식 ) 2. RSI(7)<28 심리도(14)<36의 교집합 신호와 실제 시뮬레이션의 진입신호가 다름 ( 첨부사진 참조 ) 원인 및 이유 체크 요망 3. 아무리 생각해도 진입할수 없는 지점에서 진입이 되는 경우 ( 첨부사진 참조 ) 정말 모르겠어요.... 4. 일봉 RSI값의 변동 관련해서 문의드림니다. (첨부화일 3참조 ) 5 아래 수식에서 conditon1 에 매수 조건을 아래 if 문에 매수조건 부문에 넣으면 결과가 다르게 나옴니다... 무슨 차이가 있는지 알려주시면 감사하겠습니다. Condition1 = RSIv < RSI매수값 and Simri < 심리도값 and v > 거래량1 and v < 거래량2 and RSIVV < A and RSIVV > B ; if bdate != bdate[1] Then { DD = DD+1; if var2 > 0 and DD == var2+초기화 Then BuySetup = false; } if BuySetup == false and Condition1 == true and Condition1[1] == false Then { var1 = C; var2 = DD; BuySetup = true; } if Condition2 == true and MarketPosition == 0 and BuySetup == true and C < O and entry == 0 Then buy("매수",AtLimit,var1-PriceScale*하락틱수); ----------------------------------------------------------------------------------- 적용 수식 # 오일 14분봉 극단적 승률 버전 쉼 # 매수 진입 조건 변수 Input : RSIPeriod(7),RSI매수값(28),SimPeriod(14),심리도값(36); # RSI와 심리도 기간 및 값 변수 Input : N1(1),초기화(7); # 위 해당 조건 발생후 진입 유효 기간, 7일경과후 초기화 Input : 하락틱수(5); # 해당 조건 발생후 하락틱수만큼 하락후 진입 변수 Input : RSIPeriod1(8),A(80),B(45); # 일봉기준 RSI값이 해당변수안에 속해있을때 진입 변수 Input : 거래량1(600),거래량2(14000); # 해당 거래량1,2 사이에 속해 있을때 진입되는 변수 # 1일 1회 거래 # 청산 조건 변수 Input : CCI기간(20),CCI값(400); # CCI값에 의해 청산 수식 변수 Input : 즉시익절1(70),즉시손절1(90); # 익절값 손절값 변수 Input : N2(0.6),N3(0.05); # 상승후 본절청산 관련 수식 Input : tr수익(75),tr하락(25); # 트레일링 관련 수식 Input : N4(0.7),본전생각틱(12); # 하락후 본절청산 관련 수식 Input : N5(1),CCI값1(40); # 약 손절 관련 수식 var : cnt(0),SigSum(0),count2(0),RSIsig(0); Var : Counter(0), DownAmt(0), UpAmt(0), UpSum(0), DownSum(0), UpAvg(0), DownAvg(0); var : idx(0), PreUpAvg(0), preDownAvg(0),RSIVv(0); Array : C1[100](0); var : CCIv(0),RSIv(0),Simri(0),BuySetup(false),DD(0),entry(0); CCIv = CCI(CCI기간); RSIV = RSI(RSIPeriod); Simri = Simrido(SimPeriod); if Bdate != Bdate[1] Then { for cnt = 1 to 99 { C1[cnt] = C1[cnt-1][1]; } PreUpAvg = UpAvg[1]; preDownAvg = DownAvg[1]; idx = idx + 1; } C1[0] = C; If idx == RSIPeriod1+2 Then { UpSum = 0; DownSum = 0; For Counter = 0 To RSIPeriod1 - 1 { UpAmt = C1[Counter] - C1[Counter+1]; If UpAmt >= 0 Then DownAmt = 0; Else { DownAmt = -UpAmt; UpAmt = 0; } UpSum = UpSum + UpAmt; DownSum = DownSum + DownAmt; } UpAvg = UpSum / RSIPeriod1; DownAvg = DownSum / RSIPeriod1; } If idx > RSIPeriod1+2 Then { UpAmt = C1[0] - C1[1]; If UpAmt >= 0 Then DownAmt = 0; Else { DownAmt = -UpAmt; UpAmt = 0; } UpAvg = (PreUpAvg * (RSIPeriod1 - 1) + UpAmt) / RSIPeriod1; DownAvg = (preDownAvg * (RSIPeriod1 - 1) + DownAmt) / RSIPeriod1; } If UpAvg + DownAvg <> 0 Then RSIvv = 100 * UpAvg / (UpAvg + DownAvg); Else RSIvv = 0; if bdate != bdate[1] Then { Entry = 0; Condition2 = true; } if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then entry = entry+1; if TotalTrades > TotalTrades[1] and (IsExitName("즉시손절1",1) == true or IsExitName("본전청산1",1)) then Condition2 = false; Condition1 = RSIv < RSI매수값 and Simri < 심리도값 and v > 거래량1 and v < 거래량2 and RSIVV < A and RSIVV > B ; if bdate != bdate[1] Then { DD = DD+1; if var2 > 0 and DD == var2+초기화 Then BuySetup = false; } if BuySetup == false and Condition1 == true and Condition1[1] == false Then { var1 = C; var2 = DD; BuySetup = true; } if Condition2 == true and MarketPosition == 0 and BuySetup == true and C < O and entry == 0 Then buy("매수",AtLimit,var1-PriceScale*하락틱수); if MarketPosition == 1 then { BuySetup = false; if countif(CrossDown(CCIv,CCI값),BarsSinceEntry) >= 1 and CCIv < CCI값 and C < O Then ExitLong("매수cci청산",OnClose); if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*즉시익절1 and C < O Then ExitLong("즉시익절1",OnClose); if highest(H,BarsSinceEntry) >= (EntryPrice+PriceScale*즉시익절1*N2) Then ExitLong("본전청산1",AtStop,EntryPrice+PriceScale*즉시익절1*N3); Else { ExitLong("즉시손절1",AtStop,EntryPrice-PriceScale*즉시손절1); } if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*tr수익 Then ExitLong("tr",AtStop, highest(H,BarsSinceEntry)-PriceScale*tr하락); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*즉시손절1*N4 and C < O Then ExitLong("저점에서 올라와서 본전 청산",atlimit,EntryPrice+PriceScale*본전생각틱); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*즉시손절1 *N5 and CCIv >= CCI값1 and C < O Then ExitLong("저점에서 올라와서 약손절",OnClose); } if DayOfWeek(sdate) == 6 and ((NextBarSdate != sdate and NextBarStime >= 060000) or (NextBarSdate == sdate and NextBarStime >= 060000 and stime < 060000)) Then { ExitLong("주말매수청산"); ExitShort("주말매도청산"); } ps 정말 게시판에 올리지 않고 스스로 해결하고 싶은데 정말 공학적인 수식은 이해가 너무 어려워요 , 귀챦더라도 잘 봐주셔서 저의 고민을 해결해주셨으면 감사하겠습니다. 예스스탁으로 해외선물 돈벌고 싶어요..ㅠㅠ
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-04-08 15:18:41

안녕하세요 예스스탁입니다. # 오일 14분봉 극단적 승률 버전 쉼 # 매수 진입 조건 변수 Input : RSIPeriod(7),RSI매수값(28),SimPeriod(14),심리도값(36); # RSI와 심리도 기간 및 값 변수 Input : N1(1),초기화(7); # 위 해당 조건 발생후 진입 유효 기간, 7일경과후 초기화 Input : 하락틱수(5); # 해당 조건 발생후 하락틱수만큼 하락후 진입 변수 Input : RSIPeriod1(8),A(80),B(45); # 일봉기준 RSI값이 해당변수안에 속해있을때 진입 변수 Input : 거래량1(600),거래량2(14000); # 해당 거래량1,2 사이에 속해 있을때 진입되는 변수 # 1일 1회 거래 # 청산 조건 변수 Input : CCI기간(20),CCI값(400); # CCI값에 의해 청산 수식 변수 Input : 즉시익절1(70),즉시손절1(90); # 익절값 손절값 변수 Input : N2(0.6),N3(0.05); # 상승후 본절청산 관련 수식 Input : tr수익(75),tr하락(25); # 트레일링 관련 수식 Input : N4(0.7),본전생각틱(12); # 하락후 본절청산 관련 수식 Input : N5(1),CCI값1(40); # 약 손절 관련 수식 var : cnt(0),SigSum(0),count2(0),RSIsig(0); Var : Counter(0), DownAmt(0), UpAmt(0), UpSum(0), DownSum(0), UpAvg(0), DownAvg(0); var : idx(0), PreUpAvg(0), preDownAvg(0),RSIVv(0); Array : C1[100](0); var : CCIv(0),RSIv(0),Simri(0),BuySetup(false),DD(0),entry(0); CCIv = CCI(CCI기간); RSIV = RSI(RSIPeriod); Simri = Simrido(SimPeriod); if Bdate != Bdate[1] Then { for cnt = 1 to 99 { C1[cnt] = C1[cnt-1][1]; } PreUpAvg = UpAvg[1]; preDownAvg = DownAvg[1]; idx = idx + 1; } C1[0] = C; If idx == RSIPeriod1+2 Then { UpSum = 0; DownSum = 0; For Counter = 0 To RSIPeriod1 - 1 { UpAmt = C1[Counter] - C1[Counter+1]; If UpAmt >= 0 Then DownAmt = 0; Else { DownAmt = -UpAmt; UpAmt = 0; } UpSum = UpSum + UpAmt; DownSum = DownSum + DownAmt; } UpAvg = UpSum / RSIPeriod1; DownAvg = DownSum / RSIPeriod1; } If idx > RSIPeriod1+2 Then { UpAmt = C1[0] - C1[1]; If UpAmt >= 0 Then DownAmt = 0; Else { DownAmt = -UpAmt; UpAmt = 0; } UpAvg = (PreUpAvg * (RSIPeriod1 - 1) + UpAmt) / RSIPeriod1; DownAvg = (preDownAvg * (RSIPeriod1 - 1) + DownAmt) / RSIPeriod1; } If UpAvg + DownAvg <> 0 Then RSIvv = 100 * UpAvg / (UpAvg + DownAvg); Else RSIvv = 0; if bdate != bdate[1] Then { Entry = 0; Condition2 = true; Condition3 = false; } if Condition3 == false and stime >= 80000 Then Condition3 = true; if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then entry = entry+1; if TotalTrades > TotalTrades[1] and (IsExitName("즉시손절1",1) == true or IsExitName("본전청산1",1)) then Condition2 = false; Condition1 = RSIv < RSI매수값 and Simri < 심리도값 and v > 거래량1 and v < 거래량2 and RSIVV < A and RSIVV > B ; if bdate != bdate[1] Then { DD = DD+1; if var2 > 0 and DD == var2+초기화 Then BuySetup = false; } if BuySetup == false and Condition1 == true and Condition1[1] == false Then { var1 = C; var2 = DD; BuySetup = true; } if Condition2 == true and Condition3 == true and MarketPosition == 0 and BuySetup == true and C < O and entry == 0 Then buy("매수",AtLimit,var1-PriceScale*하락틱수); if MarketPosition == 1 then { BuySetup = false; if countif(CrossDown(CCIv,CCI값),BarsSinceEntry) >= 1 and CCIv < CCI값 and C < O Then ExitLong("매수cci청산",OnClose); if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*즉시익절1 and C < O Then ExitLong("즉시익절1",OnClose); if highest(H,BarsSinceEntry) >= (EntryPrice+PriceScale*즉시익절1*N2) Then ExitLong("본전청산1",AtStop,EntryPrice+PriceScale*즉시익절1*N3); Else { ExitLong("즉시손절1",AtStop,EntryPrice-PriceScale*즉시손절1); } if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*tr수익 Then ExitLong("tr",AtStop, highest(H,BarsSinceEntry)-PriceScale*tr하락); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*즉시손절1*N4 and C < O Then ExitLong("저점에서 올라와서 본전 청산",atlimit,EntryPrice+PriceScale*본전생각틱); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*즉시손절1 *N5 and CCIv >= CCI값1 and C < O Then ExitLong("저점에서 올라와서 약손절",OnClose); } if DayOfWeek(sdate) == 6 and ((NextBarSdate != sdate and NextBarStime >= 060000) or (NextBarSdate == sdate and NextBarStime >= 060000 and stime < 060000)) Then { ExitLong("주말매수청산"); ExitShort("주말매도청산"); } 즐거운 하루되세요 > 이형지 님이 쓴 글입니다. > 제목 : 사용하고 있는 수식중에서 4가지 정도 정말 궁금한사항이 있습니다. > 쿠르드 오일 14분봉 차트를 활용하고 있습니다. 기본적인 컨셉은 RSI와 심리도의 저점에 진입해서일정 수준 반등시 청산하는 (역추세매매 컨셉) 것이 기본 논리로 작성하였고 부가적으로 일봉 RSI 중위부위(저점/고점 제외)에서만 적용 거래량도 적절한 수준일때 적용으로 변수를 반영한 수식이며 청산은 5가지 버전을 운용하고 있습니다. ( 목표가 도달시 청산 / 손절가도달시 청산, 상승후 하락시 청산, 하락후 반등시 청산 /주말청산 ) 1. 제가 원하는 수식이 제대로 구현되는 수식이 맞는지 검토 해주시고요 ..( 매수 진입 및 청산 수식 ) 2. RSI(7)<28 심리도(14)<36의 교집합 신호와 실제 시뮬레이션의 진입신호가 다름 ( 첨부사진 참조 ) 원인 및 이유 체크 요망 3. 아무리 생각해도 진입할수 없는 지점에서 진입이 되는 경우 ( 첨부사진 참조 ) 정말 모르겠어요.... 4. 일봉 RSI값의 변동 관련해서 문의드림니다. (첨부화일 3참조 ) 5 아래 수식에서 conditon1 에 매수 조건을 아래 if 문에 매수조건 부문에 넣으면 결과가 다르게 나옴니다... 무슨 차이가 있는지 알려주시면 감사하겠습니다. Condition1 = RSIv < RSI매수값 and Simri < 심리도값 and v > 거래량1 and v < 거래량2 and RSIVV < A and RSIVV > B ; if bdate != bdate[1] Then { DD = DD+1; if var2 > 0 and DD == var2+초기화 Then BuySetup = false; } if BuySetup == false and Condition1 == true and Condition1[1] == false Then { var1 = C; var2 = DD; BuySetup = true; } if Condition2 == true and MarketPosition == 0 and BuySetup == true and C < O and entry == 0 Then buy("매수",AtLimit,var1-PriceScale*하락틱수); ----------------------------------------------------------------------------------- 적용 수식 # 오일 14분봉 극단적 승률 버전 쉼 # 매수 진입 조건 변수 Input : RSIPeriod(7),RSI매수값(28),SimPeriod(14),심리도값(36); # RSI와 심리도 기간 및 값 변수 Input : N1(1),초기화(7); # 위 해당 조건 발생후 진입 유효 기간, 7일경과후 초기화 Input : 하락틱수(5); # 해당 조건 발생후 하락틱수만큼 하락후 진입 변수 Input : RSIPeriod1(8),A(80),B(45); # 일봉기준 RSI값이 해당변수안에 속해있을때 진입 변수 Input : 거래량1(600),거래량2(14000); # 해당 거래량1,2 사이에 속해 있을때 진입되는 변수 # 1일 1회 거래 # 청산 조건 변수 Input : CCI기간(20),CCI값(400); # CCI값에 의해 청산 수식 변수 Input : 즉시익절1(70),즉시손절1(90); # 익절값 손절값 변수 Input : N2(0.6),N3(0.05); # 상승후 본절청산 관련 수식 Input : tr수익(75),tr하락(25); # 트레일링 관련 수식 Input : N4(0.7),본전생각틱(12); # 하락후 본절청산 관련 수식 Input : N5(1),CCI값1(40); # 약 손절 관련 수식 var : cnt(0),SigSum(0),count2(0),RSIsig(0); Var : Counter(0), DownAmt(0), UpAmt(0), UpSum(0), DownSum(0), UpAvg(0), DownAvg(0); var : idx(0), PreUpAvg(0), preDownAvg(0),RSIVv(0); Array : C1[100](0); var : CCIv(0),RSIv(0),Simri(0),BuySetup(false),DD(0),entry(0); CCIv = CCI(CCI기간); RSIV = RSI(RSIPeriod); Simri = Simrido(SimPeriod); if Bdate != Bdate[1] Then { for cnt = 1 to 99 { C1[cnt] = C1[cnt-1][1]; } PreUpAvg = UpAvg[1]; preDownAvg = DownAvg[1]; idx = idx + 1; } C1[0] = C; If idx == RSIPeriod1+2 Then { UpSum = 0; DownSum = 0; For Counter = 0 To RSIPeriod1 - 1 { UpAmt = C1[Counter] - C1[Counter+1]; If UpAmt >= 0 Then DownAmt = 0; Else { DownAmt = -UpAmt; UpAmt = 0; } UpSum = UpSum + UpAmt; DownSum = DownSum + DownAmt; } UpAvg = UpSum / RSIPeriod1; DownAvg = DownSum / RSIPeriod1; } If idx > RSIPeriod1+2 Then { UpAmt = C1[0] - C1[1]; If UpAmt >= 0 Then DownAmt = 0; Else { DownAmt = -UpAmt; UpAmt = 0; } UpAvg = (PreUpAvg * (RSIPeriod1 - 1) + UpAmt) / RSIPeriod1; DownAvg = (preDownAvg * (RSIPeriod1 - 1) + DownAmt) / RSIPeriod1; } If UpAvg + DownAvg <> 0 Then RSIvv = 100 * UpAvg / (UpAvg + DownAvg); Else RSIvv = 0; if bdate != bdate[1] Then { Entry = 0; Condition2 = true; } if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then entry = entry+1; if TotalTrades > TotalTrades[1] and (IsExitName("즉시손절1",1) == true or IsExitName("본전청산1",1)) then Condition2 = false; Condition1 = RSIv < RSI매수값 and Simri < 심리도값 and v > 거래량1 and v < 거래량2 and RSIVV < A and RSIVV > B ; if bdate != bdate[1] Then { DD = DD+1; if var2 > 0 and DD == var2+초기화 Then BuySetup = false; } if BuySetup == false and Condition1 == true and Condition1[1] == false Then { var1 = C; var2 = DD; BuySetup = true; } if Condition2 == true and MarketPosition == 0 and BuySetup == true and C < O and entry == 0 Then buy("매수",AtLimit,var1-PriceScale*하락틱수); if MarketPosition == 1 then { BuySetup = false; if countif(CrossDown(CCIv,CCI값),BarsSinceEntry) >= 1 and CCIv < CCI값 and C < O Then ExitLong("매수cci청산",OnClose); if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*즉시익절1 and C < O Then ExitLong("즉시익절1",OnClose); if highest(H,BarsSinceEntry) >= (EntryPrice+PriceScale*즉시익절1*N2) Then ExitLong("본전청산1",AtStop,EntryPrice+PriceScale*즉시익절1*N3); Else { ExitLong("즉시손절1",AtStop,EntryPrice-PriceScale*즉시손절1); } if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*tr수익 Then ExitLong("tr",AtStop, highest(H,BarsSinceEntry)-PriceScale*tr하락); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*즉시손절1*N4 and C < O Then ExitLong("저점에서 올라와서 본전 청산",atlimit,EntryPrice+PriceScale*본전생각틱); if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*즉시손절1 *N5 and CCIv >= CCI값1 and C < O Then ExitLong("저점에서 올라와서 약손절",OnClose); } if DayOfWeek(sdate) == 6 and ((NextBarSdate != sdate and NextBarStime >= 060000) or (NextBarSdate == sdate and NextBarStime >= 060000 and stime < 060000)) Then { ExitLong("주말매수청산"); ExitShort("주말매도청산"); } ps 정말 게시판에 올리지 않고 스스로 해결하고 싶은데 정말 공학적인 수식은 이해가 너무 어려워요 , 귀챦더라도 잘 봐주셔서 저의 고민을 해결해주셨으면 감사하겠습니다. 예스스탁으로 해외선물 돈벌고 싶어요..ㅠㅠ