커뮤니티

세 개의 시스템 신호입니다.

프로필 이미지
매치다는
2018-01-18 21:53:17
177
글번호 115907
답변완료
세 개의 신호를 한개의 시스템으로 만들어주시길 부탁드립니다. 매수진입신호만 부탁드립니다. LRL, LRS, 일목시스템신호인데 한개의 시스템신호로 합쳐주시길 부탁드립니다. 주식 매수 시스템으로 사용 할려고 합니다 1,LRL 시스템 input : P(20),Period(20); var : cnt(0); var1 = LRL(c,P); var2 = ma(c,Period); if crossup(var1,var2) Then value1 = H; if CrossDown(var1,var2) Then value2 = L; condition1 = var1 > var2 and C > var1 and var1 > var1[1] and C > value1; ##차트상 첫진입(앞에 청산이 없는경우) if MarketPosition() == 0 and cnt < 1 Then{ if condition1 Then{ buy("매수"); cnt = 1; } } ##첫진입 이후(앞에 청산이 있는경우) if MarketPosition() == 0 and cnt == 1 Then{ if IsExitName("매수청산",1) == True Then{ if condition1 Then buy("매수1"); } if IsExitName("매수청산",1) == False Then{ if BarsSinceExit(1) >= 3 and condition1 Then buy("매수2"); } } if var1 < var2 and c < value2 Then exitlong("매수청산"); SetStopLoss(13); input : Period1(30),Period2(7),RSQR(15); var : cnt(0); 2,LRS 시스템 var1 = LRS(c,Period1); var2 = ema(var1,Period2); var3 = RSquare(var1,var2,RSQR); if crossup(var1,var2) Then value1 = H; if CrossDown(var1,var2) Then value2 = L; condition1 = var1 > var2 and var1 > var1[1] and var3 > 0.3 and var3 > var3[1] and C > value1; condition2 = var1 < var2 and var1 < var1[1] and var3 > 0.3 and var3 > var3[1] and C < value2; if condition1 == true Then buy(); if var1 < var2 and C < value2 Then exitlong(); if condition2 == True Then sell(); if var1 < var2 and c > value1 Then ExitShort(); SetStopLoss(5); ##차트상 첫진입(앞에 청산이 없는경우) if MarketPosition() == 0 and cnt < 1 Then{ if condition1 Then{ buy("매수"); cnt = 1; } if condition2 Then{ sell("매도"); cnt = 1; } } ##첫진입 이후(앞에 청산이 있는경우) if MarketPosition() == 0 and cnt == 1 Then{ if IsExitName("매수청산",1) == True Then{ if condition1 Then buy("매수1"); } if IsExitName("매수청산",1) == False Then{ if BarsSinceExit(1) >= 3 and condition1 Then buy("매수2"); } } if var1 < var2 and c < value2 Then exitlong("매수청산"); 3,일목 시스템 SetStopLoss(13); var : cnt(0); var : 전환선(0),기준선(0); 전환선 = (highest(H,9)+lowest(L,9))/2; 기준선 = (highest(H,26)+lowest(L,26))/2; if crossup(전환선,기준선) Then value1 = H; if CrossDown(전환선,기준선) Then value2 = L; condition1 = 전환선 > 기준선 and C > 전환선 and 전환선 > 전환선[1] and 기준선 > 기준선[1] and C > value1; ##차트상 첫진입(앞에 청산이 없는경우) if MarketPosition() == 0 and cnt < 1 Then{ if condition1 Then{ buy("매수"); cnt = 1; } } ##첫진입 이후(앞에 청산이 있는경우) if MarketPosition() == 0 and cnt == 1 Then{ if IsExitName("매수청산",1) == True Then{ if condition1 Then buy("매수1"); } if IsExitName("매수청산",1) == False Then{ if BarsSinceExit(1) >= 3 and condition1 Then buy("매수2"); } } if 전환선 < 기준선 and C < value2 Then exitlong("매수청산"); SetStopLoss(13);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2018-01-19 10:30:17

