커뮤니티

수식어 부탁드립니다

프로필 이미지
푸른
2021-04-15 08:54:44
973
글번호 148040
답변완료

첨부 이미지

var : entry(0); input : StartTime(070000),EndTime(055000),xtime(055500); var : 전환선(0),기준선(0),선행스팬1(0),선행스팬2(0); var : Tcond(false); 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); } if bdate != bdate[1] Then entry = 0; if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if MarketPosition <= 0 and entry < 1 Then buy("b",atlimit,dayhigh-PriceScale*120); if MarketPosition == 1 Then exitlong("bx",atlimit,lowest(L,BarsSinceEntry)+PriceScale*60); if MarketPosition >= 0 and entry < 1 Then sell("s",atlimit,daylow+PriceScale*3500); if MarketPosition == -1 Then ExitShort("sx",atlimit,Highest(H,BarsSinceEntry)-PriceScale*120); if sdate != sdate[1] Then SetStopEndofday(55000); if bdate != bdate[1] Then SetStopEndofday(0); --------------------------- 기존의 하늘색 buy(-120) 청산( +60)에서 청산싯점인 (+60)은 최저점에서 (+60)으로 신호가 나옵니다 . 노란색 buy(=120)이후 바로 (+60) 청산이 되는 buy, sell수식어로 부탁드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-04-15 11:25:04

안녕하세요 예스스탁입니다. var : entry(0); input : StartTime(070000),EndTime(055000),xtime(055500); var : 전환선(0),기준선(0),선행스팬1(0),선행스팬2(0); var : Tcond(false); 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); } if bdate != bdate[1] Then entry = 0; if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if MarketPosition <= 0 and entry < 1 Then buy("b",atlimit,dayhigh-PriceScale*120); if MarketPosition == 1 Then exitlong("bx",atlimit,(DayHigh(0)[BarsSinceEntry]-PriceScale)+PriceScale*60); if MarketPosition >= 0 and entry < 1 Then sell("s",atlimit,daylow+PriceScale*3500); if MarketPosition == -1 Then ExitShort("sx",atlimit,(daylow(0)[BarsSinceEntry]+PriceScale*3500)-PriceScale*120); if sdate != sdate[1] Then SetStopEndofday(55000); if bdate != bdate[1] Then SetStopEndofday(0); 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 수식어 부탁드립니다 > var : entry(0); input : StartTime(070000),EndTime(055000),xtime(055500); var : 전환선(0),기준선(0),선행스팬1(0),선행스팬2(0); var : Tcond(false); 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); } if bdate != bdate[1] Then entry = 0; if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if MarketPosition <= 0 and entry < 1 Then buy("b",atlimit,dayhigh-PriceScale*120); if MarketPosition == 1 Then exitlong("bx",atlimit,lowest(L,BarsSinceEntry)+PriceScale*60); if MarketPosition >= 0 and entry < 1 Then sell("s",atlimit,daylow+PriceScale*3500); if MarketPosition == -1 Then ExitShort("sx",atlimit,Highest(H,BarsSinceEntry)-PriceScale*120); if sdate != sdate[1] Then SetStopEndofday(55000); if bdate != bdate[1] Then SetStopEndofday(0); --------------------------- 기존의 하늘색 buy(-120) 청산( +60)에서 청산싯점인 (+60)은 최저점에서 (+60)으로 신호가 나옵니다 . 노란색 buy(=120)이후 바로 (+60) 청산이 되는 buy, sell수식어로 부탁드립니다.