커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내

안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
프로필 이미지
예스스탁
2026-02-27
8208
글번호 230811
지표
답변완료

수식 질문 드립니다.

아래의 조건을 만족시키는 수식이 필요합니다. 1. 이전 50일 고가를 상향돌파하면 1계약 매수 진입한다. 2. 이전 100일 고가를 상향돌파하면 1계약 매수 진입한다. 3. 이전 50일 고가를 상향돌파하고, 이전 100일 고가도 상향돌파하면 2계약 매수 진입한다. 4. 이전 50일 저가를 하향돌파하면 1계약 매도 진입한다. 2. 이전 100일 저가를 하향돌파하면 1계약 매도 진입한다. 3. 이전 50일 저가를 하향돌파하고, 이전 100일 저가도 하향돌파하면 2계약 매도 진입한다.
프로필 이미지
앙두
2013-11-21
234
글번호 69717
시스템
답변완료

수식 문의 드립니다.

친절한 답변에 감사드립니다. 아래의 수식을 "최초 1계약으로 진입하되 연속2회 손실이 나면 계약수를 2배수씩 올리되 최대 계약수는 8계약이이고, 이익이 발생하면 1계약으로 환원한다. 또한 기본투자계약수, 최대투자계약수, 연속손실횟수는 INPUT변수화 하여 최적화가 가능하도록 한다." 라는 조건에 만족하도록 변형시키고 싶습니다. input : 기본투자금액(1000000),최대투자금액(8000000); var : EntryM(0),Vol(0); if data1(dayindex == 1) Then { if data2(bids) > data2(asks) then { if TotalTrades == 0 or (TotalTrades >= 1 and PositionProfit(1) > 0) Then EntryM = 기본투자금액; if TotalTrades >= 2 and PositionProfit(1) <= 0 and PositionProfit(2) <= 0 Then EntryM = min(EntryM*2,최대투자금액); if CodeCategoryEx == 11 and BasePrice < 50000 Then vol = int(int(EntryM/C)/10)*10; Else vol = int(EntryM/C); if CodeCategory == 6 Then vol = int(EntryM/(C*BigPointValue)); buy("b",OnClose,def,Vol); } if data2(bids) < data2(asks) Then{ if TotalTrades == 0 or (TotalTrades >= 1 and PositionProfit(1) > 0) Then EntryM = 기본투자금액; if TotalTrades >= 2 and PositionProfit(1) <= 0 and PositionProfit(2) <= 0 Then EntryM = min(EntryM*2,최대투자금액); if CodeCategoryEx == 11 and BasePrice < 50000 Then vol = int(int(EntryM/C)/10)*10; Else vol = int(EntryM/C); if CodeCategory == 6 Then vol = int(EntryM/(C*BigPointValue)); sell("s",OnClose,def,Vol); } }
프로필 이미지
앙두
2013-11-21
252
글번호 69716
시스템
답변완료

지표수식 작성 부탁드립니다.

수고 많으십니다. 우리트레이더에서 이평을 60일선과 300일을 각각 2개씩 아래와 같이 세팅하고 싶은데 어떻게 하는지 부탁드립니다. 기간 1 60, 가격 - 고가 기간 2 300, 이평종류 - 가중 기간 1 60, 가격 - (고가+저가)/3 기간 2 300, 이평종규 - 가중 감사합니다.
프로필 이미지
최선님
2013-11-21
252
글번호 69715
지표
답변완료

검색 수식좀 부탁드립니다...

※ 코스피 : 대형주 , 중형주 ※ 코스닥 : 코스닥우량기업 , 코스닥 중견기업 ※ 제외종목 : 관리종목 , 투자경고/위험 , 우선주 , 증거금100% 종목 , 거래정지 ※ 월차트 지수이동평균선 : 3 > 6 > 12 ※ 주차트 지수이동평균선 : 13 > 26 > 52 ※ 일차트 지수이동평균선 : 6 > 13 > 22 > 130 > 260 각차트별 정배열... ※ 5일평균 거래량(금일제외) : 5만 이상 (50000)
프로필 이미지
회원
2013-11-21
280
글번호 69704
검색
답변완료

