커뮤니티

부탁드립니다

프로필 이미지
아이아띠
2016-12-19 13:59:21
93
글번호 105067
답변완료
plot1(0.01); plot2(0.11); plot3(0.21); plot4(0.31); plot5(0.41); 옵션선을 상방 돌파하면 매수 하방 돌파하면 매도 input : Period(20); if ma(C,Period) > ma(C,Period)[1] then plot1(ma(c,20),"이동평균",RED); else plot1(ma(c,20),"이동평균",BLUE); 위 두 수식을 합쳐 신호을 만들고 싶은데요 이동평균 레드와 옵션선 상방 돌파시 매수 반대로 이동평균선 블루와 옵션선 하향 돌파시 매도 익절은 신호 진입 후 최대 틱수 또는 지정 % 되돌림시 청산 손절은 신호 진입후 반대로 옵션선 3틱이상 밀리면 손절 부탁드립니다
시스템
답변 2
프로필 이미지

예스스탁 예스스탁 답변

2016-12-19 16:16:29

안녕하세요 예스스탁입니다. input : X(5),Y(30); input : Period(20),Price1(0.01),Price2(0.11),Price3(0.21),Price4(0.31),Price5(0.41); var : T(0),RR(0),tx(0); if ma(C,Period) > ma(C,Period)[1] then T = 1; else T = -1; if T == 1 and (crossup(c,Price1) or crossup(c,price2) or crossup(c,Price3) or crossup(c,Price4) or crossup(c,Price5)) Then buy(); if T == -1 and (CrossDown(c,Price1) or CrossDown(c,price2) or CrossDown(c,Price3) or CrossDown(c,Price4) or CrossDown(c,Price5)) Then buy(); if MarketPosition == 1 Then{ exitlong("bx",AtStop,EntryPrice-PriceScale*3); #매수진입이후 최고가 대비 X틱 하락하면 청산 exitlong("btr1",AtStop,highest(H,BarsSinceEntry)-PriceScale*X); #매수진입이후 최고가 대비 Y% 수익감소하면 청산 exitlong("btr2",AtStop,highest(H,BarsSinceEntry)-(highest(h,BarsSinceEntry)-EntryPrice)*(Y/100)); 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,2,2); } } if MarketPosition == 0 and TotalTrades == TotalTrades[1] and C < O and C < var1 Then sell("s"); if MarketPosition == -1 Then{ ExitShort("sx",AtStop,EntryPrice+PriceScale*3); #매도진입이후 최저가 대비 X틱 하락하면 청산 ExitShort("str1",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*X); #매도진입이후 최저가 대비 Y% 수익감소하면 청산 ExitShort("str2",AtStop,Lowest(L,BarsSinceEntry)+(EntryPrice-lowest(L,BarsSinceEntry))*(Y/100)); 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,2,2); } } 즐거운 하루되세요 > 아이아띠 님이 쓴 글입니다. > 제목 : 부탁드립니다 > plot1(0.01); plot2(0.11); plot3(0.21); plot4(0.31); plot5(0.41); 옵션선을 상방 돌파하면 매수 하방 돌파하면 매도 input : Period(20); if ma(C,Period) > ma(C,Period)[1] then plot1(ma(c,20),"이동평균",RED); else plot1(ma(c,20),"이동평균",BLUE); 위 두 수식을 합쳐 신호을 만들고 싶은데요 이동평균 레드와 옵션선 상방 돌파시 매수 반대로 이동평균선 블루와 옵션선 하향 돌파시 매도 익절은 신호 진입 후 최대 틱수 또는 지정 % 되돌림시 청산 손절은 신호 진입후 반대로 옵션선 3틱이상 밀리면 손절 부탁드립니다
프로필 이미지

아이아띠

2016-12-20 21:09:07

아이아띠 님에 의해 삭제된 답변입니다.