커뮤니티

문의 드립니다.

프로필 이미지
푸른
2023-09-11 18:40:16
1112
글번호 172359
답변완료
1. input : StartTime(190000),EndTime(30000),진입횟수(0); input : 익절틱수(850),손절틱수(60); 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; } 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(High,Length)+Pval); if MarketPosition < 1 then { ExitLong("dbp",atStop,EntryPrice+((당일수익-daypl)/CurrentContracts)); ExitLong("dbl",AtStop,EntryPrice-((당일손실+daypl)/CurrentContracts)); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 2. input : StartTime(190000),EndTime(30000),진입횟수(0); input : 익절틱수(850),손절틱수(60); 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; } 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",AtStop,EntryPrice-((당일수익-daypl)/CurrentContracts)); ExitShort("dbl",AtStop,EntryPrice-((당일손실+daypl)/CurrentContracts)); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 질의를 드렸던 내용인데요. 매수는 앞 캔들의 고가를 0.01 이상일때 진입신호로 되어있습니다. 매도는 앞 캔들의 저가를 0.01 이상일때 진입신호로 되어있습니다. 아래로 수정을 부탁드립니다. 매수는 앞 캔들의 종가를 0.01 이상일때 진입신호로 수정을 부탁드립니다. 매도는 앞 캔들의 종가를 0.01 이하일때 진입신호로 수정을 부탁드립니다. 미리 감사드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2023-09-12 09:28:26

안녕하세요 예스스탁입니다. Highest(High,Length) Lowest(Low,Length) 현재 진입식에 위 값이 사용되어 있습니다. Highest(Close,Length) Lowest(Close,Length) 기준값을 Close로 변경하시면 됩니다. Length가 1이므로 종가가 됩니다. 1 input : StartTime(190000),EndTime(30000),진입횟수(0); input : 익절틱수(850),손절틱수(60); 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; } 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(C,Length)+Pval); ExitLong("CBI_SE",AtStop,Lowest(c,Length)+Pval); if MarketPosition < 1 then { ExitLong("dbp",atStop,EntryPrice+((당일수익-daypl)/CurrentContracts)); ExitLong("dbl",AtStop,EntryPrice-((당일손실+daypl)/CurrentContracts)); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 2 input : StartTime(190000),EndTime(30000),진입횟수(0); input : 익절틱수(850),손절틱수(60); 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; } 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(C,Length)-Pval); Sell("CBI_SE",AtStop,Lowest(C,Length)-Pval); if MarketPosition < 1 then { ExitShort("dbp",AtStop,EntryPrice-((당일수익-daypl)/CurrentContracts)); ExitShort("dbl",AtStop,EntryPrice-((당일손실+daypl)/CurrentContracts)); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 문의 드립니다. > 1. input : StartTime(190000),EndTime(30000),진입횟수(0); input : 익절틱수(850),손절틱수(60); 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; } 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(High,Length)+Pval); if MarketPosition < 1 then { ExitLong("dbp",atStop,EntryPrice+((당일수익-daypl)/CurrentContracts)); ExitLong("dbl",AtStop,EntryPrice-((당일손실+daypl)/CurrentContracts)); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 2. input : StartTime(190000),EndTime(30000),진입횟수(0); input : 익절틱수(850),손절틱수(60); 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; } 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",AtStop,EntryPrice-((당일수익-daypl)/CurrentContracts)); ExitShort("dbl",AtStop,EntryPrice-((당일손실+daypl)/CurrentContracts)); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 질의를 드렸던 내용인데요. 매수는 앞 캔들의 고가를 0.01 이상일때 진입신호로 되어있습니다. 매도는 앞 캔들의 저가를 0.01 이상일때 진입신호로 되어있습니다. 아래로 수정을 부탁드립니다. 매수는 앞 캔들의 종가를 0.01 이상일때 진입신호로 수정을 부탁드립니다. 매도는 앞 캔들의 종가를 0.01 이하일때 진입신호로 수정을 부탁드립니다. 미리 감사드립니다.