커뮤니티
안녕하세요?
2017-01-15 10:40:03
148
글번호 105919
안녕하세요?
저번엔 전화까지 해주시면서 자세한 설명 해주신 부분에 대해 진심으로 감사드립니다.
1.
추가진입(b2)가 발생하지 않아 게시판을 우연히 검색하다 설정->파라미딩에서 다른진입신호만 허용 하니까
추가진입이 되는데요 (그림참조)
검정박스 보시면 b1이 두계약이 진입이 되면 추가진입(b2)가 발생하지 않게 수정 부탁드립니다.
(최대 잔고가 2계약)
2.청산식을 아래와 같이 수정 부탁드립니다.
익절:20
손절:10
본청:+21틱 수익후 진입가의 +1틱
예를들어 (그림의 빨간박스참조)
1) 추가진입이 발생하지 않을때 예시.
진입 : b1 두계약진입 50.00 (그림의 A)
익절 : 50.20 이면 1 계약만 익절(dl1)
손절 : 49.90 이면 손절이 2 계약.
본청 : 50.01 이면 1 계약 본청.
2) 추가진입이 발생할경우의 예시
b2 50.50 의 한계약 추가진입 총 두계약.(그림의 B)
진입단가
b1 : 50.00
b2 : 50.50
익절 : 50.70 이면 두계약청산.(그림의 B)
손절 : 50.30 이면 두계약청산.(그림의 C)
b2의 진입가의 기준으로 b1의 진입한 1 계약도 함께 청산되어야 합니다.(올청산)
3) 최대진입횟수 3으로 지정이 되도 2번 조건이 유지.
감사합니다.
----------------------------------------------------------------------------------------------------
input : 최대진입횟수(2);#첫진입포함 최대 횟수로 지정
var : Xcond(false),HH(0);
var1 = ma(c,5);
var2 = ma(c,20);
if TotalTrades > TotalTrades[1] Then{
if (IsExitName("dl1",1) == true or IsExitName("dl2",1) == true or IsExitName("bl1",1) or IsExitName("bl2",1)) Then
Xcond = True;
Else
Xcond = false;
}
if MarketPosition == 0 and (Xcond == false or (MarketPosition == 1 and MaxEntries == 1) or (Xcond == true and BarsSinceExit(1) >= 1)) then {
If CrossUP(var1, Var2) Then {
buy("b1",AtStop,NextBarOpen+PriceScale*1,2);
}
}
if MarketPosition == 1 then{
if MaxEntries >= 1 and MaxEntries < 최대진입횟수 and CrossUP(var1, Var2) Then {
buy("b2",AtStop,NextBarOpen+PriceScale*3,1);
}
if CurrentContracts > CurrentContracts[1] Then
HH = H;
if H > HH Then
HH = H;
if MaxEntries == 1 Then{
MessageLog("%.2f",LatestEntryPrice(0));
ExitLong("dl1",atlimit,LatestEntryPrice(0)+PriceScale*20,"",1,1);
}
if MaxEntries == 2 Then
ExitLong("bp2",atlimit,LatestEntryPrice(0)+PriceScale*20);
if HH < LatestEntryPrice(0)+PriceScale*13 Then
ExitLong("bl1",AtStop,LatestEntryPrice(0)-PriceScale*10);
if HH >= LatestEntryPrice(0)+PriceScale*13 Then
ExitLong("bl2",AtStop,LatestEntryPrice(0)+PriceScale*1);
}
- 1. 2017-01-15_09;30;15.PNG (0.07 MB)
답변 1
예스스탁 예스스탁 답변
2017-01-16 12:46:08
안녕하세요
예스스탁입니다.
1
진입을 누적하는 수식은
사용자분이 피라미딩 탭에서 항상 피라미딩을 설정해야만 합니다.
2
input : 최대진입횟수(2),최대진입계약수(2);
var : Xcond(false),HH(0);
var1 = ma(c,5);
var2 = ma(c,20);
if TotalTrades > TotalTrades[1] Then{
if (IsExitName("dl1",1) == true or IsExitName("dl2",1) == true or IsExitName("bl1",1) or IsExitName("bl2",1)) Then
Xcond = True;
Else
Xcond = false;
}
if MarketPosition == 0 and (Xcond == false or (MarketPosition == 1 and MaxEntries == 1) or (Xcond == true and BarsSinceExit(1) >= 1)) then {
If CrossUP(var1, Var2) Then {
buy("b1",AtStop,NextBarOpen+PriceScale*1,2);
}
}
if MarketPosition == 1 then{
if MaxEntries >= 1 and MaxEntries < 최대진입횟수 and MaxContracts < 최대진입계약수 and CrossUP(var1, Var2) Then {
buy("b2",AtStop,NextBarOpen+PriceScale*3,1);
}
if CurrentContracts > CurrentContracts[1] Then
HH = H;
if H > HH Then
HH = H;
if MaxEntries == 1 Then{
if CurrentContracts == MaxContracts Then{
ExitLong("dp11",atlimit,LatestEntryPrice(0)+0.2,"",1,1);
ExitLong("dl1",AtStop,LatestEntryPrice(0)-0.2);
}
if CurrentContracts < MaxContracts Then
ExitLong("dp12",atlimit,LatestEntryPrice(0));
}
if MaxEntries >= 2 Then{
ExitLong("dp2",atlimit,LatestEntryPrice(0)+0.2);
ExitLong("dl2",AtStop,LatestEntryPrice(0)-0.2);
}
}
즐거운 하루되세요
> 상중하 님이 쓴 글입니다.
> 제목 : 안녕하세요?
> 안녕하세요?
저번엔 전화까지 해주시면서 자세한 설명 해주신 부분에 대해 진심으로 감사드립니다.
1.
추가진입(b2)가 발생하지 않아 게시판을 우연히 검색하다 설정->파라미딩에서 다른진입신호만 허용 하니까
추가진입이 되는데요 (그림참조)
검정박스 보시면 b1이 두계약이 진입이 되면 추가진입(b2)가 발생하지 않게 수정 부탁드립니다.
(최대 잔고가 2계약)
2.청산식을 아래와 같이 수정 부탁드립니다.
익절:20
손절:10
본청:+21틱 수익후 진입가의 +1틱
예를들어 (그림의 빨간박스참조)
1) 추가진입이 발생하지 않을때 예시.
진입 : b1 두계약진입 50.00 (그림의 A)
익절 : 50.20 이면 1 계약만 익절(dl1)
손절 : 49.90 이면 손절이 2 계약.
본청 : 50.01 이면 1 계약 본청.
2) 추가진입이 발생할경우의 예시
b2 50.50 의 한계약 추가진입 총 두계약.(그림의 B)
진입단가
b1 : 50.00
b2 : 50.50
익절 : 50.70 이면 두계약청산.(그림의 B)
손절 : 50.30 이면 두계약청산.(그림의 C)
b2의 진입가의 기준으로 b1의 진입한 1 계약도 함께 청산되어야 합니다.(올청산)
3) 최대진입횟수 3으로 지정이 되도 2번 조건이 유지.
감사합니다.
----------------------------------------------------------------------------------------------------
input : 최대진입횟수(2);#첫진입포함 최대 횟수로 지정
var : Xcond(false),HH(0);
var1 = ma(c,5);
var2 = ma(c,20);
if TotalTrades > TotalTrades[1] Then{
if (IsExitName("dl1",1) == true or IsExitName("dl2",1) == true or IsExitName("bl1",1) or IsExitName("bl2",1)) Then
Xcond = True;
Else
Xcond = false;
}
if MarketPosition == 0 and (Xcond == false or (MarketPosition == 1 and MaxEntries == 1) or (Xcond == true and BarsSinceExit(1) >= 1)) then {
If CrossUP(var1, Var2) Then {
buy("b1",AtStop,NextBarOpen+PriceScale*1,2);
}
}
if MarketPosition == 1 then{
if MaxEntries >= 1 and MaxEntries < 최대진입횟수 and CrossUP(var1, Var2) Then {
buy("b2",AtStop,NextBarOpen+PriceScale*3,1);
}
if CurrentContracts > CurrentContracts[1] Then
HH = H;
if H > HH Then
HH = H;
if MaxEntries == 1 Then{
MessageLog("%.2f",LatestEntryPrice(0));
ExitLong("dl1",atlimit,LatestEntryPrice(0)+PriceScale*20,"",1,1);
}
if MaxEntries == 2 Then
ExitLong("bp2",atlimit,LatestEntryPrice(0)+PriceScale*20);
if HH < LatestEntryPrice(0)+PriceScale*13 Then
ExitLong("bl1",AtStop,LatestEntryPrice(0)-PriceScale*10);
if HH >= LatestEntryPrice(0)+PriceScale*13 Then
ExitLong("bl2",AtStop,LatestEntryPrice(0)+PriceScale*1);
}
다음글
이전글