시가(9시 정각)에서 각 분봉의 단순스토캐스틱 보는법 문의

먼저 신속한 답변에 감사드립니다. 11월20일에 문의드려서 답변 받았습니다. 9시봉의 값만 하루동안 보고자 하면 차트는 분봉으로 하나요? 일봉으로 봐야 하는지요? 분봉으로 하니 각분봉 차트마다 같은분봉 스토캐스틱 값이 달라지더라구요. -------------------------------------------- 2. 하나의 지표는 차트에 중복으로 적용이 됩니다. 여러번 적용하신 후에 외부변수(input)의 Atime을 다른 원하시는 주기로 지정하시면 해당 주기의 스토케스틱 값이 됩니다. 이전에 보내드린 지수기준 스토케스틱도 같습니다. 9시봉의 값만 하루동안 보고자 하시면 plot문을 아래와 같이 변경하시면 됩니다. 2-1 단순 input : Atime(30),StoPeriod(10), StoPeriod1(6), StoPeriod2(6); var : cnt(0),count(0),highVal(0), lowVal(0),Stok(0),StoD(0); var : sum1(0),sum2(0); Array : HH[50](0),LL[50](0),FK[50](0),SK[50](0); var1 = TimeToMinutes(stime)%Atime; if dayindex == 0 or (var1 < var1[1] and stime > stime[1]) Then{ HH[0] = H; LL[0] = L; for cnt = 1 to 49{ HH[cnt] = HH[cnt-1][1]; LL[cnt] = LL[cnt-1][1]; FK[cnt] = FK[cnt-1][1]; SK[cnt] = SK[cnt-1][1]; } } if H > HH[0] Then HH[0] = H; if L < LL[0] Then LL[0] = L; if HH[StoPeriod] > 0 Then{ highVal = HH[0]; lowVal = LL[0]; for count = 0 to StoPeriod-1 { if HH[count] > highVal then highVal = HH[count]; if LL[count] < lowVal then lowVal = LL[count]; } FK[0] = (C-lowVal)/(highVal-lowVal)*100; } if FK[StoPeriod1] > 0 Then{ sum1 = 0; for cnt = 0 to StoPeriod1-1 { sum1 = sum1+FK[cnt]; } SK[0] = sum1/StoPeriod1; Stok = Sk[0]; } if StoK[StoPeriod2] > 0 Then{ sum2 = 0; for cnt = 0 to StoPeriod2-1 { sum2 = sum2+SK[cnt]; } StoD = sum2/StoPeriod1; } if dayindex == 0 Then{ var1 = stok; var2 = stod; } plot1(var1); plot2(var2); PlotBaseLine1(20); PlotBaseLine2(80); 2-2 지수 input : Atime(30),StoPeriod(10), StoPeriod1(6), StoPeriod2(6); var : count(0), highVal(0), lowVal(0), StoFastK(0), StoK(0), StoD(0); var : Ep(0), EP1(0), JISU(0), DINDEX(0), PreStoK(0), PreStoD(0),cnt(0); Array : HH[50](0),LL[50](0); var1 = TimeToMinutes(stime)%Atime; if dayindex == 0 or (var1 < var1[1] and stime > stime[1]) Then{ HH[0] = H; LL[0] = L; for cnt = 1 to 49{ HH[cnt] = HH[cnt-1][1]; LL[cnt] = LL[cnt-1][1]; } } if H > HH[0] Then HH[0] = H; if L < LL[0] Then LL[0] = L; highVal = HH[0]; lowVal = LL[0]; for count = 0 to StoPeriod-1 { if HH[count] > highVal then highVal = HH[count]; if LL[count] < lowVal then lowVal = LL[count]; } StoFastK = (C-lowVal)/(highVal-lowVal)*100; #### Slow StochasticsK #### Ep = 2/(StoPeriod1+1); if DINDEX >= StoPeriod and (date != date[1] or var1 < var1[1]) then { DINDEX = DINDEX + 1; PreStoK = StoK[1]; } if DINDEX <= 1 then StoK = StoFastK ; else StoK = StoFastK * EP + PreStoK * (1-EP); #### Slow StochasticsD #### Ep1 = 2/(StoPeriod2+1); if date != date[1] or var1 < var1[1] then { DINDEX = DINDEX + 1; PreStoD = StoD[1]; } if DINDEX <= 1 then StoD = StoK ; else StoD = StoK * EP1 + PreStoD * (1-EP1); if dayindex == 0 Then{ var1 = stok; var2 = stod; } plot1(var1); plot2(var2); PlotBaseLine1(20); PlotBaseLine2(80); 즐거운 하루되세요 > 비류천 님이 쓴 글입니다. > 제목 : 10분봉에서 30분봉 실시간 "단순"스토캐스틱 > 11월17일에 문의드려 답변을 잘 받았습니다. 추가로 2가지 더 문의 드립니다. 1.10분봉에서 30분봉 실시간 "단순"스토캐스틱으로 보는법 문의드립니다. 예스트레이더는 기본적으로 지수 스토캐스틱인줄 압니다. 단순스토캐스틱으로 보고 싶습니다. 2.시가(9시정각)에서 5분봉, 10분봉, 30분봉, 60분봉의 단순 스토캐스틱 상태를 보는법 문의드립니다. (과거차트 복기용) 지수 스토캐스틱으로 보는 법도 같이 알려주시면 감사하겠습니다. ------------------------------------- 안녕하세요 예스스탁입니다. input : Atime(30),StoPeriod(10), StoPeriod1(6), StoPeriod2(6); var : count(0), highVal(0), lowVal(0), StoFastK(0), StoK(0), StoD(0); var : Ep(0), EP1(0), JISU(0), DINDEX(0), PreStoK(0), PreStoD(0),cnt(0); Array : HH[50](0),LL[50](0); var1 = TimeToMinutes(stime)%Atime; if dayindex == 0 or (var1 < var1[1] and stime > stime[1]) Then{ HH[0] = H; LL[0] = L; for cnt = 1 to 49{ HH[cnt] = HH[cnt-1][1]; LL[cnt] = LL[cnt-1][1]; } } if H > HH[0] Then HH[0] = H; if L < LL[0] Then LL[0] = L; highVal = HH[0]; lowVal = LL[0]; for count = 0 to StoPeriod-1 { if HH[count] > highVal then highVal = HH[count]; if LL[count] < lowVal then lowVal = LL[count]; } StoFastK = (C-lowVal)/(highVal-lowVal)*100; #### Slow StochasticsK #### Ep = 2/(StoPeriod1+1); if DINDEX >= StoPeriod and (date != date[1] or var1 < var1[1]) then { DINDEX = DINDEX + 1; PreStoK = StoK[1]; } if DINDEX <= 1 then StoK = StoFastK ; else StoK = StoFastK * EP + PreStoK * (1-EP); #### Slow StochasticsD #### Ep1 = 2/(StoPeriod2+1); if date != date[1] or var1 < var1[1] then { DINDEX = DINDEX + 1; PreStoD = StoD[1]; } if DINDEX <= 1 then StoD = StoK ; else StoD = StoK * EP1 + PreStoD * (1-EP1); plot1(StoK); plot2(StoD); PlotBaseLine1(20); PlotBaseLine2(80); 즐거운 하루되세요 > 비류천 님이 쓴 글입니다. > 제목 : 10분봉에서 30분봉 실시간 스토캐스틱 > 10분봉에서 30분봉 실시간 스토캐스틱 보는법 과거차트를 복기해보려합니다. 예를 들어 2013년 10월2일 오전 9시10분 에서 30분봉 스토캐스틱를 보고싶습니다. 지금은 30분봉이 완성된 상태만 보입니다. (9시30분) 분봉 실시간으로 스토캐스틱 확인하는 수식 문의드립니다.
프로필 이미지
비류천
2013-11-21
359
글번호 69699
지표

