커뮤니티

다음 수식 부탁드립니다.

프로필 이미지
참이슬기
2017-03-16 12:05:18
103
글번호 107869
답변완료
1. 50틱 수익후 진입자리로 돌아올시 1틱 청산 if MarketPosition == 1 and highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*50 Then ExitLong("bx",AtStop,EntryPrice+PriceScale*2); if MarketPosition == -1 and Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*50 Then ExitShort("sx",AtStop,EntryPrice-PriceScale*2); 위 수식을 사용하고 있습니다. 2. 100틱 수익후 진입자리로 돌아올시 50틱 청산 150틱 수익후 진입자리로 돌아올시 100틱 청산 200틱 수익후 진입자리로 돌아올시 150틱 청산 250틱 수익후 진입자리로 돌아올시 200틱 청산 이렇게 순차적으로 청산하려면 어떤수식을 넣어야 하나요?
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-03-16 15:58:25

안녕하세요 예스스탁입니다. var : HH(0),LL(0); if MarketPosition == 1 then{ HH = highest(H,BarsSinceEntry); if HH >= EntryPrice+PriceScale*50 and HH < EntryPrice+PriceScale*100 Then ExitLong("bx1",AtStop,EntryPrice+PriceScale*2); if HH >= EntryPrice+PriceScale*100 and HH < EntryPrice+PriceScale*150 Then ExitLong("bx2",AtStop,EntryPrice+PriceScale*50); if HH >= EntryPrice+PriceScale*150 and HH < EntryPrice+PriceScale*200 Then ExitLong("bx3",AtStop,EntryPrice+PriceScale*100); if HH >= EntryPrice+PriceScale*200 and HH < EntryPrice+PriceScale*250 Then ExitLong("bx4",AtStop,EntryPrice+PriceScale*150); if HH >= EntryPrice+PriceScale*250 Then ExitLong("bx5",AtStop,EntryPrice+PriceScale*200); } if MarketPosition == -1 then{ LL = Lowest(L,BarsSinceEntry); if LL <= EntryPrice-PriceScale*50 and LL > EntryPrice-PriceScale*100 Then ExitShort("sx1",AtStop,EntryPrice-PriceScale*2); if LL <= EntryPrice-PriceScale*100 and LL > EntryPrice-PriceScale*150 Then ExitShort("sx2",AtStop,EntryPrice-PriceScale*50); if LL <= EntryPrice-PriceScale*150 and LL > EntryPrice-PriceScale*200 Then ExitShort("sx3",AtStop,EntryPrice-PriceScale*100); if LL <= EntryPrice-PriceScale*200 and LL > EntryPrice-PriceScale*250 Then ExitShort("sx4",AtStop,EntryPrice-PriceScale*150); if LL <= EntryPrice-PriceScale*250 Then ExitShort("sx5",AtStop,EntryPrice-PriceScale*200); } 즐거운 하루되세요 > 참이슬기 님이 쓴 글입니다. > 제목 : 다음 수식 부탁드립니다. > 1. 50틱 수익후 진입자리로 돌아올시 1틱 청산 if MarketPosition == 1 and highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*50 Then ExitLong("bx",AtStop,EntryPrice+PriceScale*2); if MarketPosition == -1 and Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*50 Then ExitShort("sx",AtStop,EntryPrice-PriceScale*2); 위 수식을 사용하고 있습니다. 2. 100틱 수익후 진입자리로 돌아올시 50틱 청산 150틱 수익후 진입자리로 돌아올시 100틱 청산 200틱 수익후 진입자리로 돌아올시 150틱 청산 250틱 수익후 진입자리로 돌아올시 200틱 청산 이렇게 순차적으로 청산하려면 어떤수식을 넣어야 하나요?