커뮤니티

문의 드립니다

프로필 이미지
푸른
2025-02-07 04:38:59
390
글번호 187877
답변완료
input : StartTime(80000),EndTime(60000),Xtime(60000); var : Tcond(false),entry(0); if sdate != sDate[1] Then SetStopEndofday(Xtime); 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; SetStopEndofday(0); entry = 0; } if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; Inputs: VtyPercent(0.10),ATRperiod(1); input : P1(1),P2(3); var : m1(0),m2(0); m1 = ma(C,P1); m2 = ma(C,P2); If MarketPosition() <> 1 and m1 > m2 Then Buy ("Vty_LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("Vty_SE1)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 and m1 > m2 Then Buy ("Vty_LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("Vty_SE2)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 and m1 > m2 Then Buy ("Vty_LE3", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("Vty_SE3)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 and m1 > m2 Then Buy ("Vty_LE4", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("Vty_SE4)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 and m1 > m2 Then Buy ("Vty_LE5", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("Vty_SE5)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); 하나의 캔들에 진입 청산후 또 동일조건이 왔을때 신호 허용이 가능하지요 ? ----------------------------------------- input : StartTime(192000),EndTime(52000); input : 익절틱수(0),손절틱수(0); var : Tcond(False),entry(0); Variables: Mom(0); 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,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 Then { Buy("b",AtStop,(highest(H,2)+lowest(L,2))/2); } if MarketPosition == 1 and BarsSinceEntry == 9 Then ExitShort(); } if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 Then { Sell("s",AtStop,(lowest(L,2)+highest(H,2))/2); } if MarketPosition == -1 and BarsSinceEntry == 9 Then ExitLong(); 수식의 해석을 부탁드립니다.
시스템
답변 3
프로필 이미지

예스스탁 예스스탁 답변

2025-02-07 11:15:01

안녕하세요 예스스탁입니다. 1 하나의 신호함수는 한봉에 1번만 발생합니다. 한봉에 동일조건에서 여러번 발생하기 위해서는 작 성하신 식과 같이 동일 내용으로 여러번 반복해서 작성해 주시면 됩니다. 2 매도진입과 매도청산에 내용이 이상해서 수정했습니다. 2개봉 최고가와 최저가 폭이 1틱 이상이므로 해당 내용은 매수집입과 동일해야 합니다. 매도청산은 청산함수가 exitlong 으로 되어 있어 exitshort으로 변경했습니다. input : StartTime(192000),EndTime(52000); input : 익절틱수(0),손절틱수(0); var : Tcond(False),entry(0); Variables: Mom(0); #당일청산지정 IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } #StartTime이후 첫봉 if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { #Tcond는 true Tcond = true; IF Endtime <= starttime Then { SetStopEndofday(0); } } #EndTimed이후 첫봉 if (sdate != sdate[1] and stime >= EndTime) or (sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then { #Tcond는 False Tcond = False; } #지정한 시간 사이에 if Tcond == true Then { #현재봉 저가가 2개봉 최저가이고 2개봉 최저가와 최고가 폭은 1틱 이상이면 if L ==lowest(L,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 Then { #다음봉에서 2개봉 최고가와 최저가의 중간값 이상의 시세가 발생하면 매수 Buy("b",AtStop,(highest(H,2)+lowest(L,2))/2); } #매수진입후 9번째봉에 청산 if MarketPosition == 1 and BarsSinceEntry == 9 Then ExitShort(); } #현재봉 고가가 2개봉 최고가이고 2개봉 최저가와 최고가 폭은 1틱 이상이면 if H == highest(H,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 Then { #다음봉에서 2개봉 최고가와 최저가의 중간값 이하의 시세가 발생하면 매도 Sell("s",AtStop,(lowest(L,2)+highest(H,2))/2); } #진입 후 9번째 봉에 청산 if MarketPosition == -1 and BarsSinceEntry == 9 Then ExitShort(); 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 문의 드립니다 > input : StartTime(80000),EndTime(60000),Xtime(60000); var : Tcond(false),entry(0); if sdate != sDate[1] Then SetStopEndofday(Xtime); 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; SetStopEndofday(0); entry = 0; } if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; Inputs: VtyPercent(0.10),ATRperiod(1); input : P1(1),P2(3); var : m1(0),m2(0); m1 = ma(C,P1); m2 = ma(C,P2); If MarketPosition() <> 1 and m1 > m2 Then Buy ("Vty_LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("Vty_SE1)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 and m1 > m2 Then Buy ("Vty_LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("Vty_SE2)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 and m1 > m2 Then Buy ("Vty_LE3", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("Vty_SE3)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 and m1 > m2 Then Buy ("Vty_LE4", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("Vty_SE4)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 and m1 > m2 Then Buy ("Vty_LE5", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("Vty_SE5)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); 하나의 캔들에 진입 청산후 또 동일조건이 왔을때 신호 허용이 가능하지요 ? ----------------------------------------- input : StartTime(192000),EndTime(52000); input : 익절틱수(0),손절틱수(0); var : Tcond(False),entry(0); Variables: Mom(0); 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,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 Then { Buy("b",AtStop,(highest(H,2)+lowest(L,2))/2); } if MarketPosition == 1 and BarsSinceEntry == 9 Then ExitShort(); } if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 Then { Sell("s",AtStop,(lowest(L,2)+highest(H,2))/2); } if MarketPosition == -1 and BarsSinceEntry == 9 Then ExitLong(); 수식의 해석을 부탁드립니다.
프로필 이미지

푸른

2025-02-13 05:00:01

Inputs: VtyPercent(0.10),ATRperiod(10); input : StartTime(210000),EndTime(60000); var : Tcond(false); 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; IF Endtime <= starttime Then { SetStopEndofday(0); } } If MarketPosition() <> 1 Then Buy ("LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitLong ("SE1", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitShort ("LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then sell ("SE2", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then Buy ("LE3", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitLong ("SE3", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitShort ("L4E", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then sell ("SE4", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then Buy ("LE5", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitLong ("SE5", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitShort ("LE6", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then sell ("SE6", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then Buy ("LE7", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitLong ("SE7", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitShort ("LE8", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then sell ("SE8", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then Buy ("LE9", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitLong ("SE9", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitShort ("LE10", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then sell ("SE10", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then Buy ("LE11", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitLong ("SE11", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitShort ("LE12", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then sell ("SE12", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then Buy ("LE13", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitLong ("SE13", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitShort ("LE14", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then sell ("SE14", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then Buy ("LE15", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitLong ("SE15", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitShort ("LE16", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then sell ("SE16", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then Buy ("LE17", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitLong ("SE17", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitShort ("LE18", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then sell ("SE18", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then Buy ("LE19", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitLong ("SE19", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitShort ("LE20", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then sell ("SE20", AtStop, Close - (VtyPercent * ATR(ATRperiod))); ------------------------------ > 푸른 님이 쓴 글입니다. > 제목 : 문의 드립니다 > input : StartTime(80000),EndTime(60000),Xtime(60000); var : Tcond(false),entry(0); if sdate != sDate[1] Then SetStopEndofday(Xtime); 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; SetStopEndofday(0); entry = 0; } if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; Inputs: VtyPercent(0.10),ATRperiod(1); input : P1(1),P2(3); var : m1(0),m2(0); m1 = ma(C,P1); m2 = ma(C,P2); If MarketPosition() <> 1 and m1 > m2 Then Buy ("Vty_LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("Vty_SE1)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 and m1 > m2 Then Buy ("Vty_LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("Vty_SE2)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 and m1 > m2 Then Buy ("Vty_LE3", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("Vty_SE3)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 and m1 > m2 Then Buy ("Vty_LE4", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("Vty_SE4)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 and m1 > m2 Then Buy ("Vty_LE5", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("Vty_SE5)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); 하나의 캔들에 진입 청산후 또 동일조건이 왔을때 신호 허용이 가능하지요 ? ----------------------------------------- input : StartTime(192000),EndTime(52000); input : 익절틱수(0),손절틱수(0); var : Tcond(False),entry(0); Variables: Mom(0); 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,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 Then { Buy("b",AtStop,(highest(H,2)+lowest(L,2))/2); } if MarketPosition == 1 and BarsSinceEntry == 9 Then ExitShort(); } if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 Then { Sell("s",AtStop,(lowest(L,2)+highest(H,2))/2); } if MarketPosition == -1 and BarsSinceEntry == 9 Then ExitLong(); 수식의 해석을 부탁드립니다.
프로필 이미지

푸른

2025-02-13 04:59:43

Inputs: VtyPercent(0.10),ATRperiod(10); input : StartTime(210000),EndTime(60000); var : Tcond(false); 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; IF Endtime <= starttime Then { SetStopEndofday(0); } } If MarketPosition() <> -1 Then Buy ("LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("SE1", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitShort ("LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then sell ("SE2", AtStop, Close - (VtyPercent * ATR(ATRperiod))); > 푸른 님이 쓴 글입니다. > 제목 : 바이셀90분 -20 0.10 10 ++ > Inputs: VtyPercent(0.10),ATRperiod(10); input : StartTime(210000),EndTime(60000); var : Tcond(false); 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; IF Endtime <= starttime Then { SetStopEndofday(0); } } If MarketPosition() <> 1 Then Buy ("LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitLong ("SE1", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitShort ("LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then sell ("SE2", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then Buy ("LE3", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitLong ("SE3", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitShort ("L4E", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then sell ("SE4", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then Buy ("LE5", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitLong ("SE5", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitShort ("LE6", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then sell ("SE6", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then Buy ("LE7", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitLong ("SE7", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitShort ("LE8", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then sell ("SE8", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then Buy ("LE9", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitLong ("SE9", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitShort ("LE10", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then sell ("SE10", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then Buy ("LE11", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitLong ("SE11", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitShort ("LE12", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then sell ("SE12", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then Buy ("LE13", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitLong ("SE13", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitShort ("LE14", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then sell ("SE14", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then Buy ("LE15", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitLong ("SE15", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitShort ("LE16", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then sell ("SE16", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then Buy ("LE17", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitLong ("SE17", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitShort ("LE18", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then sell ("SE18", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then Buy ("LE19", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitLong ("SE19", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then ExitShort ("LE20", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 Then sell ("SE20", AtStop, Close - (VtyPercent * ATR(ATRperiod))); ------------------------------ > 푸른 님이 쓴 글입니다. > 제목 : 문의 드립니다 > input : StartTime(80000),EndTime(60000),Xtime(60000); var : Tcond(false),entry(0); if sdate != sDate[1] Then SetStopEndofday(Xtime); 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; SetStopEndofday(0); entry = 0; } if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; Inputs: VtyPercent(0.10),ATRperiod(1); input : P1(1),P2(3); var : m1(0),m2(0); m1 = ma(C,P1); m2 = ma(C,P2); If MarketPosition() <> 1 and m1 > m2 Then Buy ("Vty_LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("Vty_SE1)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 and m1 > m2 Then Buy ("Vty_LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("Vty_SE2)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 and m1 > m2 Then Buy ("Vty_LE3", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("Vty_SE3)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 and m1 > m2 Then Buy ("Vty_LE4", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("Vty_SE4)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> 1 and m1 > m2 Then Buy ("Vty_LE5", AtStop, Close + (VtyPercent * ATR(ATRperiod))); If MarketPosition() <> -1 Then ExitLong ("Vty_SE5)", AtStop, Close - (VtyPercent * ATR(ATRperiod))); 하나의 캔들에 진입 청산후 또 동일조건이 왔을때 신호 허용이 가능하지요 ? ----------------------------------------- input : StartTime(192000),EndTime(52000); input : 익절틱수(0),손절틱수(0); var : Tcond(False),entry(0); Variables: Mom(0); 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,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 Then { Buy("b",AtStop,(highest(H,2)+lowest(L,2))/2); } if MarketPosition == 1 and BarsSinceEntry == 9 Then ExitShort(); } if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 Then { Sell("s",AtStop,(lowest(L,2)+highest(H,2))/2); } if MarketPosition == -1 and BarsSinceEntry == 9 Then ExitLong(); 수식의 해석을 부탁드립니다.