커뮤니티

문의 드립니다

프로필 이미지
영구없다
2018-03-08 19:19:41
214
글번호 117242
답변완료
5선,10선,15선의 이동평균선이 모두 상향 정배열일 때 4계약을 매수 진입 하여 1차청산 100틱,2차청산 200틱,3차청산 300틱에 3계약을 분할 청산하고 나머지 1계약은 Setstoptrailing (0.01,4.99,pointstop);에 청산 되고 ※ 손절은 5선이 10선을 데드크로스 할때 손절이 되게 해 주십시요 5선,10선,15선의 이동평균선이 모두 하향 역배열일 때 4계약을 매도 진입 하여 1차청산 100틱,2차청산 200틱,3차청산 300틱에 3계약을 분할 청산하고 나머지 1계약은 Setstoptrailing (0.01,1.92,pointstop);에 청산 되는 수식을 부탁 드립니다 ※ 손절은 5선이 10선을 골든크로스 할때 손절이 되게 해 주십시요
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2018-03-09 11:17:19

안녕하세요 예스스탁입니다. var1 = ma(C,5); var2 = ma(C,10); var3 = ma(C,20); Condition1 = var1 > var2 and var2 > var3; Condition2 = var1 < var2 and var2 < var3; if Condition1 == true and Condition1[1] == false then buy("b",OnClose,def,4); if Condition2 == true and Condition2[1] == false then sell("s",OnClose,def,4); if MarketPosition == 1 then{ ExitLong("bp1",atlimit,EntryPrice+PriceScale*100,"",1,1); ExitLong("bp2",atlimit,EntryPrice+PriceScale*200,"",1,1); ExitLong("bp3",atlimit,EntryPrice+PriceScale*300,"",1,1); if highest(H,BarsSinceEntry) >= EntryPrice+4.99 Then exitlong("btr",AtStop,highest(h,BarsSinceEntry)-0.01,"",1,1); if CrossDown(var1,var3) Then exitlong("bx"); } if MarketPosition == -1 then{ ExitShort("sp1",atlimit,EntryPrice-PriceScale*100,"",1,1); ExitShort("sp2",atlimit,EntryPrice-PriceScale*200,"",1,1); ExitShort("sp3",atlimit,EntryPrice-PriceScale*300,"",1,1); if Lowest(L,BarsSinceEntry) <= EntryPrice-4.99 Then ExitShort("str",AtStop,Lowest(l,BarsSinceEntry)+0.01,"",1,1); if CrossUp(var1,var3) Then ExitShort("sx"); } 즐거운 하루되세요 > 영구없다 님이 쓴 글입니다. > 제목 : 문의 드립니다 > 5선,10선,15선의 이동평균선이 모두 상향 정배열일 때 4계약을 매수 진입 하여 1차청산 100틱,2차청산 200틱,3차청산 300틱에 3계약을 분할 청산하고 나머지 1계약은 Setstoptrailing (0.01,4.99,pointstop);에 청산 되고 ※ 손절은 5선이 10선을 데드크로스 할때 손절이 되게 해 주십시요 5선,10선,15선의 이동평균선이 모두 하향 역배열일 때 4계약을 매도 진입 하여 1차청산 100틱,2차청산 200틱,3차청산 300틱에 3계약을 분할 청산하고 나머지 1계약은 Setstoptrailing (0.01,1.92,pointstop);에 청산 되는 수식을 부탁 드립니다 ※ 손절은 5선이 10선을 골든크로스 할때 손절이 되게 해 주십시요