안녕하세요 예스스탁입니다. 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); 즐거운 하루되세요 > 매치다는 님이 쓴 글입니다. > 제목 : 세 개의 시스템 신호입니다. > 세 개의 신호를 한개의 시스템으로 만들어주시길 부탁드립니다. 매수진입신호만 부탁드립니다. LRL, LRS, 일목시스템신호인데 한개의 시스템신호로 합쳐주시길 부탁드립니다. 주식 매수 시스템으로 사용 할려고 합니다 1,LRL 시스템 input : P(20),Period(20); var : cnt(0); var1 = LRL(c,P); var2 = ma(c,Period); if crossup(var1,var2) Then value1 = H; if CrossDown(var1,var2) Then value2 = L; condition1 = var1 > var2 and C > var1 and var1 > var1[1] and C > value1; ##차트상 첫진입(앞에 청산이 없는경우) if MarketPosition() == 0 and cnt < 1 Then{ if condition1 Then{ buy("매수"); cnt = 1; } } ##첫진입 이후(앞에 청산이 있는경우) if MarketPosition() == 0 and cnt == 1 Then{ if IsExitName("매수청산",1) == True Then{ if condition1 Then buy("매수1"); } if IsExitName("매수청산",1) == False Then{ if BarsSinceExit(1) >= 3 and condition1 Then buy("매수2"); } } if var1 < var2 and c < value2 Then exitlong("매수청산"); SetStopLoss(13); input : Period1(30),Period2(7),RSQR(15); var : cnt(0); 2,LRS 시스템 var1 = LRS(c,Period1); var2 = ema(var1,Period2); var3 = RSquare(var1,var2,RSQR); if crossup(var1,var2) Then value1 = H; if CrossDown(var1,var2) Then value2 = L; condition1 = var1 > var2 and var1 > var1[1] and var3 > 0.3 and var3 > var3[1] and C > value1; condition2 = var1 < var2 and var1 < var1[1] and var3 > 0.3 and var3 > var3[1] and C < value2; if condition1 == true Then buy(); if var1 < var2 and C < value2 Then exitlong(); if condition2 == True Then sell(); if var1 < var2 and c > value1 Then ExitShort(); SetStopLoss(5); ##차트상 첫진입(앞에 청산이 없는경우) if MarketPosition() == 0 and cnt < 1 Then{ if condition1 Then{ buy("매수"); cnt = 1; } if condition2 Then{ sell("매도"); cnt = 1; } } ##첫진입 이후(앞에 청산이 있는경우) if MarketPosition() == 0 and cnt == 1 Then{ if IsExitName("매수청산",1) == True Then{ if condition1 Then buy("매수1"); } if IsExitName("매수청산",1) == False Then{ if BarsSinceExit(1) >= 3 and condition1 Then buy("매수2"); } } if var1 < var2 and c < value2 Then exitlong("매수청산"); 3,일목 시스템 SetStopLoss(13); var : cnt(0); var : 전환선(0),기준선(0); 전환선 = (highest(H,9)+lowest(L,9))/2; 기준선 = (highest(H,26)+lowest(L,26))/2; if crossup(전환선,기준선) Then value1 = H; if CrossDown(전환선,기준선) Then value2 = L; condition1 = 전환선 > 기준선 and C > 전환선 and 전환선 > 전환선[1] and 기준선 > 기준선[1] and C > value1; ##차트상 첫진입(앞에 청산이 없는경우) if MarketPosition() == 0 and cnt < 1 Then{ if condition1 Then{ buy("매수"); cnt = 1; } } ##첫진입 이후(앞에 청산이 있는경우) if MarketPosition() == 0 and cnt == 1 Then{ if IsExitName("매수청산",1) == True Then{ if condition1 Then buy("매수1"); } if IsExitName("매수청산",1) == False Then{ if BarsSinceExit(1) >= 3 and condition1 Then buy("매수2"); } } if 전환선 < 기준선 and C < value2 Then exitlong("매수청산"); SetStopLoss(13);