커뮤니티

문의 드립니다

프로필 이미지
푸른
2023-09-06 07:31:14
944
글번호 172166
답변완료
1. input : StartTime(150000),EndTime(50000),진입횟수(10); input : 익절틱수(250),손절틱수(50); Input : 당일수익틱수(850),당일손실틱수(100); Input:Length(1),Pval(0.01); var : Tcond(False),entry(0); Variables: Mom(0); Var : N1(0),dayPl(0),당일수익(0),당일손실(0),Xcond(false); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; entry = 0; Xcond = false; N1 = NetProfit; IF Endtime <= starttime Then { SetStopEndofday(0); } } if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then { Tcond = False; } 당일수익 = PriceScale*당일수익틱수; 당일손실 = PriceScale*당일손실틱수; daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] then { if daypl >= 당일수익 or daypl <= -당일손실 Then Xcond = true; if (IsExitName("dbp",1) == true or IsExitName("dbl",1) == true ) then Xcond = true; } if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; Buy("CBI_LE",AtStop,Highest(High,Length)+Pval); ExitLong("CBI_SE",AtStop,Lowest(Low,Length)-Pval); if MarketPosition == 1 then { ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts)); ExitLong("dbl",AtStop,EntryPrice-((당일손실+daypl)/CurrentContracts)); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 2. input : StartTime(150000),EndTime(50000),진입횟수(10); input : 익절틱수(250),손절틱수(50); Input : 당일수익틱수(850),당일손실틱수(100); Input:Length(1),Pval(0.01); var : Tcond(False),entry(0); Variables: Mom(0); Var : N1(0),dayPl(0),당일수익(0),당일손실(0),Xcond(false); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; entry = 0; Xcond = false; N1 = NetProfit; IF Endtime <= starttime Then { SetStopEndofday(0); } } if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then { Tcond = False; } 당일수익 = PriceScale*당일수익틱수; 당일손실 = PriceScale*당일손실틱수; daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] then { if daypl >= 당일수익 or daypl <= -당일손실 Then Xcond = true; if (IsExitName("dbp",1) == true or IsExitName("dbl",1) == true ) then Xcond = true; } if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; ExitShort("CBI_LE",AtStop,Highest(High,Length)+Pval); Sell("CBI_SE",AtStop,Lowest(Low,Length)-Pval); if MarketPosition == 1 then { ExitShort("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts)); ExitShort("dbl",AtStop,EntryPrice-((당일손실+daypl)/CurrentContracts)); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 위 수식어에서 진입없이 연속 손실이 8회의 데이터가 나올때 9회에서 18회까지 진입하는 수식어를 추가할 수 있는지요 ? ----------------- 해외선물 매매에서 3봉이내 저점, 고점의 최소 가격변화가 40틱일때 그 중간인 20틱에 매수나 매도후 5봉 완성에 청산하는 수식어를 부탁드립니다. 매매시간은 21:00~ 05:00 이고 익절 100틱 손절 100틱 입니다
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2023-09-06 09:43:31

안녕하세요 예스스탁입니다. 1 문의하신 내용은 가상으로 진입/청산을 체크해야 하는 내용으로 작성해 보는데 시간이 많이 소모되는 내용입니다. 업무상 일정시간 이상 요구되는 내용은 저희가 작성해 드리기 어렵습니다. 2 올려주신 내용이면 매수진입과 매도진입의 차이가 어떤 부분에서 다른지 알수 없습니다. 3봉 최고/최저 차이가 40틱 이상이고 현재봉이 3봉 최저가이면 다음봉에 상승해 중간값에 도달하면 매수 3봉 최고/최저 차이가 40틱 이상이고 현재봉이 3봉 최고가이면 다음봉에 하락해 중간값에 도달하면 매도로 작성해 드립니다. 아래 내용 참고하셔서 의도하신 진입으로 수정하시기 바랍니다. input : StartTime(210000),EndTime(50000); input : 익절틱수(100),손절틱수(100); var : Tcond(False),entry(0); Variables: Mom(0); Var : N1(0),dayPl(0),당일수익(0),당일손실(0),Xcond(false); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; IF Endtime <= starttime Then { SetStopEndofday(0); } } if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then { Tcond = False; } if Tcond == true Then { if L ==lowest(L,3) and highest(H,3) >= lowest(L,3)+PriceScale*40 Then { Buy("b",AtStop,(highest(H,3)+lowest(L,3))/2); } if H == highest(H,3) and highest(H,3) >= lowest(L,3)+PriceScale*40 Then { Sell("s",AtStop,(highest(H,3)+lowest(L,3))/2); } if MarketPosition == 1 and BarsSinceEntry == 5 Then ExitLong(); if MarketPosition == -1 and BarsSinceEntry == 5 Then ExitShort(); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 문의 드립니다 > 1. input : StartTime(150000),EndTime(50000),진입횟수(10); input : 익절틱수(250),손절틱수(50); Input : 당일수익틱수(850),당일손실틱수(100); Input:Length(1),Pval(0.01); var : Tcond(False),entry(0); Variables: Mom(0); Var : N1(0),dayPl(0),당일수익(0),당일손실(0),Xcond(false); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; entry = 0; Xcond = false; N1 = NetProfit; IF Endtime <= starttime Then { SetStopEndofday(0); } } if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then { Tcond = False; } 당일수익 = PriceScale*당일수익틱수; 당일손실 = PriceScale*당일손실틱수; daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] then { if daypl >= 당일수익 or daypl <= -당일손실 Then Xcond = true; if (IsExitName("dbp",1) == true or IsExitName("dbl",1) == true ) then Xcond = true; } if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; Buy("CBI_LE",AtStop,Highest(High,Length)+Pval); ExitLong("CBI_SE",AtStop,Lowest(Low,Length)-Pval); if MarketPosition == 1 then { ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts)); ExitLong("dbl",AtStop,EntryPrice-((당일손실+daypl)/CurrentContracts)); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 2. input : StartTime(150000),EndTime(50000),진입횟수(10); input : 익절틱수(250),손절틱수(50); Input : 당일수익틱수(850),당일손실틱수(100); Input:Length(1),Pval(0.01); var : Tcond(False),entry(0); Variables: Mom(0); Var : N1(0),dayPl(0),당일수익(0),당일손실(0),Xcond(false); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; entry = 0; Xcond = false; N1 = NetProfit; IF Endtime <= starttime Then { SetStopEndofday(0); } } if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then { Tcond = False; } 당일수익 = PriceScale*당일수익틱수; 당일손실 = PriceScale*당일손실틱수; daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] then { if daypl >= 당일수익 or daypl <= -당일손실 Then Xcond = true; if (IsExitName("dbp",1) == true or IsExitName("dbl",1) == true ) then Xcond = true; } if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; ExitShort("CBI_LE",AtStop,Highest(High,Length)+Pval); Sell("CBI_SE",AtStop,Lowest(Low,Length)-Pval); if MarketPosition == 1 then { ExitShort("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts)); ExitShort("dbl",AtStop,EntryPrice-((당일손실+daypl)/CurrentContracts)); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 위 수식어에서 진입없이 연속 손실이 8회의 데이터가 나올때 9회에서 18회까지 진입하는 수식어를 추가할 수 있는지요 ? ----------------- 해외선물 매매에서 3봉이내 저점, 고점의 최소 가격변화가 40틱일때 그 중간인 20틱에 매수나 매도후 5봉 완성에 청산하는 수식어를 부탁드립니다. 매매시간은 21:00~ 05:00 이고 익절 100틱 손절 100틱 입니다