커뮤니티

수식요청 드립이다.

프로필 이미지
dandy
2018-03-19 21:30:05
156
글번호 117527
답변완료
안녕하세요 아래 수식에서 진입식은 연결선물 틱봉 당일청산 시스템에 적용하고, 청산 수식은 참조데이터 이용한 연결선물 분봉 적용되도록 수정요청 드립니다. 감사합니다. Input : Period(12), sigPeriod(9); Input : BBP(20), Dv(2); var : BBmd(0),BBup(0),BBdn(0); value1 = TRIX(Period); value2 = ema(value1, sigPeriod); BBmd = ma(C,Period); BBup = BollBandUp(BBP,Dv); BBdn = BollBandDown(BBP,Dv); If CrossUP(value1, value2) Then Buy(); If CrossDown(value1, value2) Then Sell(); if MarketPosition == 1 then{ if OI <= highest(OI,BarsSinceEntry)*0.7 Then exitlong(); if countif(crossup(c,bbup),BarsSinceEntry) >= 1 and CrossDown(c,bbup) Then exitlong(); } if MarketPosition == -1 Then{ if OI <= highest(OI,BarsSinceEntry)*0.7 Then exitlong(); if countif(CrossDown(c,bbdn),BarsSinceEntry) >= 1 and Crossup(c,bbdn) Then ExitShort(); } SetStopEndofday(150000);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2018-03-20 15:33:39

안녕하세요 예스스탁입니다. Input : Period(12), sigPeriod(9); Input : BBP(20), Dv(2); var : v1(0,data1),v2(0,data1),BBmd(0,data2),BBup(0,data2),BBdn(0,data2); v1 = data1(TRIX(Period)); v2 = data1(ema(v1, sigPeriod)); BBmd = data2(ma(C,Period)); BBup = data2(BollBandUp(BBP,Dv)); BBdn = data2(BollBandDown(BBP,Dv)); If data1(CrossUP(v1, v2)) Then Buy(); If data1(CrossDown(v1, v2)) Then Sell(); if MarketPosition == 1 then{ if OI <= data1(highest(OI,BarsSinceEntry))*0.7 Then exitlong(); if data1(countif(data2(crossup(c,bbup)),BarsSinceEntry) >= 1) and data2(CrossDown(c,bbup)) Then exitlong(); } if MarketPosition == -1 Then{ if OI <= data1(highest(OI,BarsSinceEntry))*0.7 Then exitlong(); if data1(countif(data2(CrossDown(c,bbdn)),BarsSinceEntry) >= 1) and data2(Crossup(c,bbdn)) Then ExitShort(); } SetStopEndofday(150000); 즐거운 하루되세요 > dandy 님이 쓴 글입니다. > 제목 : 수식요청 드립이다. > 안녕하세요 아래 수식에서 진입식은 연결선물 틱봉 당일청산 시스템에 적용하고, 청산 수식은 참조데이터 이용한 연결선물 분봉 적용되도록 수정요청 드립니다. 감사합니다. Input : Period(12), sigPeriod(9); Input : BBP(20), Dv(2); var : BBmd(0),BBup(0),BBdn(0); value1 = TRIX(Period); value2 = ema(value1, sigPeriod); BBmd = ma(C,Period); BBup = BollBandUp(BBP,Dv); BBdn = BollBandDown(BBP,Dv); If CrossUP(value1, value2) Then Buy(); If CrossDown(value1, value2) Then Sell(); if MarketPosition == 1 then{ if OI <= highest(OI,BarsSinceEntry)*0.7 Then exitlong(); if countif(crossup(c,bbup),BarsSinceEntry) >= 1 and CrossDown(c,bbup) Then exitlong(); } if MarketPosition == -1 Then{ if OI <= highest(OI,BarsSinceEntry)*0.7 Then exitlong(); if countif(CrossDown(c,bbdn),BarsSinceEntry) >= 1 and Crossup(c,bbdn) Then ExitShort(); } SetStopEndofday(150000);