커뮤니티

수식부탁합니다.

프로필 이미지
큰바위얼굴
2019-02-13 14:55:30
160
글번호 126134
답변완료
Input : shortPeriod(5), longPeriod(20),수량(100); value1 = ma(C, shortPeriod); value2 = ma(C, longPeriod); # 매수/매도청산 If CrossUP(value1, value2) Then { Buy(); } # 매도/매수청산 If CrossDown(value1, value2) Then { Sell(); } # 목표가% 청산 1 if MarketPosition == 1 and C >= EntryPrice *(1+6/100) Then exitlong("bx+6%",AtStop,highest(H,BarsSinceEntry)-0,"",Floor(CurrentContracts*0.2),1); if MarketPosition == -1 and C <= EntryPrice *(1-6/100) Then ExitShort("sx-6%",AtStop,Lowest(L,BarsSinceEntry)+0,"",Floor(CurrentContracts*0.2),1); 위수식 6%수익 이후에 20%수익을 이익실현을 20개로 수정 부탁합니다 . 일정한 금액으로 여러번 이익 실현 할려고 합니다. 감사합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2019-02-13 15:05:29

안녕하세요 예스스탁입니다. Input : shortPeriod(5), longPeriod(20),수량(100); value1 = ma(C, shortPeriod); value2 = ma(C, longPeriod); # 매수/매도청산 If CrossUP(value1, value2) Then { Buy(); } # 매도/매수청산 If CrossDown(value1, value2) Then { Sell(); } # 목표가% 청산 1 if MarketPosition == 1 and C >= EntryPrice *(1+6/100) Then exitlong("bx+6%",AtStop,highest(H,BarsSinceEntry)-0,"",20,1); if MarketPosition == -1 and C <= EntryPrice *(1-6/100) Then ExitShort("sx-6%",AtStop,Lowest(L,BarsSinceEntry)+0,"",20,1); 즐거운 하루되세요 > 큰바위얼굴 님이 쓴 글입니다. > 제목 : 수식부탁합니다. > Input : shortPeriod(5), longPeriod(20),수량(100); value1 = ma(C, shortPeriod); value2 = ma(C, longPeriod); # 매수/매도청산 If CrossUP(value1, value2) Then { Buy(); } # 매도/매수청산 If CrossDown(value1, value2) Then { Sell(); } # 목표가% 청산 1 if MarketPosition == 1 and C >= EntryPrice *(1+6/100) Then exitlong("bx+6%",AtStop,highest(H,BarsSinceEntry)-0,"",Floor(CurrentContracts*0.2),1); if MarketPosition == -1 and C <= EntryPrice *(1-6/100) Then ExitShort("sx-6%",AtStop,Lowest(L,BarsSinceEntry)+0,"",Floor(CurrentContracts*0.2),1); 위수식 6%수익 이후에 20%수익을 이익실현을 20개로 수정 부탁합니다 . 일정한 금액으로 여러번 이익 실현 할려고 합니다. 감사합니다.