커뮤니티

수정을 부탁 드립니다.

프로필 이미지
dandy
2017-09-15 10:21:38
110
글번호 112788
답변완료
안녕하세요. 아래 피라미딩 진입 수식에서 진입명 진입횟수 3개가 다르게 (피라미딩 매수진입명 -> 1차 PBA, 2차 PBB, 3차 PBC 피라미딩 매도진입명 -> 1차 PSA, 2차 PSB, 3차 PSC) 진입명으로 진입되고 피라미딩 2차 진입 이후 부터의 손절청산은 직전 진입가격으로 손절청산 되도록 수정 요청 드립니다. (예 매수 2차 PBB 진입 후 청산은 1차 PBA 진입가격 손절청산/예 매도 3차 PSC 진입 후 청산은 2차 PSB 진입가격 손절청산) //------------------------------------------------------------------------------------------------------ input : i증감(0.4),누적진입횟수(3),진입수량(1); if MarketPosition == 1 and MaxEntries < 누적진입횟수 and Bxcond == false and Xcond == false Then Buy("PBA",atlimit,LatestEntryPrice(0)+i증감,진입수량); if MarketPosition == -1 and MaxEntries < 누적진입횟수 and Sxcond == false and XCond == false Then sell("PSA",atlimit,LatestEntryPrice(0)-i증감,진입수량); //----------------------------------------------------------------------------------------------------- #진입수식(예제) Input : Period(20); value1 = TRIX(Period); If CrossUP(value1, 0) and BCount+SCount < N and dayPL > -당일손실 Then{ Buy("TRIXB"); } If CrossDown(value1, 0) and BCount+SCount < N and dayPL > -당일손실 Then{ Sell("TRIXS"); } //------------------------------------------------------------------------------------------------------ SetStopEndofday(153000); //------------------------------------------------------------------------------------------------------ 감사 합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-09-15 16:23:50

안녕하세요 예스스탁입니다. //------------------------------------------------------------------------------------------------------ input : i증감(0.4),누적진입횟수(3),진입수량(1); var : EP(0),EP1(0); if MarketPosition == 1 and MaxEntries < 누적진입횟수 and Bxcond == false and Xcond == false Then{ if MaxEntries == 1 Then Buy("PBA",atlimit,LatestEntryPrice(0)+i증감,진입수량); if MaxEntries == 2 Then Buy("PBB",atlimit,LatestEntryPrice(0)+i증감,진입수량); if MaxEntries == 3 Then Buy("PBC",atlimit,LatestEntryPrice(0)+i증감,진입수량); } if MarketPosition == -1 and MaxEntries < 누적진입횟수 and Sxcond == false and XCond == false Then{ if MaxEntries == 1 then sell("PSA",atlimit,LatestEntryPrice(0)-i증감,진입수량); if MaxEntries == 1 then sell("PSB",atlimit,LatestEntryPrice(0)-i증감,진입수량); if MaxEntries == 1 then sell("PSC",atlimit,LatestEntryPrice(0)-i증감,진입수량); } if MarketPosition == 1 Then{ if CurrentContracts > CurrentContracts[1] Then{ EP = LatestEntryPrice(0); EP1 = EP[1]; } if MaxEntries >= 2 Then ExitLong("bx",AtStop,EP1); } if MarketPosition == -1 Then{ if CurrentContracts > CurrentContracts[1] Then{ EP = LatestEntryPrice(0); EP1 = EP[1]; } if MaxEntries >= 2 Then ExitShort("sx",AtStop,EP1); } //----------------------------------------------------------------------------------------------------- #진입수식(예제) Input : Period(20); value1 = TRIX(Period); If CrossUP(value1, 0) and BCount+SCount < N and dayPL > -당일손실 Then{ Buy("TRIXB"); } If CrossDown(value1, 0) and BCount+SCount < N and dayPL > -당일손실 Then{ Sell("TRIXS"); } //------------------------------------------------------------------------------------------------------ SetStopEndofday(153000); //------------------------------------------------------------------------------------------------------ 즐거운 하루되세요 > dandy 님이 쓴 글입니다. > 제목 : 수정을 부탁 드립니다. > 안녕하세요. 아래 피라미딩 진입 수식에서 진입명 진입횟수 3개가 다르게 (피라미딩 매수진입명 -> 1차 PBA, 2차 PBB, 3차 PBC 피라미딩 매도진입명 -> 1차 PSA, 2차 PSB, 3차 PSC) 진입명으로 진입되고 피라미딩 2차 진입 이후 부터의 손절청산은 직전 진입가격으로 손절청산 되도록 수정 요청 드립니다. (예 매수 2차 PBB 진입 후 청산은 1차 PBA 진입가격 손절청산/예 매도 3차 PSC 진입 후 청산은 2차 PSB 진입가격 손절청산) //------------------------------------------------------------------------------------------------------ input : i증감(0.4),누적진입횟수(3),진입수량(1); if MarketPosition == 1 and MaxEntries < 누적진입횟수 and Bxcond == false and Xcond == false Then Buy("PBA",atlimit,LatestEntryPrice(0)+i증감,진입수량); if MarketPosition == -1 and MaxEntries < 누적진입횟수 and Sxcond == false and XCond == false Then sell("PSA",atlimit,LatestEntryPrice(0)-i증감,진입수량); //----------------------------------------------------------------------------------------------------- #진입수식(예제) Input : Period(20); value1 = TRIX(Period); If CrossUP(value1, 0) and BCount+SCount < N and dayPL > -당일손실 Then{ Buy("TRIXB"); } If CrossDown(value1, 0) and BCount+SCount < N and dayPL > -당일손실 Then{ Sell("TRIXS"); } //------------------------------------------------------------------------------------------------------ SetStopEndofday(153000); //------------------------------------------------------------------------------------------------------ 감사 합니다.