커뮤니티
[Q] 문의
2012-09-15 19:32:38
400
글번호 54737
맨처음 시장가 10주 자동 매수
1차 -3% 하락시 20주 매수
2차 -3% 하락시 40주 매수
전체평균매수가의 +5% 상승시 (전체 매수비중 50% 처분)
전체평균매수가의 +10% 상승시 (전체 매수비중 100% 처분)
수식 부탁드립니다.
답변 1
예스스탁 예스스탁 답변
2012-09-17 11:40:16
안녕하세요
예스스탁입니다.
input : 날짜(20120917),시간(100000);
if MarketPosition == 0 Then
buy("b",OnClose,def,10);
if MarketPosition == 1 Then{
if CodeCategory == 1 then
Var1 = int(int(CurrentContracts*0.5)/10)*10;
Else
Var1 = int(CurrentContracts*0.5);
if CurrentEntries == 1 Then
buy("b1",AtStop,EntryPrice*0.97,20);
if CurrentEntries == 2 Then
buy("b2",AtStop,EntryPrice*0.94,40);
if CurrentContracts == MaxContracts Then
ExitLong("bx1",Atlimit,avgEntryPrice*1.05,"",var1,1);
if CurrentContracts < MaxContracts Then
ExitLong("bx2",Atlimit,avgEntryPrice*1.10);
}
즐거운 하루되세요
> xxxx 님이 쓴 글입니다.
> 제목 : [Q] 문의
> 맨처음 시장가 10주 자동 매수
1차 -3% 하락시 20주 매수
2차 -3% 하락시 40주 매수
전체평균매수가의 +5% 상승시 (전체 매수비중 50% 처분)
전체평균매수가의 +10% 상승시 (전체 매수비중 100% 처분)
수식 부탁드립니다.
다음글
이전글