커뮤니티

진입금지

프로필 이미지
난다긴다
2014-06-14 12:10:30
185
글번호 75834
답변완료
Input : Period(30), Period1(5), Period2(5),진입수량(1); value1 = StochasticsK(Period,Period1); value2 = StochasticsD(Period,Period1,Period2); # 매수/매도청산 If CrossUP(value1, value2) Then { buy("b1",atlimit,C,0); buy("b2",atlimit,C-PriceScale*0,진입수량); buy("b3",atlimit,C-PriceScale*3,진입수량); buy("b4",atlimit,C-PriceScale*5,진입수량); buy("b5",atlimit,C-PriceScale*8,진입수량); } #if MarketPosition == 0 and Crossdown(value1,73) Then # ExitLong(); if MarketPosition == 1 Then{ if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*5 Then ExitLong("bx",AtStop,highest(H,BarsSinceEntry)-PriceScale*2); } if var1%3 == 0 and var2 >= 8 and var2 <= 14 and var4 == 4 Then SetStopEndofday(144000); Else SetStopEndofday(150000); 20틱기준입니다 이식에서 예를들어 콜이나 풋 첫진입이후 10% 정도 손실나면 이후에는 절대 진입못하게 해주세요 종가까지
시스템
답변 2
프로필 이미지

예스스탁 예스스탁 답변

2014-06-16 14:15:03

안녕하세요 예스스탁입니다. Input : Period(30), Period1(5), Period2(5),진입수량(1); value1 = StochasticsK(Period,Period1); value2 = StochasticsD(Period,Period1,Period2); #날짜가 변경되면 초기화 if date != date[1] Then Condition1 = false; #당일 진입이 10%이상 손실이면 true if EntryDate(1) == sdate and PositionProfit(1)/EntryPrice(1)*100 <= -10 Then Condition1 = true; # 매수/매도청산 If Condition1 == false and CrossUP(value1, value2) Then { buy("b1",atlimit,C,0); buy("b2",atlimit,C-PriceScale*0,진입수량); buy("b3",atlimit,C-PriceScale*3,진입수량); buy("b4",atlimit,C-PriceScale*5,진입수량); buy("b5",atlimit,C-PriceScale*8,진입수량); } #if MarketPosition == 0 and Crossdown(value1,73) Then # ExitLong(); if MarketPosition == 1 Then{ if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*5 Then ExitLong("bx",AtStop,highest(H,BarsSinceEntry)-PriceScale*2); } if var1%3 == 0 and var2 >= 8 and var2 <= 14 and var4 == 4 Then SetStopEndofday(144000); Else SetStopEndofday(150000); 즐거운 하루되세요 > 난다긴다 님이 쓴 글입니다. > 제목 : 진입금지 > Input : Period(30), Period1(5), Period2(5),진입수량(1); value1 = StochasticsK(Period,Period1); value2 = StochasticsD(Period,Period1,Period2); # 매수/매도청산 If CrossUP(value1, value2) Then { buy("b1",atlimit,C,0); buy("b2",atlimit,C-PriceScale*0,진입수량); buy("b3",atlimit,C-PriceScale*3,진입수량); buy("b4",atlimit,C-PriceScale*5,진입수량); buy("b5",atlimit,C-PriceScale*8,진입수량); } #if MarketPosition == 0 and Crossdown(value1,73) Then # ExitLong(); if MarketPosition == 1 Then{ if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*5 Then ExitLong("bx",AtStop,highest(H,BarsSinceEntry)-PriceScale*2); } if var1%3 == 0 and var2 >= 8 and var2 <= 14 and var4 == 4 Then SetStopEndofday(144000); Else SetStopEndofday(150000); 20틱기준입니다 이식에서 예를들어 콜이나 풋 첫진입이후 10% 정도 손실나면 이후에는 절대 진입못하게 해주세요 종가까지
프로필 이미지

예스스탁 예스스탁 답변

2014-06-16 14:53:03

