커뮤니티

부탁드립니다.

프로필 이미지
vmfha
2015-06-08 13:31:44
150
글번호 86936
답변완료
input : ,익절틱수(40),당일수익(120);#틱수 input : 당일손실(80);#틱수 Input : Period(12), sigPeriod(9); input : g(25),r(50),s(2); Input : period1(12); var : NP(0),PreNP(0),dayPL(0),Econd(false); var : SMIv(0),T(0); Var : sonarv(0); sonarv = SONAR(period1); value1 = TRIX(Period); value2 = ema(value1, sigPeriod); SMIv = ema(ema(c-(highest(H,g) + lowest(L,g))*0.5, r),s) * 100 / (0.5 * ema(ema(highest(H,g)-lowest(L,g),r),s)) ; NP = NetProfit; if bdate != bdate[1] Then{ PreNP = NP[1]; Econd = false; } dayPL = NP-PreNP; if BarsSinceExit(1) == 1 and (IsExitName("bx1",1) or IsExitName("sx1",1)) Then Econd = true; if Econd == false Then{ if stime >= 090000 or stime < 020000 then{ if SMIv > SMIv[1] Then T = 1; if SMIv < SMIv[1] Then T = -1; If CrossUP(value1, value2) and T == 1 and sonarv > sonarv[1] and C <= O Then buy(); If CrossDown(value1, value2) and T == -1 and sonarv < sonarv[1] and C >= O Then sell(); if MarketPosition == 1 Then ExitLong("bx",AtStop,EntryPrice+PriceScale*1); } ExitLong("bx1",AtLimit,EntryPrice+((당일수익*PriceScale)-daypl)); ExitLong("bx2",AtStop,EntryPrice-((당일손실*PriceScale)+daypl)); } if MarketPosition == -1 Then ExitShort("sx",AtStop,EntryPrice-PriceScale*1); ExitLong("sx1",AtLimit,EntryPrice-((당일수익*PriceScale)-daypl)); ExitLong("sx2",AtStop,EntryPrice+((당일손실*PriceScale)+daypl)); SetStopProfittarget(PriceScale*익절틱수, PointStop); if stime == 050000 or (stime > 050000 and stime[1] < 050000) Then{ ExitLong(); ExitShort(); } 상기식을 작성을 했는데... 신호가 안뜨네요.. 어디가 잘못됐는지 검토해서 수정부탁드립니다.
시스템
답변 3
프로필 이미지

예스스탁 예스스탁 답변

2015-06-08 13:55:33

