커뮤니티

감사합니다 고개숙여감사드려요

프로필 이미지
매치다는
2018-01-19 11:23:10
150
글번호 115920
답변완료
input : LRLPeriod1(20),MAPeriod1(20); var : cnt(0),LRL1(0),mav1(0),V11(0),V12(0),cond11(false); input : LRSPeriod3(30),Period2(7),RSQR(15); var : LRS2(0),LRSsig2(0),RSQ(0),V21(0),V22(0),Cond21(false),cond22(false); var : 전환선(0),기준선(0),V31(0),V32(0),cond31(false); LRL1 = LRL(c,LRLPeriod1); mav1 = ma(c,MAPeriod1); if crossup(LRL1,mav1) Then V11 = H; if CrossDown(LRL1,mav1) Then V12 = L; cond11 = LRL1 > mav1 and C > LRL1 and LRL1 > LRL1[1] and C > V11; ##차트상 첫진입(앞에 청산이 없는경우) if MarketPosition() == 0 and TotalTrades == 0 and cond11 Then buy("매수1"); ##첫진입 이후(앞에 청산이 있는경우) if MarketPosition() == 0 and TotalTrades >= 1 Then { if IsExitName("StopLoss",1) == false and cond11 Then buy("매수11"); if IsExitName("StopLoss",1) == true and BarsSinceExit(1) >= 3 and cond11 Then buy("매수12"); } if MarketPosition == 1 and (IsEntryName("매수1") == true or IsEntryName("매수11") == true or IsEntryName("매수12") == true) Then{ if LRL1 < mav1 and c < V12 Then exitlong("매수청산1"); } LRS2 = LRS(c,LRSPeriod3); LRSsig2 = ema(LRS2,Period2); RSQ = RSquare(LRS2,LRSsig2,RSQR); if crossup(LRS2,LRSsig2) Then V21 = H; if CrossDown(LRS2,LRSsig2) Then V22 = L; cond21 = LRS2 > LRSsig2 and LRS2 > LRS2[1] and RSQ > 0.3 and RSQ > RSQ[1] and C > V21; cond22 = LRS2 < LRSsig2 and LRS2 < LRS2[1] and RSQ > 0.3 and RSQ > RSQ[1] and C < V22; ##차트상 첫진입(앞에 청산이 없는경우) if MarketPosition() == 0 and TotalTrades == 0 and cond21 Then buy("매수2"); ##첫진입 이후(앞에 청산이 있는경우) if MarketPosition() == 0 and TotalTrades >= 1 Then{ if IsExitName("매수청산",1) == True and cond21 Then buy("매수21"); if IsExitName("매수청산",1) == False and BarsSinceExit(1) >= 3 and cond21 Then buy("매수22"); } if MarketPosition == 1 and (IsEntryName("매수2") == true or IsEntryName("매수21") == true or IsEntryName("매수22") == true) Then{ if LRS2 < LRSsig2 and c < V22 Then exitlong("매수청산2"); } 전환선 = (highest(H,9)+lowest(L,9))/2; 기준선 = (highest(H,26)+lowest(L,26))/2; if crossup(전환선,기준선) Then V31 = H; if CrossDown(전환선,기준선) Then V32 = L; cond31 = 전환선 > 기준선 and C > 전환선 and 전환선 > 전환선[1] and 기준선 > 기준선[1] and C > V31; ##차트상 첫진입(앞에 청산이 없는경우) if MarketPosition() == 0 and TotalTrades == 0 and cond31 Then buy("매수3"); ##첫진입 이후(앞에 청산이 있는경우) if MarketPosition() == 0 and TotalTrades >= 1 Then{ if IsExitName("StopLoss",1) == false and cond31 Then buy("매수31"); if IsExitName("StopLoss",1) == true and BarsSinceExit(1) >= 3 and cond31 Then buy("매수32"); } if MarketPosition == 1 and (IsEntryName("매수3") == true or IsEntryName("매수31") == true or IsEntryName("매수32") == true) Then{ if 전환선 < 기준선 and C < V32 Then exitlong("매수청산3"); } SetStopLoss(13); @@@ 줄수 41 에열수 8 선언되지 않은 이름 'RSquare' 이(가) 사용도어 검증이 안되네요 수정부탁 드립니다
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2018-01-19 13:32:03

