커뮤니티

수정 부탁 드립니다

프로필 이미지
아이아띠
2017-09-06 23:30:41
106
글번호 112565
답변완료
> 아래 수식 시스템에 신호시 매수면 매수 한번만 매도면 매도 한번만 나오게 부탁드립니다 그리고 수익틱 5틱은 1차청산 10틱은 2차 청산 20틱은 3차 청산 으로 표기 부탁 드립니다 그리고 수1차 청산 이후 수익 대비 예) 30% 하락시 청산 신호를 나오게 했으면 합니다 즉 장중 중복 신호가 나오는데 중복 신호을 안 나오게 하고 반대 신호가 나올때까지 반복 신호가 안 나오게 부탁 드린겁니다 var : RR(0),tx(0); var1 = ma(c,5); var2 = ma(O,5); var3 = min(var1,var2); if MarketPosition == 0 and TotalTrades == TotalTrades[1] and C > O and C > var1 Then buy("b"); if MarketPosition == 1 Then{ exitlong("bx",AtStop,var3-PriceScale*3); rr = Floor((highest(H,BarsSinceEntry)-EntryPrice)/(PriceScale*5)); if rr > rr[1] Then{ tx = Text_New(sdate,stime,H,NumToStr(RR*5,0)+"틱"); Text_SetStyle(tx,-5,-5); } } if MarketPosition == 0 and TotalTrades == TotalTrades[1] and C < O and C < var1 Then sell("s"); if MarketPosition == -1 Then{ ExitShort("sx",AtStop,var3+PriceScale*3); rr = Floor((EntryPrice-lowest(L,BarsSinceEntry))/(PriceScale*5)); if rr > rr[1] Then{ tx = Text_New(sdate,stime,H,NumToStr(RR*5,0)+"틱"); Text_SetStyle(tx,-5,-5); } }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-09-07 11:36:31

안녕하세요 예스스탁입니다. 매도진입과 매수진입 번갈아 가면서 발생하게 수정했습니다. var : RR(0),tx(0); var1 = ma(c,5); var2 = ma(O,5); var3 = min(var1,var2); if MarketPosition == 0 and MarketPosition(1) != 1 and TotalTrades == TotalTrades[1] and C > O and C > var1 Then buy("b"); if MarketPosition == 0 and MarketPosition(1) != -1 and TotalTrades == TotalTrades[1] and C < O and C < var1 Then sell("s"); if MarketPosition == 1 Then{ exitlong("bx",AtStop,var3-PriceScale*3); rr = Floor((highest(H,BarsSinceEntry)-EntryPrice)/(PriceScale*5)); if rr > rr[1] Then{ if RR == 1 then{ tx = Text_New(sdate,stime,H,"1차청산"); Text_SetStyle(tx,-5,-5); } if RR == 2 then{ tx = Text_New(sdate,stime,H,"2차청산"); Text_SetStyle(tx,-5,-5); } if RR == 4 then{ tx = Text_New(sdate,stime,H,"3차청산"); Text_SetStyle(tx,-5,-5); } } if RR >= 1 then exitlong("bx1",AtStop,highest(H,BarsSinceEntry)-(highest(H,BarsSinceEntry)-EntryPrice)*0.3); } if MarketPosition == -1 Then{ ExitShort("sx",AtStop,var3+PriceScale*3); rr = Floor((EntryPrice-lowest(L,BarsSinceEntry))/(PriceScale*5)); if rr > rr[1] Then{ if RR == 1 then{ tx = Text_New(sdate,stime,H,"1차청산"); Text_SetStyle(tx,-5,-5); } if RR == 2 then{ tx = Text_New(sdate,stime,H,"2차청산"); Text_SetStyle(tx,-5,-5); } if RR == 4 then{ tx = Text_New(sdate,stime,H,"3차청산"); Text_SetStyle(tx,-5,-5); } } if RR >= 1 then ExitShort("sx1",AtStop,Lowest(L,BarsSinceEntry)+(EntryPrice-lowest(L,BarsSinceEntry))*0.3); } 즐거운 하루되세요 > 아이아띠 님이 쓴 글입니다. > 제목 : 수정 부탁 드립니다 > > 아래 수식 시스템에 신호시 매수면 매수 한번만 매도면 매도 한번만 나오게 부탁드립니다 그리고 수익틱 5틱은 1차청산 10틱은 2차 청산 20틱은 3차 청산 으로 표기 부탁 드립니다 그리고 수1차 청산 이후 수익 대비 예) 30% 하락시 청산 신호를 나오게 했으면 합니다 즉 장중 중복 신호가 나오는데 중복 신호을 안 나오게 하고 반대 신호가 나올때까지 반복 신호가 안 나오게 부탁 드린겁니다 var : RR(0),tx(0); var1 = ma(c,5); var2 = ma(O,5); var3 = min(var1,var2); if MarketPosition == 0 and TotalTrades == TotalTrades[1] and C > O and C > var1 Then buy("b"); if MarketPosition == 1 Then{ exitlong("bx",AtStop,var3-PriceScale*3); rr = Floor((highest(H,BarsSinceEntry)-EntryPrice)/(PriceScale*5)); if rr > rr[1] Then{ tx = Text_New(sdate,stime,H,NumToStr(RR*5,0)+"틱"); Text_SetStyle(tx,-5,-5); } } if MarketPosition == 0 and TotalTrades == TotalTrades[1] and C < O and C < var1 Then sell("s"); if MarketPosition == -1 Then{ ExitShort("sx",AtStop,var3+PriceScale*3); rr = Floor((EntryPrice-lowest(L,BarsSinceEntry))/(PriceScale*5)); if rr > rr[1] Then{ tx = Text_New(sdate,stime,H,NumToStr(RR*5,0)+"틱"); Text_SetStyle(tx,-5,-5); } }