커뮤니티

조금 복잡한 조건식, 부탁드리겠습니다.

프로필 이미지
가치투자꾼
2017-04-03 23:35:14
241
글번호 108406
답변완료
if DayOpen >= C[1]+PriceScale*11 Then buy("b",atmarket); if MarketPosition == 1 and dayopen >= EntryPrice+PriceScale*12 exitlong(); If DayOpen < C[1] Then sell("s",atmarket); if MarketPosition == 0 and dayopen <= EntryPrice+PriceScale*12 ExitShort(); 처럼 짜보려고 했는데 잘 안되네요 ㅠ_ㅠ 거래량이 100계약 이상일때만 1. 어제종가보다 오늘 시가가 11틱 높을때만 진입 1-1. 진입가격보다 11틱 더 상승했을때 청산 1-2. 진입후 7일 지나면 청산 2. 어제종가보다 오늘 시가가 11틱 하락했을때 진입 2-1. 진입가격보다 11틱 더 하락하면 청산 2-2. 진입 후 12일 지나면 청산 감사합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-04-04 10:39:34

안녕하세요 예스스탁입니다. 1 시가가 수식될때 바로 거래량가지 파악해 신호를 낼수가 없습니다. 거래량은 봉완성 단위로만 값을 알수 있으므로 분봉이하의 차트에서 첫봉완성을 기준으로 해야 합니다. var : dd(0); if Bdate != Bdate[1] Then{ dd = dd+1; if V >= 100 and dayOpen >= DayClose(1)+PriceScale*11 Then buy("b",AtMarket); if V >= 100 and dayopen <= DayClose(1)-PriceScale*11 Then sell("s",AtMarket); } if MarketPosition == 1 Then{ if CurrentContracts > CurrentContracts[1] Then var1 = DD; if DD == var1+7 and stime >= 150000 Then ExitLong("bx"); } if MarketPosition == -1 Then{ if CurrentContracts > CurrentContracts[1] Then var1 = DD; if DD == var1+7 and stime >= 150000 Then ExitShort("sx"); } SetStopProfittarget(PriceScale*11,PointStop); 2 거래량을 제외하면 아래식을 일봉차트에 적용하시면 됩니다. if NextBarOpen >= C+PriceScale*11 Then buy("b",AtMarket); if NextBarOpen <= C-PriceScale*11 Then sell("s",AtMarket); if MarketPosition == 1 and BarsSinceEntry == 7 Then ExitLong("bx"); if MarketPosition == -1 and BarsSinceEntry == 7 Then ExitShort("sx"); SetStopProfittarget(PriceScale*11,PointStop); 즐거운 하루되세요 > 가치투자꾼 님이 쓴 글입니다. > 제목 : 조금 복잡한 조건식, 부탁드리겠습니다. > if DayOpen >= C[1]+PriceScale*11 Then buy("b",atmarket); if MarketPosition == 1 and dayopen >= EntryPrice+PriceScale*12 exitlong(); If DayOpen < C[1] Then sell("s",atmarket); if MarketPosition == 0 and dayopen <= EntryPrice+PriceScale*12 ExitShort(); 처럼 짜보려고 했는데 잘 안되네요 ㅠ_ㅠ 거래량이 100계약 이상일때만 1. 어제종가보다 오늘 시가가 11틱 높을때만 진입 1-1. 진입가격보다 11틱 더 상승했을때 청산 1-2. 진입후 7일 지나면 청산 2. 어제종가보다 오늘 시가가 11틱 하락했을때 진입 2-1. 진입가격보다 11틱 더 하락하면 청산 2-2. 진입 후 12일 지나면 청산 감사합니다.