안녕하세요 예스스탁입니다. var3 = RSquare(var1,var2,RSQR); 사용자분이 올려주신 수식 중 두번째 수식에 사용되어 있는 사용자함수입니다. RSquare는 기본으로 제공되지 않는 함수인데 해당수식의 작성자가 임의로 만들어 사용하는 함수입니다. 사용자분이 직접 작성하신 내용이 아니시면 수식을 구하신 곳에서 함수를 찾아보셔야 합니다. 저희쪽에서는 어떤 함수인지 알수 없습니다. 즐거운 하루되세요 > 매치다는 님이 쓴 글입니다. > 제목 : 감사합니다 고개숙여감사드려요 > input : LRLPeriod1(20),MAPeriod1(20); var : cnt(0),LRL1(0),mav1(0),V11(0),V12(0),cond11(false); input : LRSPeriod3(30),Period2(7),RSQR(15); var : LRS2(0),LRSsig2(0),RSQ(0),V21(0),V22(0),Cond21(false),cond22(false); var : 전환선(0),기준선(0),V31(0),V32(0),cond31(false); LRL1 = LRL(c,LRLPeriod1); mav1 = ma(c,MAPeriod1); if crossup(LRL1,mav1) Then V11 = H; if CrossDown(LRL1,mav1) Then V12 = L; cond11 = LRL1 > mav1 and C > LRL1 and LRL1 > LRL1[1] and C > V11; ##차트상 첫진입(앞에 청산이 없는경우) if MarketPosition() == 0 and TotalTrades == 0 and cond11 Then buy("매수1"); ##첫진입 이후(앞에 청산이 있는경우) if MarketPosition() == 0 and TotalTrades >= 1 Then { if IsExitName("StopLoss",1) == false and cond11 Then buy("매수11"); if IsExitName("StopLoss",1) == true and BarsSinceExit(1) >= 3 and cond11 Then buy("매수12"); } if MarketPosition == 1 and (IsEntryName("매수1") == true or IsEntryName("매수11") == true or IsEntryName("매수12") == true) Then{ if LRL1 < mav1 and c < V12 Then exitlong("매수청산1"); } LRS2 = LRS(c,LRSPeriod3); LRSsig2 = ema(LRS2,Period2); RSQ = RSquare(LRS2,LRSsig2,RSQR); if crossup(LRS2,LRSsig2) Then V21 = H; if CrossDown(LRS2,LRSsig2) Then V22 = L; cond21 = LRS2 > LRSsig2 and LRS2 > LRS2[1] and RSQ > 0.3 and RSQ > RSQ[1] and C > V21; cond22 = LRS2 < LRSsig2 and LRS2 < LRS2[1] and RSQ > 0.3 and RSQ > RSQ[1] and C < V22; ##차트상 첫진입(앞에 청산이 없는경우) if MarketPosition() == 0 and TotalTrades == 0 and cond21 Then buy("매수2"); ##첫진입 이후(앞에 청산이 있는경우) if MarketPosition() == 0 and TotalTrades >= 1 Then{ if IsExitName("매수청산",1) == True and cond21 Then buy("매수21"); if IsExitName("매수청산",1) == False and BarsSinceExit(1) >= 3 and cond21 Then buy("매수22"); } if MarketPosition == 1 and (IsEntryName("매수2") == true or IsEntryName("매수21") == true or IsEntryName("매수22") == true) Then{ if LRS2 < LRSsig2 and c < V22 Then exitlong("매수청산2"); } 전환선 = (highest(H,9)+lowest(L,9))/2; 기준선 = (highest(H,26)+lowest(L,26))/2; if crossup(전환선,기준선) Then V31 = H; if CrossDown(전환선,기준선) Then V32 = L; cond31 = 전환선 > 기준선 and C > 전환선 and 전환선 > 전환선[1] and 기준선 > 기준선[1] and C > V31; ##차트상 첫진입(앞에 청산이 없는경우) if MarketPosition() == 0 and TotalTrades == 0 and cond31 Then buy("매수3"); ##첫진입 이후(앞에 청산이 있는경우) if MarketPosition() == 0 and TotalTrades >= 1 Then{ if IsExitName("StopLoss",1) == false and cond31 Then buy("매수31"); if IsExitName("StopLoss",1) == true and BarsSinceExit(1) >= 3 and cond31 Then buy("매수32"); } if MarketPosition == 1 and (IsEntryName("매수3") == true or IsEntryName("매수31") == true or IsEntryName("매수32") == true) Then{ if 전환선 < 기준선 and C < V32 Then exitlong("매수청산3"); } SetStopLoss(13); @@@ 줄수 41 에열수 8 선언되지 않은 이름 'RSquare' 이(가) 사용도어 검증이 안되네요 수정부탁 드립니다