커뮤니티
시스템식
2013-12-11 09:12:48
118
글번호 70330
아래식에서 매수후 가격이 0.5%씩 상승할때마다 분할매도하게끔 식을 변경해 주세요.
매도: 매수후 가격이 0.5%씩 오를때마다 분할 매도(0.5%, 1%, 1.5% ~ 4%)
매도 시그날이 나오면 전체매도청산
Input : shortPeriod(10), longPeriod(20);
value1 = ma(C, shortPeriod);
value2 = ma(C, longPeriod);
If CrossUp(value1, value2) Then
{
Buy();
}
If CrossDown(value1, value2) Then
{
Sell();
}
답변 1
예스스탁 예스스탁 답변
2013-12-11 16:40:32
안녕하세요
예스스탁입니다.
Input : shortPeriod(10), longPeriod(20),Per(0.5),분할청산수량(10);
var : N(0);
value1 = ma(C, shortPeriod);
value2 = ma(C, longPeriod);
If CrossUp(value1, value2) Then
Buy();
If CrossDown(value1, value2) Then
ExitLong("bx1");
if MarketPosition == 1 Then{
N = (countif(CurrentContracts < CurrentContracts[1],BarsSinceEntry)+1);
ExitLong("bx",Atlimit,EntryPrice*(1+(Per*N)/100),"",분할청산수량,2);
}
즐거운 하루되세요
> erwe343 님이 쓴 글입니다.
> 제목 : 시스템식
> 아래식에서 매수후 가격이 0.5%씩 상승할때마다 분할매도하게끔 식을 변경해 주세요.
매도: 매수후 가격이 0.5%씩 오를때마다 분할 매도(0.5%, 1%, 1.5% ~ 4%)
매도 시그날이 나오면 전체매도청산
Input : shortPeriod(10), longPeriod(20);
value1 = ma(C, shortPeriod);
value2 = ma(C, longPeriod);
If CrossUp(value1, value2) Then
{
Buy();
}
If CrossDown(value1, value2) Then
{
Sell();
}