커뮤니티

문의 드립니다.

프로필 이미지
cooparoo
2021-03-24 09:03:42
1113
글번호 147346
답변완료
안녕하세요! 일전에 알려주신 수식인데요 # 매수진입시 진입가 대비 고점이 1. 100 point 이상 150 point 미만일때 고점대비 70 point 하락하면 바로 청산 2. 150 point 이상 200 point 미만일때 고점대비 80 point 하락하면 바로 청산 3. 200 point 이상 250 point 미만일때 고점대비 90 point 하락하면 바로 청산 4. 고점이 250 point 이상일때는 위에 1~3 적용 않되고 그냥 시스템 조건으로 청산 # 매도 진입시 진입가 대비 저점이 1. 100 point 이상 150 point 미만일때 저점대비 70 point 상승하면 바로 청산 2. 150 point 이상 200 point 미만일때 저점대비 80 point 상승하면 바로 청산 3. 200 point 이상 250 point 미만일때 저점대비 90 point 상승하면 바로 청산 4. 저점이 250 point 이상일때는 위에 1~3 적용 않되고 그냥 시스템 조건으로 청산 var : BH(0),SL(0); if MarketPosition == 1 Then { BH = Highest(H,BarsSinceEntry); if BH >= EntryPrice+100 and BH < EntryPrice+150 then ExitLong("bx1",AtStop,BH-70); if BH >= EntryPrice+150 and BH < EntryPrice+200 then ExitLong("bx2",AtStop,BH-80); if BH >= EntryPrice+200 and BH < EntryPrice+250 then ExitLong("bx3",AtStop,BH-90); } if MarketPosition == -1 Then { SL = Lowest(L,BarsSinceEntry); if SL <= EntryPrice-100 and SL < EntryPrice-150 then ExitShort("sx1",AtStop,SL+70); if SL <= EntryPrice-150 and SL < EntryPrice-200 then ExitShort("sx2",AtStop,SL+80); if SL <= EntryPrice-200 and SL < EntryPrice-250 then ExitShort("sx3",AtStop,SL+90); } 이것을 바로청산이 아니고 종가에서 청산 하는 방식으로 수식 부탁 합니다. 예를 들어 진입가 대비 고점이 1. 100 point 이상 150 point 미만일때 "종가가" 고점대비 70 point 또는 그이상 하락하면 청산 이런식으로 수정 부탁드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-03-24 14:33:07

안녕하세요 예스스탁입니다. var : BH(0),SL(0); if MarketPosition == 1 Then { BH = Highest(H,BarsSinceEntry); if BH >= EntryPrice+100 and BH < EntryPrice+150 and C <= BH-70 then ExitLong("bx1"); if BH >= EntryPrice+150 and BH < EntryPrice+200 and C <= BH-80 then ExitLong("bx2"); if BH >= EntryPrice+200 and BH < EntryPrice+250 and C <= BH-90 then ExitLong("bx3"); } if MarketPosition == -1 Then { SL = Lowest(L,BarsSinceEntry); if SL <= EntryPrice-100 and SL < EntryPrice-150 and C >= SL+70 then ExitShort("sx1"); if SL <= EntryPrice-150 and SL < EntryPrice-200 and C >= SL+80 then ExitShort("sx2"); if SL <= EntryPrice-200 and SL < EntryPrice-250 and C >= SL+90 then ExitShort("sx3"); } 즐거운 하루되세요 > cooparoo 님이 쓴 글입니다. > 제목 : 문의 드립니다. > 안녕하세요! 일전에 알려주신 수식인데요 # 매수진입시 진입가 대비 고점이 1. 100 point 이상 150 point 미만일때 고점대비 70 point 하락하면 바로 청산 2. 150 point 이상 200 point 미만일때 고점대비 80 point 하락하면 바로 청산 3. 200 point 이상 250 point 미만일때 고점대비 90 point 하락하면 바로 청산 4. 고점이 250 point 이상일때는 위에 1~3 적용 않되고 그냥 시스템 조건으로 청산 # 매도 진입시 진입가 대비 저점이 1. 100 point 이상 150 point 미만일때 저점대비 70 point 상승하면 바로 청산 2. 150 point 이상 200 point 미만일때 저점대비 80 point 상승하면 바로 청산 3. 200 point 이상 250 point 미만일때 저점대비 90 point 상승하면 바로 청산 4. 저점이 250 point 이상일때는 위에 1~3 적용 않되고 그냥 시스템 조건으로 청산 var : BH(0),SL(0); if MarketPosition == 1 Then { BH = Highest(H,BarsSinceEntry); if BH >= EntryPrice+100 and BH < EntryPrice+150 then ExitLong("bx1",AtStop,BH-70); if BH >= EntryPrice+150 and BH < EntryPrice+200 then ExitLong("bx2",AtStop,BH-80); if BH >= EntryPrice+200 and BH < EntryPrice+250 then ExitLong("bx3",AtStop,BH-90); } if MarketPosition == -1 Then { SL = Lowest(L,BarsSinceEntry); if SL <= EntryPrice-100 and SL < EntryPrice-150 then ExitShort("sx1",AtStop,SL+70); if SL <= EntryPrice-150 and SL < EntryPrice-200 then ExitShort("sx2",AtStop,SL+80); if SL <= EntryPrice-200 and SL < EntryPrice-250 then ExitShort("sx3",AtStop,SL+90); } 이것을 바로청산이 아니고 종가에서 청산 하는 방식으로 수식 부탁 합니다. 예를 들어 진입가 대비 고점이 1. 100 point 이상 150 point 미만일때 "종가가" 고점대비 70 point 또는 그이상 하락하면 청산 이런식으로 수정 부탁드립니다.