커뮤니티

부탁드립니다.

프로필 이미지
vmfha
2015-06-02 23:38:29
121
글번호 86709
답변완료
하기식은 예스스탁님이 작성해주신 하루 총 수익이면 종료하는 식인데.... 1. 첨부해서 매수든 매도든 한신호의 익절은 40틱으로 할수있는 식을 추가하고싶읍니다. 하루총수익은 그대로두고 매신호마다 최대 익절을( 반대신호 관계없이) 40틱으로 수식 추가 부탁드립니다. ( 궁금한점이...만약 매도신호에서 40틱 익절이되더라도 다음에 다시 매도 조건이 되면 매도 진입이 가능한지요?..(반대 매수신호는 당연 매수진입 되겠지만 )) NP = NetProfit; if bdate != bdate[1] Then{ PreNP = NP[1]; Econd = false; } dayPL = NP-PreNP; if BarsSinceExit(1) == 1 and (IsExitName("bx1",1) or IsExitName("sx1",1)) Then Econd = true; if Econd == false Then{ if stime >= 200000 or stime < 030000 then{ if crossup(SMIV,SMIS) Then buy(); if CrossDown(SMIV,SMIS) Then sell(); } } if MarketPosition == 1 Then{ exitlong("BL",AtStop,O[BarsSinceEntry]-PriceScale*10); if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*20 Then{ ExitLong("bx",AtStop,EntryPrice+PriceScale*1); } ExitLong("bx1",AtLimit,EntryPrice+((당일수익*PriceScale)-daypl)); } if MarketPosition == -1 Then{ ExitShort("SL",AtStop,O[BarsSinceEntry]+PriceScale*10); if Lowest(l,BarsSinceEntry) <= EntryPrice-PriceScale*20 Then{ ExitShort("sx",AtStop,EntryPrice-PriceScale*1); } ExitShort("sx1",AtLimit,EntryPrice-((당일수익*PriceScale)-daypl) ); } 미리 감사드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-06-03 18:19:18

안녕하세요 예스스탁입니다. 진입별로 40틱 수익이면 청산하는 내용을 추가했습니다. 당일총수익제한을 초과하지 않으면 계속 매수든 매도든 조건만족하면 진입합니다. input : 익절틱수(40); var : NP(0),PreNP(0),Econd(false),dayPL(0); NP = NetProfit; if bdate != bdate[1] Then{ PreNP = NP[1]; Econd = false; } dayPL = NP-PreNP; if BarsSinceExit(1) == 1 and (IsExitName("bx1",1) or IsExitName("sx1",1)) Then Econd = true; if Econd == false Then{ if stime >= 200000 or stime < 030000 then{ if crossup(SMIV,SMIS) Then buy(); if CrossDown(SMIV,SMIS) Then sell(); } } if MarketPosition == 1 Then{ exitlong("BL",AtStop,O[BarsSinceEntry]-PriceScale*10); if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*20 Then{ ExitLong("bx",AtStop,EntryPrice+PriceScale*1); } ExitLong("bx1",AtLimit,EntryPrice+((당일수익*PriceScale)-daypl)); } if MarketPosition == -1 Then{ ExitShort("SL",AtStop,O[BarsSinceEntry]+PriceScale*10); if Lowest(l,BarsSinceEntry) <= EntryPrice-PriceScale*20 Then{ ExitShort("sx",AtStop,EntryPrice-PriceScale*1); } ExitShort("sx1",AtLimit,EntryPrice-((당일수익*PriceScale)-daypl) ); } SetStopProfittarget(PriceScale*익절틱수, PointStop); 즐거운 하루되세요 > vmfha 님이 쓴 글입니다. > 제목 : 부탁드립니다. > 하기식은 예스스탁님이 작성해주신 하루 총 수익이면 종료하는 식인데.... 1. 첨부해서 매수든 매도든 한신호의 익절은 40틱으로 할수있는 식을 추가하고싶읍니다. 하루총수익은 그대로두고 매신호마다 최대 익절을( 반대신호 관계없이) 40틱으로 수식 추가 부탁드립니다. ( 궁금한점이...만약 매도신호에서 40틱 익절이되더라도 다음에 다시 매도 조건이 되면 매도 진입이 가능한지요?..(반대 매수신호는 당연 매수진입 되겠지만 )) NP = NetProfit; if bdate != bdate[1] Then{ PreNP = NP[1]; Econd = false; } dayPL = NP-PreNP; if BarsSinceExit(1) == 1 and (IsExitName("bx1",1) or IsExitName("sx1",1)) Then Econd = true; if Econd == false Then{ if stime >= 200000 or stime < 030000 then{ if crossup(SMIV,SMIS) Then buy(); if CrossDown(SMIV,SMIS) Then sell(); } } if MarketPosition == 1 Then{ exitlong("BL",AtStop,O[BarsSinceEntry]-PriceScale*10); if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*20 Then{ ExitLong("bx",AtStop,EntryPrice+PriceScale*1); } ExitLong("bx1",AtLimit,EntryPrice+((당일수익*PriceScale)-daypl)); } if MarketPosition == -1 Then{ ExitShort("SL",AtStop,O[BarsSinceEntry]+PriceScale*10); if Lowest(l,BarsSinceEntry) <= EntryPrice-PriceScale*20 Then{ ExitShort("sx",AtStop,EntryPrice-PriceScale*1); } ExitShort("sx1",AtLimit,EntryPrice-((당일수익*PriceScale)-daypl) ); } 미리 감사드립니다.