커뮤니티

검토부탁드립니다.

프로필 이미지
골드핑거
2011-04-07 21:09:19
842
글번호 37373
답변완료
수식에러를 밝히기 어렵군요 검토부탁드립니다. 혹시 Li1 대신 종가를 지정했는데( 진입조건발생시 ma의스윙로우1번 발생안되므로)그 원인인지요? Inputs : R(4), S(8), U(6), ZEROLINE(0), SMTHLEN(10), stp(30), sl(100), 세(220), ts(50), st(10); Input : left(2), right(2), total(100); Var : Tstrength(0), Tstrengthsig(0), Upvalue(0),upclose(0), BARN(0); Var :H1(0), L1(0), H2(0), L2(0); Var : Hi1(0), Hi2(0), Li1(0), Li2(0); Tstrength = TSI(C, R, S, U); Tstrengthsig = Ema(Tsi(C,R,S,U), SMTHLEN); //가장최근 상향돌파시점의 Tstrength값 If crossup(Tstrength, Tstrengthsig) then Upvalue = Tstrength; // 조건발생봉의 종가 If Tstrength < Tstrengthsig and Tstrength[2]>Tstrengthsig[1] And Tstrength[1] < Tstrength then // 이부분 swinglow로 처리하면? Upclose = C[1]; Barn = 1; Var1 = ma(C,5); H1 = swinghigh(1, var1, left, right, total); H2 = swinghigh(2, var1, left, right, total); L1 = swinglow(1, var1, left, right, total); L2 = swinglow(2, var1, left, right, total); Hi1 = swinghighbar(1, var1, left, right, total); Hi2 = swinghighbar(2, var1, left, right, total); Li1 = swinglowbar(1, var1, left, right, total); //Li2 = swinglowbar(2, var1, left, right, total); If marketposition == 0 and (Totaltrades == 0 or totaltrades > 0) and Barssinceexit(1)>= 10 Then { //청산이후 10개 봉 이상경과후 진입 If ma(C,20)>C and ma(C,20)[10]>ma(C,20) then { if Tstrength< tstrengthsig and Tstrength[2] >Tstrength[1] and Tstrength[1]< Tstrength then { if Tstrength > Upvalue and // 현재 Tstrength가 최근 상향돌파 시점의 값보다 큼 C/ma(C,20)100<99.7 then Buy("b1"); } } If ma(C,20)<C and ma(C,20)[10]<ma(c,20) then { if Tstrength < Tstrengthsig and Tstrength[2] >Tstrength[1] and Tstrength[1]< Tstrength then { if Tstrength > Upvalue and // 현재 Tstrength가 최근 상향돌파 시점의 값보다 큼 C/ma(C,20)100<99.0 then Buy("b2"); } } // buy 청산 If MarketPosition==1 and Tstrength > Tstrengthsig and Tstrength[2]< Tstrength[1] and Tstrength[1]> Tstrength then Exitlong("bx");
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2011-04-08 10:23:47

