커뮤니티

문의 2가지

프로필 이미지
좌오비우오비
2020-08-31 15:46:40
558
글번호 141920
답변완료
1) input:고가갱신수(2) if MarketPosition == 0 and #현재 무포지션이고 EntryDate(1) == sdate and #직전거래가 오늘 발생한 거래이고 MarketPosition(1) == 1 and #직전거래가 매수거래이고 countif(DayHigh(0) != DayHigh(0)[1],BarsSinceExit(1)) >= 고가갱신수 Then #청산후 당일고가 갱신이 n회이상이면 buy("b2"); 위 수식은 청산 후 재진입하는 수식입니다. "setstoploss 로 청산되었을 경우"는 작동하지 않게 수식을 수정해주세요. 즉, setstoploss 이외의 청산조건으로 청산되는 경우만 재진입하고 싶습니다. 2) 아래 피라미딩 수식을 보조data2에서 사용할 수 있도록 부탁드립니다. input : uppyra검증(0.00),상승pyra(0.00),상승N(0); if MarketPosition == 1 and C >= EntryPrice+uppyra검증 and MaxContracts < 상승N Then buy("bb",AtStop,LatestEntryPrice(0)+상승Pyra); input : dnpyra검증(0.00),하락pyra(0.00),하락N(0); if MarketPosition == -1 and C <= EntryPrice-dnpyra검증 and MaxContracts < 하락N Then sell("ss",AtStop,LatestEntryPrice(0)-하락Pyra);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-08-31 18:17:29

안녕하세요 예스스탁입니다. 1 input:고가갱신수(2) if MarketPosition == 0 and #현재 무포지션이고 EntryDate(1) == sdate and #직전거래가 오늘 발생한 거래이고 MarketPosition(1) == 1 and #직전거래가 매수거래이고 IsExitName("StopLoss",1) == false and #직전거래의 청산이 손절매가 아니고 countif(DayHigh(0) != DayHigh(0)[1],BarsSinceExit(1)) >= 고가갱신수 Then #청산후 당일고가 갱신이 n회이상이면 buy("b2"); 2 참조데이타를 이용하면 봉완성시로만 가능합니다. input : uppyra검증(0.00),상승pyra(0.00),상승N(0); var : EP(0,data1); if MarketPosition == 1 Then { if CurrentContracts > CurrentContracts[1] and MaxEntries == 1 Then EP = data2(c); if data2(c) >= EP+uppyra검증 and MaxContracts < 상승N Then { EP = data2(c); buy("bb"); } } input : dnpyra검증(0.00),하락pyra(0.00),하락N(0); if MarketPosition == -1 then { if CurrentContracts > CurrentContracts[1] and MaxEntries == 1 Then EP = data2(c); if C <= EP-dnpyra검증 and MaxContracts < 하락N Then { EP = data2(c); sell("ss"); } } 즐거운 하루되세요 > 좌오비우오비 님이 쓴 글입니다. > 제목 : 문의 2가지 > 1) input:고가갱신수(2) if MarketPosition == 0 and #현재 무포지션이고 EntryDate(1) == sdate and #직전거래가 오늘 발생한 거래이고 MarketPosition(1) == 1 and #직전거래가 매수거래이고 countif(DayHigh(0) != DayHigh(0)[1],BarsSinceExit(1)) >= 고가갱신수 Then #청산후 당일고가 갱신이 n회이상이면 buy("b2"); 위 수식은 청산 후 재진입하는 수식입니다. "setstoploss 로 청산되었을 경우"는 작동하지 않게 수식을 수정해주세요. 즉, setstoploss 이외의 청산조건으로 청산되는 경우만 재진입하고 싶습니다. 2) 아래 피라미딩 수식을 보조data2에서 사용할 수 있도록 부탁드립니다. input : uppyra검증(0.00),상승pyra(0.00),상승N(0); if MarketPosition == 1 and C >= EntryPrice+uppyra검증 and MaxContracts < 상승N Then buy("bb",AtStop,LatestEntryPrice(0)+상승Pyra); input : dnpyra검증(0.00),하락pyra(0.00),하락N(0); if MarketPosition == -1 and C <= EntryPrice-dnpyra검증 and MaxContracts < 하락N Then sell("ss",AtStop,LatestEntryPrice(0)-하락Pyra);