커뮤니티

수식 문의 드립니다.

프로필 이미지
에구머니
2016-02-17 17:02:27
101
글번호 95428
답변완료
늘 감사드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-02-17 16:55:20

안녕하세요 예스스탁입니다. Input: Lot1(1), Lot2(2), Lot3(3), Atr_Period(30), Gap1(2), Gap2(3), Gap3(4), SL(5), TP1(7), TP2(7), TP3(7), Lot_Pause(2), Trading_Pause(10); Input: 트레일링(0), T1(4), T2(30); var : atrv(0),HH(0),LL(0),T(0); atrv = atr(30); if 매수조건 Then T = 1; if 매도조건 Then T = -1; if T == 1 and T != T[1] Then var1 = C; if T == -1 and T != T[1] Then var1 = C; if MarketPosition == 0 and T == 1 Then buy("b1",atlimit,var1-gap1*atrv,lot1); if MarketPosition == 1 Then{ if MaxEntries == 1 and CurrentEntries == 1 Then buy("b2",atlimit,LatestEntryPrice(0)-gap2*atrv,lot2); if MaxEntries == 2 and CurrentEntries == 2 Then buy("b3",atlimit,LatestEntryPrice(0)-gap3*atrv,lot3); if CurrentContracts > CurrentContracts[1] Then{ Condition1 = true; HH = H; } if H > HH Then HH = H; if 트레일링 == 1 Then{ if HH >= AvgEntryPrice+T1*atrv Then Condition1 = true; if Condition1 == true Then ExitLong("bx",AtStop,HH-(HH-AvgEntryPrice)*(T2/100)); } } Else Condition1 = false; if MarketPosition == 0 and T == -1 Then sell("s1",atlimit,var1+gap1*atrv,lot1); if MarketPosition == -1 Then{ if MaxEntries == 1 and CurrentEntries == 1 Then sell("s2",atlimit,LatestEntryPrice(0)+gap2*atrv,lot2); if MaxEntries == 2 and CurrentEntries == 2 Then sell("s3",atlimit,LatestEntryPrice(0)+gap3*atrv,lot3); if CurrentContracts > CurrentContracts[1] Then{ Condition2 = true; LL = L; } if L < LL Then LL = L; if 트레일링 == 1 Then{ if LL <= AvgEntryPrice+T1*atrv Then Condition2 = true; if Condition2 == true Then ExitShort("sx",AtStop,LL+(AvgEntryPrice-LL)*(T2/100)); } } Else Condition2 = false; } 즐거운 하루되세요 > 에구머니 님이 쓴 글입니다. > 제목 : 수식 문의 드립니다. > 늘 감사드립니다.