커뮤니티

부탁드립니다.

프로필 이미지
매일상승
2015-06-29 18:35:57
130
글번호 87783
답변완료
아래 수식에서 매매시간을 오후 7 ~ 새벽2시 까지만 매매하고 종료하되 진입된 계약이 있으면 신호가 끝날때 매매종료가 되도록 부탁드립니다. input : ,익절틱수(10); Input : af(0.02), maxAF(0.2); Input : SonarP(9), SonarS(9); input : g(13),r(25),s(2); Input : TrixP(12),TrixS(9); var : SonarV(0),SonarSig(0); var : SMIv(0),T(0); var : TRIXv(0),TRIXsig(0),entry(0); var1 = SAR(af,maxAF); SonarV = SONAR(SonarP); SonarSig = ema(SonarV,SonarS); 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)) ; TRIXv = TRIX(TrixP); TRIXsig = ema(TRIXv,TrixS); if SMIv > SMIv[1] Then T = 1; if SMIv < SMIv[1] Then T = -1; if bdate != bdate[1] Then entry = 0; if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then entry = entry+1; Condition1 = MarketPosition(1) == 1 and IsExitName("StopProfittarget",1) == true; Condition2 = MarketPosition(1) == -1 and IsExitName("StopProfittarget",1) == true; If C > var1 and SonarSig > SonarSig[1] and TRIXsig > TRIXsig[1] and T == 1 Then { if entry == 0 or (entry >= 1 and MarketPosition == -1) or (entry >= 1 and MarketPosition == 0 and Condition1 == false) or (entry >= 1 and MarketPosition == 0 and Condition1 == true and countif(C < var1 or SonarSig < SonarSig[1] or TRIXsig < TRIXsig[1] or T == -1,BarsSinceExit(1)) >= 1) Then Buy(); } # 매도/매수청산 If C < var1 and SonarSig < SonarSig[1] and TRIXsig < TRIXsig[1] and T == -1 Then { MessageLog("%s %s %.f",Condition1,Condition2,entry); if entry == 0 or (entry >= 1 and MarketPosition == 1) or (entry >= 1 and MarketPosition == 0 and Condition2 == false) or (entry >= 1 and MarketPosition == 0 and Condition2 == true and countif(C > var1 or SonarSig > SonarSig[1] or TRIXsig > TRIXsig[1] or T == 1,BarsSinceExit(1)) >= 1) Then { Sell(); } } if MarketPosition == 1 and C < var1 and TRIXsig < TRIXsig[1] and T == -1 Then{ ExitLong(); } if MarketPosition == -1 and C > var1 and TRIXsig > TRIXsig[1] and T == 1 Then{ ExitShort(); } SetStopProfittarget(PriceScale*익절틱수, PointStop);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-06-29 18:43:21