성공시대1 님에 의해서 삭제되었습니다.

프로필 이미지
성공시대1
2013-11-21
0
글번호 69698
시스템
답변완료

수정부탁합니다

즐거운 하루되세요 > HI_jh***** 님이 쓴 글입니다. 안녕하세요 2번째추가매수 할때는 평균단가 -5프로 이상 빠졌을때 매수하게만들어주세요 첫번째 매수하여 평균-4프로에 있을&#46468;는 2번째 매수는 못하게 하구요 -5프로 이상일때 매수들어가게 해주세요 그다음 매수할때 매번-5프로 빠지면 매수하는 식으로 만들어주세요 예를들어 첫매수하였는데 -6프로 빠졌다 그럼 매수 그다음날 또 -5프로이상 빠지면 매수 그런데 다음날은 -2프로빠졌으면 매수 금지 이런식으로 바꾸어 주세요 input : 투자금액(200000),P(60); Var : Body(0),HighBody(0),LowBody(0),Height(0),UpTail(0),DnTail(0),Long(False); var : Vol(0),entrycond(false),mav(0); mav = ma(C,P); if date != date[1] Then entrycond = false; if CodeCategoryEx == 11 and BasePrice < 50000 Then vol = int(int((투자금액)/C)/10)*10; Else vol = int((투자금액)/C); Body = Abs(C-O); HighBody = Max(C,O); LowBody = Min(C,O); Height = H-L; UpTail = H-Max(C,O); DnTail = Min(C,O)-L; DnTail = Min(O,C) - L; Uptail = H - Max(O,C); Height = H - L; body= Abs(O-C); highbody = Max(O,C); LowBody = Min(O,C); If Abs(Open-Close) > ma(Abs(Open-Close),10)*2 Then Long = True; Else Long = False; If UpTail == 0 and DnTail == 0 Then Condition1 = True; Else Condition1 = False; If C > mav and entrycond == false and C < Ma(C,10) and DnTail < Height*0.1 and C == O and Height > Ma(Height,10) And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a1",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C < Ma(C,10) and (Uptail < Height * 0.1) and C == O and (Height > Ma(Height,10)) And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a2",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[1] < Ma(C,10)[1] and C[1] < O[1] and Long[1] == True and C > O and Long and O < L[1] and C >= (O[1]+C[1])/2 and C < O[1] And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a3",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and (C[2] >= Ma(C,10)[2] and C[2] < O[2] and C[1] < O[1] and C < O) and (O[1] > Min(O,C)[2] and O[1] < Max(O,C)[2]) and (O > Min(O,C)[1] and O < Max(O,C)[1]) and (C[2] > C[1] and C[1] > C[0]) and (L[2] < L[1] and L[1]< L[0]) And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a4",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[2] < Ma(C,10)[2] and C[2] < O[2] and C[1] > O[1] and C < O and O[1] > C[2] and O[1] == L[1] and O > Max(H[1],H[2]) and C[2] == C[0] And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a6",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and (C[4] < Ma(C,10)[4] and C[4] < O[4] and C[3] < O[3] and C[2] < O[2]) and (O[4] > O[3] and O[3] > O[2]) and (C[4] > C[3] and C[3] > C[2]) and (C[1] < O[1] and H[1] - MaxList(O,C)[1] > 0) and (H[1] < O[3] and C[2] > C[1]) and Close > Open and (O > O[1] and C > MaxList(H[1],H[2])) And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a7",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and (C[2] < Ma(C,10)[2] and Long[2] == True and C[2] < O[2]) and (C[1] == O[1] and Max(O,C)[1] < Min(O,C)[2])and (C > O and Min(O,C) > Max(O,C)[1])and (C > C[2]) And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a8",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and (C[1] < O[1] and Long[1] == True and Condition1[1] == True ) and (Long == True and C > O and Condition1 == True ) and (L > H[1]) And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a9",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[1] < Ma(C,10)[1] and C[1] < O[1] and body[1] > Ma(body[1],10)*2 and C > O and Abs(C-C[1]) < Ma(Height,10)*0.1 And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a10",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C < Ma(C,10) and body > Ma(body,10)*2 and C > O and O == L and Uptail > 0 and Uptail < Height*0.1 And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a11",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[2] < Ma(C,10)[2] and C[2] == O[2] and C[1] == O[1] and C == O and HighBody[1]< LowBody[2] and HighBody[1] < LowBody[0] And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a12",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[1] < Ma(C,10)[1] and C[1] < O[1] and body[1] > Ma(body[1],10)*2 and C == O and Highbody < Highbody[1] and Lowbody > Lowbody[1] And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a13",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[1] < Ma(C,10)[1] and C[1] < O[1] and body[1] > Ma(body[1],10)*2 and C > O and Highbody < Highbody[1] and Lowbody > Lowbody[1] And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a14",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[2] < Ma(C,10)[2] and C[2] < O[2] and body[2] > Ma(body[2],10)*2 and C[1] > O[1] and Highbody[1] < Highbody[2] and Lowbody[1] > Lowbody[2] and C > O and C > C[1] And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a15",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[1] < Ma(c,10)[1] and C[1] < O[1] and C > O and Body > Ma(Body,10)*2 and Highbody > Highbody[1] and Lowbody < Lowbody[1] And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a16",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[2] < Ma(C,10)[2] and C[2] < O[2] and C[1] > O[1] and Body[1] > Ma(Body[1],10)*2 and Highbody[1] > Highbody[2] and Lowbody[1] < Lowbody[2] and C > O and C > C[1] And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a17",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and (C[4] < Ma(c,10)[4] and Body[4] > Ma(Body,10)[4]*2 and C[4] < O[4]) and (C[3] < O[3] and C[1] < O[1]) and (Body > Ma(Body,10)*2 and C > O) and (O[3] > HighBody[2] and HighBody[2] > O[1]) and (C[3] > LowBody[2] and LowBody[2] > C[1]) and (C >= O[1] and C > O[3] and C < C[4]) And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a18",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[2] < Ma(C,10)[2] and Body[2] > Ma(Body,10)[2]*2 and C[2] < O[2] and C[1] == O[1] and HighBody[1]<LowBody[2] and C > O and C > C[2] And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a19",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[2] < Ma(C,10)[2] and Body[2] > Ma(Body,10)[2]*2 and C[2] < O[2] and Body[1] < Ma(Body,10)[1]*0.5 and HighBody[1] < LowBody[2] and C > O and C > C[2] And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a20",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[3] < Ma(C,10)[3] and Body[3] > Ma(Body,10)[3]*2 and C[3] < O[3] and Body[2] > Ma(Body,10)[2]*2 and C[2] < O[2] and O[3] == H[3] and C[3] == L[3] and O[2] == H[2] and C[2] == L[2] and O[1] < Min(O,C)[2] and H[1] > C[2] and UpTail[1] > Height*0.5 and O > H[1] and C < L[1] And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a21",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C < Ma(C,10) and DnTail < Height*0.1 and UpTail > Body*2 and Height > Ma(Height,10) and C != O And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a22",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[2] < Ma(C,10)[2] and C[2] > O[2] and C[1] > O[1] and C > O and O[1] >= LowBody[2] and O[1]<= HighBody[2] and O <= HighBody[1] and C[2] <= C[1] and C[1] <= C And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a23",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C[1] < Ma(C,10)[1] and C[1] < O[1] and Body[1] > Ma(Body,10)[1]*2 and C < O and Highbody < Highbody[1] and Lowbody > Lowbody[1] And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a24",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and C < Ma(C,10) and UpTail < Height*0.1 and DnTail > Body*2 and Height > Ma(Height,10) and C != O And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a26",OnClose,def,vol); entrycond = true; } If C > mav and entrycond == false and (C[2] < Ma(C,10)[2] and Body[2] > Ma(Body,10)[2]*2 and C[2] < O[2]) and (C[1] < O[1] and C > O and Highbody[1] < Highbody[2] and Lowbody[1] > Lowbody[2]) and (L[1] < L[2] or L[1] < Min(L[2],L[3],L[4])) and (L[1] < O and C[1] > C) And (MarketPosition == 0 or (MarketPosition == 1 and C <= AvgEntryPrice*0.95)) then{ buy("a27",OnClose,def,vol); entrycond = true; } if MarketPosition == 1 Then{ if CurrentEntries >= 2 Then exitlong("매도2",atlimit,AvgEntryPrice*1.02); Else exitlong("매도1",atlimit,EntryPrice*1.05); }
프로필 이미지
회원
2013-11-21
252
글번호 69695
시스템
답변완료

