커뮤니티
수식요청 드립이다.
2018-03-30 15:05:02
303
글번호 117818
안녕하세요.
연결선물 분봉 틱봉 오버형 피라미딩 스윙 시스템에서
1. 진입수식 매수진입 -> 상승 피라미딩 1차 2차 3차 4차 5차 까지 진입하는 경우
피라미딩 누적 3차 매수진입 이후부터의 전량 청산은 직전 진입가에서 청산
(예, 피라미딩 누적 3차 진입 -> 2차 진입가 청산 / 4차 진입 -> 3차 진입가 청산/ 5차 진입 -> 4차 진입가 청산)
2. 진입수식 매도진입 -> 하락 피라미딩 1차 2차 3차 4차 5차 까지 진입하는 경우
피라미딩 누적 3차 매도진입 이후부터의 전량 청산은 직전 진입가에서 청산
(예, 피라미딩 누적 3차 진입 -> 2차 진입가 청산 / 4차 진입 -> 3차 진입가 청산/ 5차 진입 -> 4차 진입가 청산)
피라미딩 진입 청산 수식요청 드립이다.
감사합니다.
//-------------------------------------------------------------------------------------------------------
#피라미딩진입수식
Input : i증감(0.5),진입수량(1),누적진입횟수(5);
if MarketPosition == 1 and Bxcond == false and MaxEntries < 누적진입횟수 Then
Buy("PBB",AtStop,LatestEntryPrice(0)+i증감,진입수량);
if MarketPosition == -1 and SxCond == false and MaxEntries < 누적진입횟수 Then
sell("PSS",AtStop,LatestEntryPrice(0)-i증감,진입수량);
//-------------------------------------------------------------------------------------------------------
#진입수식(예제)
Input : Period(12), sigPeriod(9);
value1 = TRIX(Period);
value2 = ema(value1, sigPeriod);
If CrossUP(value1, value2) Then{
Buy("BY");
}
If CrossDown(value1, value2) Then{
Sell("SL");
}
//-------------------------------------------------------------------------------------------------------
답변 1
예스스탁 예스스탁 답변
2018-04-02 09:52:21
안녕하세요
예스스탁입니다.
var : C2(0),C3(0),C4(0),v2(0),v3(0),v4(0);
var : Bxcond3(false),Bxcond4(false),Bxcond5(false);
var : Sxcond3(false),Sxcond4(false),Sxcond5(false);
if MarketPosition == 1 Then
{
if MaxEntries == 2 and CurrentContracts > CurrentContracts[1] Then
{
c2 = LatestEntryPrice(0);
v2 = CurrentContracts-CurrentContracts[1];
}
if MaxEntries == 3 and CurrentContracts > CurrentContracts[1] Then
{
c3 = LatestEntryPrice(0);
v3 = CurrentContracts-CurrentContracts[1];
}
if MaxEntries == 4 and CurrentContracts > CurrentContracts[1] Then{
c4 = LatestEntryPrice(0);
v4 = CurrentContracts-CurrentContracts[1];
}
if CurrentContracts < CurrentContracts[1] and (LatestExitName(0) == "bx31" or LatestExitName(0) == "bx32") Then
BxCond3 = true;
if CurrentContracts < CurrentContracts[1] and (LatestExitName(0) == "bx41" or LatestExitName(0) == "bx42") Then
BxCond4 = true;
if CurrentContracts < CurrentContracts[1] and (LatestExitName(0) == "bx51" or LatestExitName(0) == "bx52") Then
BxCond5 = true;
if MaxEntries >= 3 and BxCond3 == false Then{
if H < c2 Then
ExitLong("bx31",Atlimit,c2,"",v2,1);
if L > c2 Then
ExitLong("bx32",AtStop,c2,"",v2,1);
}
if MaxEntries >= 4 and BxCond4 == false Then{
if H < c3 Then
ExitLong("bx41",Atlimit,c3,"",v3,1);
if L > c3 Then
ExitLong("bx42",AtStop,c3,"",v3,1);
}
if MaxEntries >= 5 and BxCond5 == false Then{
if H < c4 Then
ExitLong("bx51",Atlimit,c4,"",v4,1);
if L > c4 Then
ExitLong("bx52",AtStop,c4,"",v4,1);
}
}
else
{
BxCond3 = false;
BxCond4 = false;
BxCond5 = false;
}
if MarketPosition == -1 Then
{
if MaxEntries == 2 and CurrentContracts > CurrentContracts[1] Then
{
c2 = LatestEntryPrice(0);
v2 = CurrentContracts-CurrentContracts[1];
}
if MaxEntries == 3 and CurrentContracts > CurrentContracts[1] Then
{
c3 = LatestEntryPrice(0);
v3 = CurrentContracts-CurrentContracts[1];
}
if MaxEntries == 4 and CurrentContracts > CurrentContracts[1] Then{
c4 = LatestEntryPrice(0);
v4 = CurrentContracts-CurrentContracts[1];
}
if CurrentContracts < CurrentContracts[1] and (LatestExitName(0) == "sx31" or LatestExitName(0) == "sx32") Then
SxCond3 = true;
if CurrentContracts < CurrentContracts[1] and (LatestExitName(0) == "sx41" or LatestExitName(0) == "sx42") Then
SxCond4 = true;
if CurrentContracts < CurrentContracts[1] and (LatestExitName(0) == "sx51" or LatestExitName(0) == "sx52") Then
SxCond5 = true;
if MaxEntries >= 3 and SxCond3 == false Then{
if L > c2 Then
ExitShort("sx31",Atlimit,c2,"",v2,1);
if H < c2 Then
ExitShort("sx32",AtStop,c2,"",v2,1);
}
if MaxEntries >= 4 and SxCond4 == false Then{
if L > c3 Then
ExitShort("sx41",Atlimit,c3,"",v3,1);
if H < c3 Then
ExitShort("sx42",AtStop,c3,"",v3,1);
}
if MaxEntries >= 5 and SxCond5 == false Then{
if L > c4 Then
ExitShort("sx51",Atlimit,c4,"",v4,1);
if H < c4 Then
ExitShort("sx52",AtStop,c4,"",v4,1);
}
}
else
{
SxCond3 = false;
SxCond4 = false;
SxCond5 = false;
}
즐거운 하루되세요
> dandy 님이 쓴 글입니다.
> 제목 : 수식요청 드립이다.
> 안녕하세요.
연결선물 분봉 틱봉 오버형 피라미딩 스윙 시스템에서
1. 진입수식 매수진입 -> 상승 피라미딩 1차 2차 3차 4차 5차 까지 진입하는 경우
피라미딩 누적 3차 매수진입 이후부터의 전량 청산은 직전 진입가에서 청산
(예, 피라미딩 누적 3차 진입 -> 2차 진입가 청산 / 4차 진입 -> 3차 진입가 청산/ 5차 진입 -> 4차 진입가 청산)
2. 진입수식 매도진입 -> 하락 피라미딩 1차 2차 3차 4차 5차 까지 진입하는 경우
피라미딩 누적 3차 매도진입 이후부터의 전량 청산은 직전 진입가에서 청산
(예, 피라미딩 누적 3차 진입 -> 2차 진입가 청산 / 4차 진입 -> 3차 진입가 청산/ 5차 진입 -> 4차 진입가 청산)
피라미딩 진입 청산 수식요청 드립이다.
감사합니다.
//-------------------------------------------------------------------------------------------------------
#피라미딩진입수식
Input : i증감(0.5),진입수량(1),누적진입횟수(5);
if MarketPosition == 1 and Bxcond == false and MaxEntries < 누적진입횟수 Then
Buy("PBB",AtStop,LatestEntryPrice(0)+i증감,진입수량);
if MarketPosition == -1 and SxCond == false and MaxEntries < 누적진입횟수 Then
sell("PSS",AtStop,LatestEntryPrice(0)-i증감,진입수량);
//-------------------------------------------------------------------------------------------------------
#진입수식(예제)
Input : Period(12), sigPeriod(9);
value1 = TRIX(Period);
value2 = ema(value1, sigPeriod);
If CrossUP(value1, value2) Then{
Buy("BY");
}
If CrossDown(value1, value2) Then{
Sell("SL");
}
//-------------------------------------------------------------------------------------------------------
다음글
이전글