커뮤니티

질문드립니다

프로필 이미지
1231241
2013-06-24 14:26:15
183
글번호 64641
답변완료
if MarketPosition == 1 Then{ value1 = Highest(H,BarsSinceEntry); if value1 >= EntryPrice+PriceScale*20 then ExitLong("BuyTr2",AtStop,value1-(value1-EntryPrice)*(P1/100)); if value1 >= EntryPrice+PriceScale*30 then ExitLong("BuyTr3",AtStop,value1-(value1-EntryPrice)*(P2/100)); if value1 >= EntryPrice+PriceScale*40 then ExitLong("BuyTr4",AtStop,value1-(value1-EntryPrice)*(P3/100)); if value1 >= EntryPrice+PriceScale*50 then ExitLong("BuyTr5",AtStop,value1-(value1-EntryPrice)*(P4/100)); if value1 >= EntryPrice+PriceScale*60 then ExitLong("BuyTr6",AtStop,value1-(value1-EntryPrice)*(P5/100)); if value1 >= EntryPrice+PriceScale*70 then ExitLong("BuyTr7",AtStop,value1-(value1-EntryPrice)*(P6/100)); } if MarketPosition == -1 Then{ value2 = lowest(L,BarsSinceEntry); if value2 <= EntryPrice-PriceScale*20 then ExitShort("SellTr2",AtStop,value2+(EntryPrice-value2)*(P1/100)); if value2 <= EntryPrice-PriceScale*30 then ExitShort("SellTr3",AtStop,value2+(EntryPrice-value2)*(P2/100)); if value2 <= EntryPrice-PriceScale*40 then ExitShort("SellTr4",AtStop,value2+(EntryPrice-value2)*(P3/100)); if value2 <= EntryPrice-PriceScale*50 then ExitShort("SellTr5",AtStop,value2+(EntryPrice-value2)*(P4/100)); if value2 <= EntryPrice-PriceScale*60 then ExitShort("SellTr6",AtStop,value2+(EntryPrice-value2)*(P5/100)); if value2 <= EntryPrice-PriceScale*70 then ExitShort("SellTr7",AtStop,value2+(EntryPrice-value2)*(P6/100)); } 최대수익대비하락 수식입니다 위 식이 시뮬레이션결과와 실전에서의 차이가 있는지 수식에서 오류가 있는지 확인 부탁드리겠습니다
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2013-06-24 15:19:22

안녕하세요 예스스탁입니다. 구간을 지정하셔야 하므로 아래와 같이 조건을 추가하셔야 합니다. 해당식은 최근완성봉기준으로 손익을 판별하고 다음봉을 감시하므로 시뮬레이션과 실전에서 차이가 없습니다. if MarketPosition == 1 Then{ value1 = Highest(H,BarsSinceEntry); if value1 >= EntryPrice+PriceScale*20 and value1 < EntryPrice+PriceScale*30 then ExitLong("BuyTr2",AtStop,value1-(value1-EntryPrice)*(P1/100)); if value1 >= EntryPrice+PriceScale*30 and value1 < EntryPrice+PriceScale*40 then ExitLong("BuyTr3",AtStop,value1-(value1-EntryPrice)*(P2/100)); if value1 >= EntryPrice+PriceScale*40 and value1 < EntryPrice+PriceScale*50 then ExitLong("BuyTr4",AtStop,value1-(value1-EntryPrice)*(P3/100)); if value1 >= EntryPrice+PriceScale*50 and value1 < EntryPrice+PriceScale*60 then ExitLong("BuyTr5",AtStop,value1-(value1-EntryPrice)*(P4/100)); if value1 >= EntryPrice+PriceScale*60 and value1 < EntryPrice+PriceScale*70 then ExitLong("BuyTr6",AtStop,value1-(value1-EntryPrice)*(P5/100)); if value1 >= EntryPrice+PriceScale*70 then ExitLong("BuyTr7",AtStop,value1-(value1-EntryPrice)*(P6/100)); } if MarketPosition == -1 Then{ value2 = lowest(L,BarsSinceEntry); if value2 <= EntryPrice-PriceScale*20 and value2 < EntryPrice-PriceScale*30 then ExitShort("SellTr2",AtStop,value2+(EntryPrice-value2)*(P1/100)); if value2 <= EntryPrice-PriceScale*30 and value2 < EntryPrice-PriceScale*40 then ExitShort("SellTr3",AtStop,value2+(EntryPrice-value2)*(P2/100)); if value2 <= EntryPrice-PriceScale*40 and value2 < EntryPrice-PriceScale*50 then ExitShort("SellTr4",AtStop,value2+(EntryPrice-value2)*(P3/100)); if value2 <= EntryPrice-PriceScale*50 and value2 < EntryPrice-PriceScale*60 then ExitShort("SellTr5",AtStop,value2+(EntryPrice-value2)*(P4/100)); if value2 <= EntryPrice-PriceScale*60 and value2 < EntryPrice-PriceScale*70 then ExitShort("SellTr6",AtStop,value2+(EntryPrice-value2)*(P5/100)); if value2 <= EntryPrice-PriceScale*70 then ExitShort("SellTr7",AtStop,value2+(EntryPrice-value2)*(P6/100)); } 즐거운 하루되세요 > 1231241 님이 쓴 글입니다. > 제목 : 질문드립니다 > if MarketPosition == 1 Then{ value1 = Highest(H,BarsSinceEntry); if value1 >= EntryPrice+PriceScale*20 then ExitLong("BuyTr2",AtStop,value1-(value1-EntryPrice)*(P1/100)); if value1 >= EntryPrice+PriceScale*30 then ExitLong("BuyTr3",AtStop,value1-(value1-EntryPrice)*(P2/100)); if value1 >= EntryPrice+PriceScale*40 then ExitLong("BuyTr4",AtStop,value1-(value1-EntryPrice)*(P3/100)); if value1 >= EntryPrice+PriceScale*50 then ExitLong("BuyTr5",AtStop,value1-(value1-EntryPrice)*(P4/100)); if value1 >= EntryPrice+PriceScale*60 then ExitLong("BuyTr6",AtStop,value1-(value1-EntryPrice)*(P5/100)); if value1 >= EntryPrice+PriceScale*70 then ExitLong("BuyTr7",AtStop,value1-(value1-EntryPrice)*(P6/100)); } if MarketPosition == -1 Then{ value2 = lowest(L,BarsSinceEntry); if value2 <= EntryPrice-PriceScale*20 then ExitShort("SellTr2",AtStop,value2+(EntryPrice-value2)*(P1/100)); if value2 <= EntryPrice-PriceScale*30 then ExitShort("SellTr3",AtStop,value2+(EntryPrice-value2)*(P2/100)); if value2 <= EntryPrice-PriceScale*40 then ExitShort("SellTr4",AtStop,value2+(EntryPrice-value2)*(P3/100)); if value2 <= EntryPrice-PriceScale*50 then ExitShort("SellTr5",AtStop,value2+(EntryPrice-value2)*(P4/100)); if value2 <= EntryPrice-PriceScale*60 then ExitShort("SellTr6",AtStop,value2+(EntryPrice-value2)*(P5/100)); if value2 <= EntryPrice-PriceScale*70 then ExitShort("SellTr7",AtStop,value2+(EntryPrice-value2)*(P6/100)); } 최대수익대비하락 수식입니다 위 식이 시뮬레이션결과와 실전에서의 차이가 있는지 수식에서 오류가 있는지 확인 부탁드리겠습니다