커뮤니티

식추가

프로필 이미지
아트정
2022-04-06 17:39:44
961
글번호 157803
답변완료
input : P(200),dv1(1),dv2(2),short(12),long(26),af(0.02),maxaf(0.2); var : BBup1(0),bbup2(0),bbdn1(0),bbdn2(0),MACDV(0),sarv(0); var : T(0),T1(0); bbup1 = BollBandUp(200,dv1); bbup2 = BollBandUp(200,dv2); bbdn1 = BollBandDown(200,dv1); bbdn2 = BollBandDown(200,dv2); MACDV = MACD(short,long); sarv = sar(af,maxaf); if CrossDown(c,bbup2) then{ T = -1; T1 = T[1]; } if CrossDown(c,bbup1) then{ T = -2; T1 = T[1]; } if CrossDown(c,bbdn1) then{ T = -3; T1 = T[1]; } if CrossDown(c,bbdn2) then{ T = -4; T1 = T[1]; } if CrossUp(c,bbup2) then{ T = 1; T1 = T[1]; } if CrossUp(c,bbup1) then{ T = 2; T1 = T[1]; } if CrossUp(c,bbdn1) then{ T = 3; T1 = T[1]; } if CrossUp(c,bbdn2) then{ T = 4; T1 = T[1]; } if T == 3 and T1 == 4 and MACDV > 0 and C > sarv Then buy(); if T == -2 and T1 == -1 and MACDV < 0 and C < sarv Then sell(); 안녕하세요 위식에 추가 부탁드립니다. 시간설정 오전 07시-익일 05시 수익 100틱. 손절 100틱. 당일 목표달성시 청산. 추가식 부탁드려요 수고하세요
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2022-04-07 10:23:13

안녕하세요 예스스탁입니다. input : P(200),dv1(1),dv2(2),short(12),long(26),af(0.02),maxaf(0.2); input : StartTime(70000),EndTime(050000); input : 익절틱수(100),손절틱수(100); Input : 당일수익틱수(300); Var : N1(0),dayPl(0),당일수익(0),당일손실(0),Xcond(false); var : BBup1(0),bbup2(0),bbdn1(0),bbdn2(0),MACDV(0),sarv(0); var : T(0),T1(0); var : Tcond(false); 당일수익 = PriceScale*당일수익틱수; IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then Tcond = False; if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; Xcond = false; N1 = NetProfit; IF Endtime <= starttime Then { SetStopEndofday(0); } } daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] then { if daypl >= 당일수익 Then Xcond = true; if (IsExitName("dbp",1) == true or IsExitName("dsp",1) == true) then Xcond = true; } bbup1 = BollBandUp(200,dv1); bbup2 = BollBandUp(200,dv2); bbdn1 = BollBandDown(200,dv1); bbdn2 = BollBandDown(200,dv2); MACDV = MACD(short,long); sarv = sar(af,maxaf); if CrossDown(c,bbup2) then{ T = -1; T1 = T[1]; } if CrossDown(c,bbup1) then{ T = -2; T1 = T[1]; } if CrossDown(c,bbdn1) then{ T = -3; T1 = T[1]; } if CrossDown(c,bbdn2) then{ T = -4; T1 = T[1]; } if CrossUp(c,bbup2) then{ T = 1; T1 = T[1]; } if CrossUp(c,bbup1) then{ T = 2; T1 = T[1]; } if CrossUp(c,bbdn1) then{ T = 3; T1 = T[1]; } if CrossUp(c,bbdn2) then{ T = 4; T1 = T[1]; } if Tcond == true and Xcond == False Then { if T == 3 and T1 == 4 and MACDV > 0 and C > sarv Then buy(); if T == -2 and T1 == -1 and MACDV < 0 and C < sarv Then sell(); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); if MarketPosition == 1 then { ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts)); } if MarketPosition == -1 then { ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts)); } 즐거운 하루되세요 > 아트정 님이 쓴 글입니다. > 제목 : 식추가 > input : P(200),dv1(1),dv2(2),short(12),long(26),af(0.02),maxaf(0.2); var : BBup1(0),bbup2(0),bbdn1(0),bbdn2(0),MACDV(0),sarv(0); var : T(0),T1(0); bbup1 = BollBandUp(200,dv1); bbup2 = BollBandUp(200,dv2); bbdn1 = BollBandDown(200,dv1); bbdn2 = BollBandDown(200,dv2); MACDV = MACD(short,long); sarv = sar(af,maxaf); if CrossDown(c,bbup2) then{ T = -1; T1 = T[1]; } if CrossDown(c,bbup1) then{ T = -2; T1 = T[1]; } if CrossDown(c,bbdn1) then{ T = -3; T1 = T[1]; } if CrossDown(c,bbdn2) then{ T = -4; T1 = T[1]; } if CrossUp(c,bbup2) then{ T = 1; T1 = T[1]; } if CrossUp(c,bbup1) then{ T = 2; T1 = T[1]; } if CrossUp(c,bbdn1) then{ T = 3; T1 = T[1]; } if CrossUp(c,bbdn2) then{ T = 4; T1 = T[1]; } if T == 3 and T1 == 4 and MACDV > 0 and C > sarv Then buy(); if T == -2 and T1 == -1 and MACDV < 0 and C < sarv Then sell(); 안녕하세요 위식에 추가 부탁드립니다. 시간설정 오전 07시-익일 05시 수익 100틱. 손절 100틱. 당일 목표달성시 청산. 추가식 부탁드려요 수고하세요