안녕하세요 예스스탁입니다. 중괄호 치기에 이상이 있어 수정했습니다. input : 익절틱수(40),당일수익(120);#틱수 input : 당일손실(80);#틱수 Input : Period(12), sigPeriod(9); input : g(25),r(50),s(2); Input : period1(12); var : NP(0),PreNP(0),dayPL(0),Econd(false); var : SMIv(0),T(0); Var : sonarv(0); sonarv = SONAR(period1); value1 = TRIX(Period); value2 = ema(value1, sigPeriod); SMIv = ema(ema(c-(highest(H,g) + lowest(L,g))*0.5, r),s) * 100 / (0.5 * ema(ema(highest(H,g)-lowest(L,g),r),s)) ; NP = NetProfit; if bdate != bdate[1] Then{ PreNP = NP[1]; Econd = false; } dayPL = NP-PreNP; if BarsSinceExit(1) == 1 and (IsExitName("bx1",1) or IsExitName("sx1",1)) Then Econd = true; if Econd == false Then{ if stime >= 090000 or stime < 020000 then{ if SMIv > SMIv[1] Then T = 1; if SMIv < SMIv[1] Then T = -1; If CrossUP(value1, value2) and T == 1 and sonarv > sonarv[1] and C <= O Then buy(); If CrossDown(value1, value2) and T == -1 and sonarv < sonarv[1] and C >= O Then sell(); } } if MarketPosition == 1 Then{ ExitLong("bx",AtStop,EntryPrice+PriceScale*1); ExitLong("bx1",AtLimit,EntryPrice+((당일수익*PriceScale)-daypl)); ExitLong("bx2",AtStop,EntryPrice-((당일손실*PriceScale)+daypl)); } if MarketPosition == -1 Then{ ExitShort("sx",AtStop,EntryPrice-PriceScale*1); ExitLong("sx1",AtLimit,EntryPrice-((당일수익*PriceScale)-daypl)); ExitLong("sx2",AtStop,EntryPrice+((당일손실*PriceScale)+daypl)); } SetStopProfittarget(PriceScale*익절틱수, PointStop); if stime == 050000 or (stime > 050000 and stime[1] < 050000) Then{ ExitLong(); ExitShort(); } 즐거운 하루되세요 > vmfha 님이 쓴 글입니다. > 제목 : 부탁드립니다. > input : ,익절틱수(40),당일수익(120);#틱수 input : 당일손실(80);#틱수 Input : Period(12), sigPeriod(9); input : g(25),r(50),s(2); Input : period1(12); var : NP(0),PreNP(0),dayPL(0),Econd(false); var : SMIv(0),T(0); Var : sonarv(0); sonarv = SONAR(period1); value1 = TRIX(Period); value2 = ema(value1, sigPeriod); SMIv = ema(ema(c-(highest(H,g) + lowest(L,g))*0.5, r),s) * 100 / (0.5 * ema(ema(highest(H,g)-lowest(L,g),r),s)) ; NP = NetProfit; if bdate != bdate[1] Then{ PreNP = NP[1]; Econd = false; } dayPL = NP-PreNP; if BarsSinceExit(1) == 1 and (IsExitName("bx1",1) or IsExitName("sx1",1)) Then Econd = true; if Econd == false Then{ if stime >= 090000 or stime < 020000 then{ if SMIv > SMIv[1] Then T = 1; if SMIv < SMIv[1] Then T = -1; If CrossUP(value1, value2) and T == 1 and sonarv > sonarv[1] and C <= O Then buy(); If CrossDown(value1, value2) and T == -1 and sonarv < sonarv[1] and C >= O Then sell(); if MarketPosition == 1 Then ExitLong("bx",AtStop,EntryPrice+PriceScale*1); } ExitLong("bx1",AtLimit,EntryPrice+((당일수익*PriceScale)-daypl)); ExitLong("bx2",AtStop,EntryPrice-((당일손실*PriceScale)+daypl)); } if MarketPosition == -1 Then ExitShort("sx",AtStop,EntryPrice-PriceScale*1); ExitLong("sx1",AtLimit,EntryPrice-((당일수익*PriceScale)-daypl)); ExitLong("sx2",AtStop,EntryPrice+((당일손실*PriceScale)+daypl)); SetStopProfittarget(PriceScale*익절틱수, PointStop); if stime == 050000 or (stime > 050000 and stime[1] < 050000) Then{ ExitLong(); ExitShort(); } 상기식을 작성을 했는데... 신호가 안뜨네요.. 어디가 잘못됐는지 검토해서 수정부탁드립니다.
프로필 이미지

vmfha

2015-06-08 14:48:53

