커뮤니티
당일진입제한 및 파라미딩
2017-03-09 00:25:48
113
글번호 107607
문의드립니다.
조건 :
신호 당일 진입 1회제한,
손실시 5회까지 재진입
평균단가 위에서 청산신호시 청산
파라미딩설정 : 5회
문제점 --> 손실시 추가 진입을 하지 않습니다. 뭐가 문제인지... 부탁드리겠습니다.
var : count(0), cnt(0);
if bdate != Bdate[1] Then
var1 = TotalTrades;
if MarketPosition == 0 Then
count = TotalTrades-var1;
Else
count = (TotalTrades-var1)+1;
If C >= min(A,B) && count==0 && cnt < 5 Then
{ Buy();
cnt=cnt + 1;
}
If MarketPosition==1 && AvgEntryPrice < c then {
If C <= max(A,B) Then
{
Sell("모두청산",AtStop,c,CurrentContracts);
cnt=0;
}
}
답변 1
예스스탁 예스스탁 답변
2017-03-09 14:23:07
안녕하세요
예스스탁입니다.
수식의 내용이 정확히 이해가 되지 않습니다.
요청하신 내용이
당일 1회만 진입하는데 첫진입후 손실시에 조건만족하고 있으면
4회까지 추가진입(첫진입포함 5회)할수 있다라는
내용이시면 수식을 아래와 같이 변경하시면 됩니다.
var : count(0), cnt(0);
if bdate != Bdate[1] Then
var1 = TotalTrades;
if MarketPosition == 0 Then
count = TotalTrades-var1;
Else
count = (TotalTrades-var1)+1;
If MarketPosition <= 0 and C >= min(A,B) and count==0 Then
{
Buy("b");
}
if C < AvgEntryPrice and C >= ma(C,20) and MaxEntries < 5 Then
buy("bb");
If MarketPosition==1 && AvgEntryPrice < c then {
If C <= max(A,B) Then
{
Sell("모두청산",AtStop,c,CurrentContracts);
cnt=0;
}
}
즐거운 하루되세요
> 심심00 님이 쓴 글입니다.
> 제목 : 당일진입제한 및 파라미딩
> 문의드립니다.
조건 :
신호 당일 진입 1회제한,
손실시 5회까지 재진입
평균단가 위에서 청산신호시 청산
파라미딩설정 : 5회
문제점 --> 손실시 추가 진입을 하지 않습니다. 뭐가 문제인지... 부탁드리겠습니다.
var : count(0), cnt(0);
if bdate != Bdate[1] Then
var1 = TotalTrades;
if MarketPosition == 0 Then
count = TotalTrades-var1;
Else
count = (TotalTrades-var1)+1;
If C >= min(A,B) && count==0 && cnt < 5 Then
{ Buy();
cnt=cnt + 1;
}
If MarketPosition==1 && AvgEntryPrice < c then {
If C <= max(A,B) Then
{
Sell("모두청산",AtStop,c,CurrentContracts);
cnt=0;
}
}