커뮤니티

수식 부탁드립니다

프로필 이미지
에구머니
2010-10-20 02:16:06
1102
글번호 32904
답변완료
또 부탁드립니다. 복 많이 받으실 겁니다. 감사합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2010-10-19 14:30:07

안녕하세요 예스스탁입니다. input : 적용날짜(20101014),적용시간(91500),진입수량(100); var : BuyP(0),ExitP(0),Bidx(0),Xidx(0); var1 = int(진입수량/3); var2 = int(진입수량/3); var3 = 100 -var1-var2; if sdate >= 적용날짜 and stime >= 적용시간 then{ if MarketPosition == 0 and C > C[1] and TotalTrades == 0 Then{ buy("b",OnClose,def,진입수량); BuyP = C; Bidx = index; } if MarketPosition == 0 and C > C[1] and TotalTrades > 0 Then{ if crossup(C,min(ExitP,Lowest(C,index-Xidx))*1.06) Then{ buy("b1",OnClose,def,진입수량); BuyP = C; Bidx = index; } } if MarketPosition == 1 Then{ if CurrentContracts == 진입수량-var1 and crossup(c,min(ExitP,lowest(c,index-Xidx))*1.06) Then{ buy("b2",OnClose,def,100-CurrentContracts); BuyP = C; Bidx = index; } if CurrentContracts == 진입수량-var1-var2 and crossup(c,min(ExitP,lowest(c,index-Xidx))*1.06) Then{ buy("b3",OnClose,def,100-CurrentContracts); BuyP = C; Bidx = index; } } } if MarketPosition == 1 Then{ if CurrentContracts == 진입수량 and CrossDown(C,max(BuyP,highest(C,index-Bidx))*0.95) Then{ exitlong("bx1",OnClose,def,"",var1,1); ExitP = C; Xidx = index; } if CurrentContracts == 진입수량-var1 and CrossDown(C,ExitP*0.95) Then{ exitlong("bx2",OnClose,def,"",var2,1); ExitP = C; Xidx = index; } if CurrentContracts == 진입수량-var1-var2 and CrossDown(C,ExitP*0.96) Then{ exitlong("bx3",OnClose,def,"",var2,1); ExitP = C; Xidx = index; } } 의도에 맞게 작성이 되었는지 모르겠습니다. 참고하시기 바랍니다. 즐거운 하루되세요 > 에구머니 님이 쓴 글입니다. > 제목 : 수식 부탁드립니다 > 또 부탁드립니다. 복 많이 받으실 겁니다. 감사합니다.