적용을했는데.. 그림1처럼 진입이 되면 바로 청산이 되고.. 그림2처럼 신호가 발생이 제대로 안되네요... 혹 모의라 그런가요? ( 진입후 2번째봉에서 모두 청산이 되어버렸네요..) > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 부탁드립니다. > 안녕하세요 예스스탁입니다. 중괄호 치기에 이상이 있어 수정했습니다. input : 익절틱수(40),당일수익(120);#틱수 input : 당일손실(80);#틱수 Input : Period(12), sigPeriod(9); input : g(25),r(50),s(2); Input : period1(12); var : NP(0),PreNP(0),dayPL(0),Econd(false); var : SMIv(0),T(0); Var : sonarv(0); sonarv = SONAR(period1); value1 = TRIX(Period); value2 = ema(value1, sigPeriod); SMIv = ema(ema(c-(highest(H,g) + lowest(L,g))*0.5, r),s) * 100 / (0.5 * ema(ema(highest(H,g)-lowest(L,g),r),s)) ; NP = NetProfit; if bdate != bdate[1] Then{ PreNP = NP[1]; Econd = false; } dayPL = NP-PreNP; if BarsSinceExit(1) == 1 and (IsExitName("bx1",1) or IsExitName("sx1",1)) Then Econd = true; if Econd == false Then{ if stime >= 090000 or stime < 020000 then{ if SMIv > SMIv[1] Then T = 1; if SMIv < SMIv[1] Then T = -1; If CrossUP(value1, value2) and T == 1 and sonarv > sonarv[1] and C <= O Then buy(); If CrossDown(value1, value2) and T == -1 and sonarv < sonarv[1] and C >= O Then sell(); } } if MarketPosition == 1 Then{ ExitLong("bx",AtStop,EntryPrice+PriceScale*1); ExitLong("bx1",AtLimit,EntryPrice+((당일수익*PriceScale)-daypl)); ExitLong("bx2",AtStop,EntryPrice-((당일손실*PriceScale)+daypl)); } if MarketPosition == -1 Then{ ExitShort("sx",AtStop,EntryPrice-PriceScale*1); ExitLong("sx1",AtLimit,EntryPrice-((당일수익*PriceScale)-daypl)); ExitLong("sx2",AtStop,EntryPrice+((당일손실*PriceScale)+daypl)); } SetStopProfittarget(PriceScale*익절틱수, PointStop); if stime == 050000 or (stime > 050000 and stime[1] < 050000) Then{ ExitLong(); ExitShort(); } 즐거운 하루되세요 > vmfha 님이 쓴 글입니다. > 제목 : 부탁드립니다. > input : ,익절틱수(40),당일수익(120);#틱수 input : 당일손실(80);#틱수 Input : Period(12), sigPeriod(9); input : g(25),r(50),s(2); Input : period1(12); var : NP(0),PreNP(0),dayPL(0),Econd(false); var : SMIv(0),T(0); Var : sonarv(0); sonarv = SONAR(period1); value1 = TRIX(Period); value2 = ema(value1, sigPeriod); SMIv = ema(ema(c-(highest(H,g) + lowest(L,g))*0.5, r),s) * 100 / (0.5 * ema(ema(highest(H,g)-lowest(L,g),r),s)) ; NP = NetProfit; if bdate != bdate[1] Then{ PreNP = NP[1]; Econd = false; } dayPL = NP-PreNP; if BarsSinceExit(1) == 1 and (IsExitName("bx1",1) or IsExitName("sx1",1)) Then Econd = true; if Econd == false Then{ if stime >= 090000 or stime < 020000 then{ if SMIv > SMIv[1] Then T = 1; if SMIv < SMIv[1] Then T = -1; If CrossUP(value1, value2) and T == 1 and sonarv > sonarv[1] and C <= O Then buy(); If CrossDown(value1, value2) and T == -1 and sonarv < sonarv[1] and C >= O Then sell(); if MarketPosition == 1 Then ExitLong("bx",AtStop,EntryPrice+PriceScale*1); } ExitLong("bx1",AtLimit,EntryPrice+((당일수익*PriceScale)-daypl)); ExitLong("bx2",AtStop,EntryPrice-((당일손실*PriceScale)+daypl)); } if MarketPosition == -1 Then ExitShort("sx",AtStop,EntryPrice-PriceScale*1); ExitLong("sx1",AtLimit,EntryPrice-((당일수익*PriceScale)-daypl)); ExitLong("sx2",AtStop,EntryPrice+((당일손실*PriceScale)+daypl)); SetStopProfittarget(PriceScale*익절틱수, PointStop); if stime == 050000 or (stime > 050000 and stime[1] < 050000) Then{ ExitLong(); ExitShort(); } 상기식을 작성을 했는데... 신호가 안뜨네요.. 어디가 잘못됐는지 검토해서 수정부탁드립니다.
프로필 이미지

예스스탁 예스스탁 답변

2015-06-08 14:56:29