안녕하세요 예스스탁입니다. If Tstrength < Tstrengthsig and Tstrength[2]>Tstrengthsig[1] And Tstrength[1] < Tstrength then{ // 이부분 swinglow로 처리하면? Upclose = C[1]; Barn = 1; } 기존 스윙로우를 사용하지 않으시고 TSI로 지정하시고자 하시면 위에 작성하신 것과 같이 해서 만드시면 됩니다. swing함수는 좌우측봉과 가격만 비교하므로 현재 골드데드를 지정할 수 없으므로 위와 같이 풀어 작성하는 것이 맞습니다. 수식 에러는 ()쓰기가 잘못되어 있었고 이격도 부분에 *에 빠져있어 발생한 내용이었습니다. Inputs : R(4), S(8), U(6), ZEROLINE(0), SMTHLEN(10), stp(30), sl(100), 세(220), ts(50), st(10); Input : left(2), right(2), total(100); Var : Tstrength(0), Tstrengthsig(0), Upvalue(0),upclose(0), BARN(0); Var :H1(0), L1(0), H2(0), L2(0); Var : Hi1(0), Hi2(0), Li1(0), Li2(0); Tstrength = TSI(C, R, S, U); Tstrengthsig = Ema(Tsi(C,R,S,U), SMTHLEN); //가장최근 상향돌파시점의 Tstrength값 If crossup(Tstrength, Tstrengthsig) then Upvalue = Tstrength; // 조건발생봉의 종가 If Tstrength < Tstrengthsig and Tstrength[2]>Tstrengthsig[1] And Tstrength[1] < Tstrength then{ // 이부분 swinglow로 처리하면? Upclose = C[1]; Barn = 1; } Var1 = ma(C,5); H1 = swinghigh(1, var1, left, right, total); H2 = swinghigh(2, var1, left, right, total); L1 = swinglow(1, var1, left, right, total); L2 = swinglow(2, var1, left, right, total); Hi1 = swinghighbar(1, var1, left, right, total); Hi2 = swinghighbar(2, var1, left, right, total); Li1 = swinglowbar(1, var1, left, right, total); //Li2 = swinglowbar(2, var1, left, right, total); If marketposition == 0 and (Totaltrades == 0 or (totaltrades > 0 and Barssinceexit(1)>= 10)) Then { //청산이후 10개 봉 이상경과후 진입 If ma(C,20)>C and ma(C,20)[10]>ma(C,20) then { if Tstrength< tstrengthsig and Tstrength[2] >Tstrength[1] and Tstrength[1]< Tstrength then { if Tstrength > Upvalue and // 현재 Tstrength가 최근 상향돌파 시점의 값보다 큼 C/ma(C,20)*100<99.7 then Buy("b1"); } } If ma(C,20)<C and ma(C,20)[10]<ma(c,20) then { if Tstrength < Tstrengthsig and Tstrength[2] >Tstrength[1] and Tstrength[1]< Tstrength then { if Tstrength > Upvalue and // 현재 Tstrength가 최근 상향돌파 시점의 값보다 큼 C/ma(C,20)*100<99.0 then Buy("b2"); } } } // buy 청산 If MarketPosition==1 and Tstrength > Tstrengthsig and Tstrength[2]< Tstrength[1] and Tstrength[1]> Tstrength then Exitlong("bx"); 즐거운 하루되세요 > 골드핑거 님이 쓴 글입니다. > 제목 : 검토부탁드립니다. > 수식에러를 밝히기 어렵군요 검토부탁드립니다. 혹시 Li1 대신 종가를 지정했는데( 진입조건발생시 ma의스윙로우1번 발생안되므로)그 원인인지요? Inputs : R(4), S(8), U(6), ZEROLINE(0), SMTHLEN(10), stp(30), sl(100), 세(220), ts(50), st(10); Input : left(2), right(2), total(100); Var : Tstrength(0), Tstrengthsig(0), Upvalue(0),upclose(0), BARN(0); Var :H1(0), L1(0), H2(0), L2(0); Var : Hi1(0), Hi2(0), Li1(0), Li2(0); Tstrength = TSI(C, R, S, U); Tstrengthsig = Ema(Tsi(C,R,S,U), SMTHLEN); //가장최근 상향돌파시점의 Tstrength값 If crossup(Tstrength, Tstrengthsig) then Upvalue = Tstrength; // 조건발생봉의 종가 If Tstrength < Tstrengthsig and Tstrength[2]>Tstrengthsig[1] And Tstrength[1] < Tstrength then // 이부분 swinglow로 처리하면? Upclose = C[1]; Barn = 1; Var1 = ma(C,5); H1 = swinghigh(1, var1, left, right, total); H2 = swinghigh(2, var1, left, right, total); L1 = swinglow(1, var1, left, right, total); L2 = swinglow(2, var1, left, right, total); Hi1 = swinghighbar(1, var1, left, right, total); Hi2 = swinghighbar(2, var1, left, right, total); Li1 = swinglowbar(1, var1, left, right, total); //Li2 = swinglowbar(2, var1, left, right, total); If marketposition == 0 and (Totaltrades == 0 or totaltrades > 0) and Barssinceexit(1)>= 10 Then { //청산이후 10개 봉 이상경과후 진입 If ma(C,20)>C and ma(C,20)[10]>ma(C,20) then { if Tstrength< tstrengthsig and Tstrength[2] >Tstrength[1] and Tstrength[1]< Tstrength then { if Tstrength > Upvalue and // 현재 Tstrength가 최근 상향돌파 시점의 값보다 큼 C/ma(C,20)100<99.7 then Buy("b1"); } } If ma(C,20)<C and ma(C,20)[10]<ma(c,20) then { if Tstrength < Tstrengthsig and Tstrength[2] >Tstrength[1] and Tstrength[1]< Tstrength then { if Tstrength > Upvalue and // 현재 Tstrength가 최근 상향돌파 시점의 값보다 큼 C/ma(C,20)100<99.0 then Buy("b2"); } } // buy 청산 If MarketPosition==1 and Tstrength > Tstrengthsig and Tstrength[2]< Tstrength[1] and Tstrength[1]> Tstrength then Exitlong("bx");