시스템식 차이 설명

항상감사드립니다 아래시스템을 돌려보니 각각 다른 결과가 나옵니다 시스템 A는 정상적인 시스템이고 시스템 B는 식자체의 논리가 잘못되어 있는 시스템입니다 근데 시스템 B 가 성과가 좋게 나와서 시스템식 설명부탁드립니다 1.시스템 A Input : Period(12), sigPeriod(9); var : TRIXv(0),TRIXsig(0); TRIXv = TRIX(Period); TRIXsig = ema(TRIX(Period),sigPeriod); if crossup(TRIXv,0) Then var1=1; if CrossDown(TRIXv,0) Then var1=-1; if var1==1 and c>var23 Then buy("매수1"); if var1==-1 and c<var21 Then Sell("매도1"); 2.시스템 B input : Period1(23); var1 =(AccumN(iff(C-C[1]>0,C-C[1],0),Period1)/AccumN(iff(C-C[1]>0,C-C[1],C[1]- C),Period1)*100); Input : Period(12), sigPeriod(9); var : TRIXv(0),TRIXsig(0); TRIXv = TRIX(Period); TRIXsig = ema(TRIX(Period),sigPeriod); if crossup(TRIXv,0) Then var1=1; if CrossDown(TRIXv,0) Then var1=-1; Condition1 = ExitDate(1) == sdate and (IsExitName("bx",1) == true and IsExitName ("sx",1) == true); if Condition1 == false and var1==1 and c>var23 Then buy("B1"); if Condition1 == false and var1==-1 and c<var21 Then sell("S1"); 시스템A 와 시스템B 의 차이는 RSI 추가인데 시스템 B에서 var1이 var1 =(AccumN(iff(C-C[1]>0,C-C[1],0),Period1)/AccumN(iff(C-C[1]>0,C-C[1],C[1]- C),Period1)*100); if crossup(TRIXv,0) Then var1=1; if CrossDown(TRIXv,0) Then var1=-1; 로 이중으로 되어있습니다 시스템을 돌리면 신호는 에러가 나질않고 나오고 있습니다 설명부탁드립니다(시스템B) 감사드립니다..
프로필 이미지
조민철
2013-11-21
251
글번호 69687
시스템
답변완료

지표수식 부탁드립니다.

볼린져밴드의 하단밴드와 상단밴드를 일목균형표의 기준선처럼 변경하려고 합니다. 알맞은 지표를 부탁드립니다. 볼린져밴드이 중심선이 단순이평으로 기준선처럼 변경한후에 상단,하단밴드 나오는 모양이 별로 마음이 안들어서 , 중심선은 그래도 단순이평인데 상단과 하단밴드가 기준선처럼 변경해서 보려고 합니다. 수고하세요.
프로필 이미지
회원
2013-11-21
265
글번호 69686
지표