안녕하세요 예스스탁입니다. 청산중에 bx와 sx라는 이름의 청산식 살펴보시기 바랍니다. 해당 청산이 매수진입 후 진입가+1틱보다 작거나 같으면 청산. 매도진입 후 진압가-1틱보다 크거나 같으면 청산하는 내용입니다. 해당 청산이 어떤 내용을 구현하고자 작성한 내용인지 알수가 없어 수정을 해드릴수가 없습니다. 1틱 손실청산이면 아래와 같이 변경하시면 되며 익절이면 따로 목표수익 청산이 있으므로 해당 내용은 필요가 없습니다. ExitLong("bx",AtStop,EntryPrice-PriceScale*1); ExitShort("sx",AtStop,EntryPrice+PriceScale*1); 즐거운 하루되세요 > vmfha 님이 쓴 글입니다. > 제목 : 재검토 부탁드립니다. > 적용을했는데.. 그림1처럼 진입이 되면 바로 청산이 되고.. 그림2처럼 신호가 발생이 제대로 안되네요... 혹 모의라 그런가요? ( 진입후 2번째봉에서 모두 청산이 되어버렸네요..) > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 부탁드립니다. > 안녕하세요 예스스탁입니다. 중괄호 치기에 이상이 있어 수정했습니다. input : 익절틱수(40),당일수익(120);#틱수 input : 당일손실(80);#틱수 Input : Period(12), sigPeriod(9); input : g(25),r(50),s(2); Input : period1(12); var : NP(0),PreNP(0),dayPL(0),Econd(false); var : SMIv(0),T(0); Var : sonarv(0); sonarv = SONAR(period1); value1 = TRIX(Period); value2 = ema(value1, sigPeriod); SMIv = ema(ema(c-(highest(H,g) + lowest(L,g))*0.5, r),s) * 100 / (0.5 * ema(ema(highest(H,g)-lowest(L,g),r),s)) ; NP = NetProfit; if bdate != bdate[1] Then{ PreNP = NP[1]; Econd = false; } dayPL = NP-PreNP; if BarsSinceExit(1) == 1 and (IsExitName("bx1",1) or IsExitName("sx1",1)) Then Econd = true; if Econd == false Then{ if stime >= 090000 or stime < 020000 then{ if SMIv > SMIv[1] Then T = 1; if SMIv < SMIv[1] Then T = -1; If CrossUP(value1, value2) and T == 1 and sonarv > sonarv[1] and C <= O Then buy(); If CrossDown(value1, value2) and T == -1 and sonarv < sonarv[1] and C >= O Then sell(); } } if MarketPosition == 1 Then{ ExitLong("bx",AtStop,EntryPrice+PriceScale*1); ExitLong("bx1",AtLimit,EntryPrice+((당일수익*PriceScale)-daypl)); ExitLong("bx2",AtStop,EntryPrice-((당일손실*PriceScale)+daypl)); } if MarketPosition == -1 Then{ ExitShort("sx",AtStop,EntryPrice-PriceScale*1); ExitLong("sx1",AtLimit,EntryPrice-((당일수익*PriceScale)-daypl)); ExitLong("sx2",AtStop,EntryPrice+((당일손실*PriceScale)+daypl)); } SetStopProfittarget(PriceScale*익절틱수, PointStop); if stime == 050000 or (stime > 050000 and stime[1] < 050000) Then{ ExitLong(); ExitShort(); } 즐거운 하루되세요 > vmfha 님이 쓴 글입니다. > 제목 : 부탁드립니다. > input : ,익절틱수(40),당일수익(120);#틱수 input : 당일손실(80);#틱수 Input : Period(12), sigPeriod(9); input : g(25),r(50),s(2); Input : period1(12); var : NP(0),PreNP(0),dayPL(0),Econd(false); var : SMIv(0),T(0); Var : sonarv(0); sonarv = SONAR(period1); value1 = TRIX(Period); value2 = ema(value1, sigPeriod); SMIv = ema(ema(c-(highest(H,g) + lowest(L,g))*0.5, r),s) * 100 / (0.5 * ema(ema(highest(H,g)-lowest(L,g),r),s)) ; NP = NetProfit; if bdate != bdate[1] Then{ PreNP = NP[1]; Econd = false; } dayPL = NP-PreNP; if BarsSinceExit(1) == 1 and (IsExitName("bx1",1) or IsExitName("sx1",1)) Then Econd = true; if Econd == false Then{ if stime >= 090000 or stime < 020000 then{ if SMIv > SMIv[1] Then T = 1; if SMIv < SMIv[1] Then T = -1; If CrossUP(value1, value2) and T == 1 and sonarv > sonarv[1] and C <= O Then buy(); If CrossDown(value1, value2) and T == -1 and sonarv < sonarv[1] and C >= O Then sell(); if MarketPosition == 1 Then ExitLong("bx",AtStop,EntryPrice+PriceScale*1); } ExitLong("bx1",AtLimit,EntryPrice+((당일수익*PriceScale)-daypl)); ExitLong("bx2",AtStop,EntryPrice-((당일손실*PriceScale)+daypl)); } if MarketPosition == -1 Then ExitShort("sx",AtStop,EntryPrice-PriceScale*1); ExitLong("sx1",AtLimit,EntryPrice-((당일수익*PriceScale)-daypl)); ExitLong("sx2",AtStop,EntryPrice+((당일손실*PriceScale)+daypl)); SetStopProfittarget(PriceScale*익절틱수, PointStop); if stime == 050000 or (stime > 050000 and stime[1] < 050000) Then{ ExitLong(); ExitShort(); } 상기식을 작성을 했는데... 신호가 안뜨네요.. 어디가 잘못됐는지 검토해서 수정부탁드립니다.