예스스탁
예스스탁 답변
2020-12-29 14:06:06
안녕하세요
예스스탁입니다.
피라미딩은 다른진입신호만 허용으로 설정하시고 적용하시면 됩니다.
진입후 100%청산후에 다시 진입을 시작하고자 하시면 외부변수 매수를 0, 진입을 안하고자 하시면 1으로 셋팅하시면 됩니다.
INPUT : 매수(0), 매도조건(1);
var : cond(False),LP(0);
var1 = ma(C,3);
var2 = ma(C,5);
var3 = ma(C,10);
var4 = ma(C,60);
if C < Var4 and CrossDown(c,var1) and cond == False Then
{
if MarketPosition == 0 or (MarketPosition == 1 and C < LP and Condition1 == False) Then
Buy("매수1");
}
if C < var4 and CrossDown(c,var2) and cond == False Then
{
if MarketPosition == 0 or (MarketPosition == 1 and C < LP and Condition1 == False) Then
Buy("매수2");
}
if C < Var4 and CrossDown(c,var3) and cond == False Then
{
if MarketPosition == 0 or (MarketPosition == 1 and C < LP and Condition1 == False) Then
Buy("매수3");
}
if MarketPosition == 1 Then
{
if 매수 == 1 Then
Cond = true;
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "매수1" Then
{
LP = LatestEntryPrice(0);
Condition1 = true;
}
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "매수2" Then
{
LP = LatestEntryPrice(0);
Condition2 = true;
}
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "매수3" Then
{
LP = LatestEntryPrice(0);
Condition3 = true;
}
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "매수4" Then
{
LP = LatestEntryPrice(0);
Condition4 = true;
}
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "매수5" Then
{
LP = LatestEntryPrice(0);
Condition5 = true;
}
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "매수6" Then
{
LP = LatestEntryPrice(0);
Condition6 = true;
}
if Condition3 == true Then
{
if Condition4 == False Then
Buy("매수4",AtLimit,LP*0.97);
if Condition4 == true and Condition5 == False Then
Buy("매수5",AtLimit,LP*0.95);
if Condition4 == true and Condition5 == true and Condition6 == False Then
Buy("매수6",AtLimit,LP*0.90);
}
if 매도조건 == 1 Then
{
ExitLong("bx1",AtLimit,AvgEntryPrice*1.05,"",Floor(MaxContracts*0.2),1);
ExitLong("bx2",AtLimit,AvgEntryPrice*1.08,"",Floor(MaxContracts*0.5),1);
ExitLong("bx3",AtLimit,AvgEntryPrice*1.10);
}
if 매도조건 == 2 Then
{
ExitLong("bx",AtLimit,AvgEntryPrice*1.15);
}
}
Else
{
Condition1 = False;
Condition2 = False;
Condition3 = False;
}
즐거운 하루되세요
> 쭈니오빠 님이 쓴 글입니다.
> 제목 : 시스템질문
> 안녕하세요~
<매수조건>
매수1이 60선 보다 적을때
매수1 3일선 매수
매수2 5일선 매수
매수3 10일선 매수
매수3이 매수된경우에는 추가매수
매수3 매수가보다 3%하락시 매수4
매수3 매수가보다 5%하락시 매수5
매수3 매수가보다 10%하락시 매수6
<매도조건1>
5%상승시 매수금액의 20%청산
8%상승시 매수금액의 50%청산
10%상승시 매수금액 100%청산
<매도조건2>
15%상승시 매수금액 100%청산
매수조건 만족시 이전매수가보다 적을떄 매수하고 싶습니다(순차하락매수)
동일가격에서 매수조건이 겹칠때 한번만 매수하고 싶습니다(예] 갭하락등)
100%청산시 매수를 하지 않게 또는 계속 매수되게 변수입력으로 선택하고 싶습니다
매도조건1 또는 2를 변수입력으로 선택하고 싶습니다
감사합니다~