안녕하세요 예스스탁입니다. input : ,익절틱수(10); Input : af(0.02), maxAF(0.2); Input : SonarP(9), SonarS(9); input : g(13),r(25),s(2); Input : TrixP(12),TrixS(9); var : SonarV(0),SonarSig(0); var : SMIv(0),T(0); var : TRIXv(0),TRIXsig(0),entry(0); var1 = SAR(af,maxAF); SonarV = SONAR(SonarP); SonarSig = ema(SonarV,SonarS); 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)) ; TRIXv = TRIX(TrixP); TRIXsig = ema(TRIXv,TrixS); if SMIv > SMIv[1] Then T = 1; if SMIv < SMIv[1] Then T = -1; if bdate != bdate[1] Then entry = 0; if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then entry = entry+1; Condition1 = MarketPosition(1) == 1 and IsExitName("StopProfittarget",1) == true; Condition2 = MarketPosition(1) == -1 and IsExitName("StopProfittarget",1) == true; If C > var1 and SonarSig > SonarSig[1] and TRIXsig > TRIXsig[1] and T == 1 and (stime >= 190000 or stime < 020000) Then { if entry == 0 or (entry >= 1 and MarketPosition == -1) or (entry >= 1 and MarketPosition == 0 and Condition1 == false) or (entry >= 1 and MarketPosition == 0 and Condition1 == true and countif(C < var1 or SonarSig < SonarSig[1] or TRIXsig < TRIXsig[1] or T == -1,BarsSinceExit(1)) >= 1) Then Buy(); } # 매도/매수청산 If C < var1 and SonarSig < SonarSig[1] and TRIXsig < TRIXsig[1] and T == -1 and (stime >= 190000 or stime < 020000) Then { MessageLog("%s %s %.f",Condition1,Condition2,entry); if entry == 0 or (entry >= 1 and MarketPosition == 1) or (entry >= 1 and MarketPosition == 0 and Condition2 == false) or (entry >= 1 and MarketPosition == 0 and Condition2 == true and countif(C > var1 or SonarSig > SonarSig[1] or TRIXsig > TRIXsig[1] or T == 1,BarsSinceExit(1)) >= 1) Then { Sell(); } } if MarketPosition == 1 and C < var1 and TRIXsig < TRIXsig[1] and T == -1 Then{ ExitLong(); } if MarketPosition == -1 and C > var1 and TRIXsig > TRIXsig[1] and T == 1 Then{ ExitShort(); } SetStopProfittarget(PriceScale*익절틱수, PointStop); if stime == 020000 or (stime > 020000 and stime[1] < 020000) Then{ ExitLong(); ExitShort(); } 즐거운 하루되세요 > 매일상승 님이 쓴 글입니다. > 제목 : 부탁드립니다. > 아래 수식에서 매매시간을 오후 7 ~ 새벽2시 까지만 매매하고 종료하되 진입된 계약이 있으면 신호가 끝날때 매매종료가 되도록 부탁드립니다. input : ,익절틱수(10); Input : af(0.02), maxAF(0.2); Input : SonarP(9), SonarS(9); input : g(13),r(25),s(2); Input : TrixP(12),TrixS(9); var : SonarV(0),SonarSig(0); var : SMIv(0),T(0); var : TRIXv(0),TRIXsig(0),entry(0); var1 = SAR(af,maxAF); SonarV = SONAR(SonarP); SonarSig = ema(SonarV,SonarS); 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)) ; TRIXv = TRIX(TrixP); TRIXsig = ema(TRIXv,TrixS); if SMIv > SMIv[1] Then T = 1; if SMIv < SMIv[1] Then T = -1; if bdate != bdate[1] Then entry = 0; if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then entry = entry+1; Condition1 = MarketPosition(1) == 1 and IsExitName("StopProfittarget",1) == true; Condition2 = MarketPosition(1) == -1 and IsExitName("StopProfittarget",1) == true; If C > var1 and SonarSig > SonarSig[1] and TRIXsig > TRIXsig[1] and T == 1 Then { if entry == 0 or (entry >= 1 and MarketPosition == -1) or (entry >= 1 and MarketPosition == 0 and Condition1 == false) or (entry >= 1 and MarketPosition == 0 and Condition1 == true and countif(C < var1 or SonarSig < SonarSig[1] or TRIXsig < TRIXsig[1] or T == -1,BarsSinceExit(1)) >= 1) Then Buy(); } # 매도/매수청산 If C < var1 and SonarSig < SonarSig[1] and TRIXsig < TRIXsig[1] and T == -1 Then { MessageLog("%s %s %.f",Condition1,Condition2,entry); if entry == 0 or (entry >= 1 and MarketPosition == 1) or (entry >= 1 and MarketPosition == 0 and Condition2 == false) or (entry >= 1 and MarketPosition == 0 and Condition2 == true and countif(C > var1 or SonarSig > SonarSig[1] or TRIXsig > TRIXsig[1] or T == 1,BarsSinceExit(1)) >= 1) Then { Sell(); } } if MarketPosition == 1 and C < var1 and TRIXsig < TRIXsig[1] and T == -1 Then{ ExitLong(); } if MarketPosition == -1 and C > var1 and TRIXsig > TRIXsig[1] and T == 1 Then{ ExitShort(); } SetStopProfittarget(PriceScale*익절틱수, PointStop);