안녕하세요 예스스탁입니다. 외부변수 loss에 %값 지정하시면 됩니다. 진입중이 포지션의 손실이 지정한 손실이상이면 청산하고 당일 이후에는 진입을 하지 않습니다. Input : Period(30), Period1(5), Period2(5),진입수량(1),loss(10); value1 = StochasticsK(Period,Period1); value2 = StochasticsD(Period,Period1,Period2); Condition1 = ExitDate(1) == sdate and IsExitName("StopLoss",1) == true; # 매수/매도청산 If Condition1 == false And CrossUP(value1, value2) Then { buy("b1",atlimit,C,0); buy("b2",atlimit,C-PriceScale*0,진입수량); buy("b3",atlimit,C-PriceScale*3,진입수량); buy("b4",atlimit,C-PriceScale*5,진입수량); buy("b5",atlimit,C-PriceScale*8,진입수량); } #if MarketPosition == 0 and Crossdown(value1,73) Then # ExitLong(); if MarketPosition == 1 Then{ if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*5 Then ExitLong("bx",AtStop,highest(H,BarsSinceEntry)-PriceScale*2); } if var1%3 == 0 and var2 >= 8 and var2 <= 14 and var4 == 4 Then SetStopEndofday(144000); Else SetStopEndofday(150000); #포지션 전체 손익이 10% 손실이면 청한 SetStopPosition; SetStopLoss(loss,PercentStop); 즐거운 하루되세요 > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 진입금지 > 안녕하세요 예스스탁입니다. Input : Period(30), Period1(5), Period2(5),진입수량(1); value1 = StochasticsK(Period,Period1); value2 = StochasticsD(Period,Period1,Period2); #날짜가 변경되면 초기화 if date != date[1] Then Condition1 = false; #당일 진입이 10%이상 손실이면 true if EntryDate(1) == sdate and PositionProfit(1)/EntryPrice(1)*100 <= -10 Then Condition1 = true; # 매수/매도청산 If Condition1 == false and CrossUP(value1, value2) Then { buy("b1",atlimit,C,0); buy("b2",atlimit,C-PriceScale*0,진입수량); buy("b3",atlimit,C-PriceScale*3,진입수량); buy("b4",atlimit,C-PriceScale*5,진입수량); buy("b5",atlimit,C-PriceScale*8,진입수량); } #if MarketPosition == 0 and Crossdown(value1,73) Then # ExitLong(); if MarketPosition == 1 Then{ if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*5 Then ExitLong("bx",AtStop,highest(H,BarsSinceEntry)-PriceScale*2); } if var1%3 == 0 and var2 >= 8 and var2 <= 14 and var4 == 4 Then SetStopEndofday(144000); Else SetStopEndofday(150000); 즐거운 하루되세요 > 난다긴다 님이 쓴 글입니다. > 제목 : 진입금지 > Input : Period(30), Period1(5), Period2(5),진입수량(1); value1 = StochasticsK(Period,Period1); value2 = StochasticsD(Period,Period1,Period2); # 매수/매도청산 If CrossUP(value1, value2) Then { buy("b1",atlimit,C,0); buy("b2",atlimit,C-PriceScale*0,진입수량); buy("b3",atlimit,C-PriceScale*3,진입수량); buy("b4",atlimit,C-PriceScale*5,진입수량); buy("b5",atlimit,C-PriceScale*8,진입수량); } #if MarketPosition == 0 and Crossdown(value1,73) Then # ExitLong(); if MarketPosition == 1 Then{ if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*5 Then ExitLong("bx",AtStop,highest(H,BarsSinceEntry)-PriceScale*2); } if var1%3 == 0 and var2 >= 8 and var2 <= 14 and var4 == 4 Then SetStopEndofday(144000); Else SetStopEndofday(150000); 20틱기준입니다 이식에서 예를들어 콜이나 풋 첫진입이후 10% 정도 손실나면 이후에는 절대 진입못하게 해주세요 종가까지