커뮤니티

안녕하세요?

프로필 이미지
상중하
2017-01-11 00:19:56
118
글번호 105754
답변완료
항상 수고 많으십니다. 수식 문의 드립니다. 매수조건으로만 질문 드립니다. Input : shortPeriod(5), longPeriod(20); value1 = ma(C, shortPeriod); value2 = ma(C, longPeriod); # 매수/매도청산 If CrossUP(value1, value2) Then { Buy(); } 1.익절 +20틱 손절-10틱 2.첫진입 2계약진입 3. +20틱 수익시 1계약청산 4. 진입조건 발생시 1계약 추가.(다시 2계약) 5. +20틱 수익시 올청산.(평단기준) 6. +13틱수익이후 +1틱까지 밀리면 +1틱에서 청산. 수식가능한가요 가능하면 작성 부탁드립니다. 감사합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-01-11 13:26:57

안녕하세요 예스스탁입니다. Input : shortPeriod(5), longPeriod(20); var : HH(0); value1 = ma(C, shortPeriod); value2 = ma(C, longPeriod); If CrossUP(value1, value2) Then { if MarketPosition == 0 or (MarketPosition == 1 and MaxEntries == 1) Then Buy("b1",OnClose,def,2); if MarketPosition == 1 and MaxEntries == 1 Then Buy("b2",OnClose,def,1); } if MarketPosition == 1 then{ if CurrentContracts > CurrentContracts[1] Then HH = H; if H > HH Then HH = H; if MaxEntries == 1 Then ExitLong("bp1",atlimit,AvgEntryPrice+PriceScale*20,"",1,1); if MaxEntries == 2 Then ExitLong("bp2",atlimit,AvgEntryPrice+PriceScale*20); if HH < AvgEntryPrice+PriceScale*13 Then ExitLong("bl1",AtStop,AvgEntryPrice-PriceScale*10); if HH >= AvgEntryPrice+PriceScale*13 Then ExitLong("bl2",AtStop,AvgEntryPrice+PriceScale*1); } 즐거운 하루되세요 > 상중하 님이 쓴 글입니다. > 제목 : 안녕하세요? > 항상 수고 많으십니다. 수식 문의 드립니다. 매수조건으로만 질문 드립니다. Input : shortPeriod(5), longPeriod(20); value1 = ma(C, shortPeriod); value2 = ma(C, longPeriod); # 매수/매도청산 If CrossUP(value1, value2) Then { Buy(); } 1.익절 +20틱 손절-10틱 2.첫진입 2계약진입 3. +20틱 수익시 1계약청산 4. 진입조건 발생시 1계약 추가.(다시 2계약) 5. +20틱 수익시 올청산.(평단기준) 6. +13틱수익이후 +1틱까지 밀리면 +1틱에서 청산. 수식가능한가요 가능하면 작성 부탁드립니다. 감사합니다.