커뮤니티
문의드립니다
2016-02-02 18:45:07
98
글번호 95106
진입 3계약
익절 0.5 0.7 1.0에 익절
손절 0.3 0.5 0.7에 손절 하도록 부탁 드립니다.
감사합니다.
Input : shortPeriod(5), longPeriod(20);
value1 = ma(C, shortPeriod);
value2 = ma(C, longPeriod);
# 매수/매도청산
If CrossUP(value1, value2) Then
{
Buy();
}
# 매도/매수청산
If CrossDown(value1, value2) Then
{
Sell();
}
답변 1
예스스탁 예스스탁 답변
2016-02-03 08:45:36
안녕하세요
예스스탁입니다.
Input : shortPeriod(5), longPeriod(20);
value1 = ma(C, shortPeriod);
value2 = ma(C, longPeriod);
If CrossUP(value1, value2) Then
{
Buy("b",OnClose,def,3);
}
If CrossDown(value1, value2) Then
{
Sell("s",OnClose,def,3);
}
if MarketPosition == 1 Then{
ExitLong("BP1",atlimit,EntryPrice+0.5,"",1,1);
ExitLong("BP2",atlimit,EntryPrice+0.7,"",1,1);
ExitLong("BP3",atlimit,EntryPrice+1.0,"",1,1);
ExitLong("BL1",AtStop,EntryPrice-0.3,"",1,1);
ExitLong("BL2",AtStop,EntryPrice-0.5,"",1,1);
ExitLong("BL3",AtStop,EntryPrice-0.7,"",1,1);
}
if MarketPosition == -1 Then{
ExitShort("SP1",atlimit,EntryPrice-0.5,"",1,1);
ExitShort("SP2",atlimit,EntryPrice-0.7,"",1,1);
ExitShort("SP3",atlimit,EntryPrice-1.0,"",1,1);
ExitShort("SL1",AtStop,EntryPrice+0.3,"",1,1);
ExitShort("SL2",AtStop,EntryPrice+0.5,"",1,1);
ExitShort("SL3",AtStop,EntryPrice+0.7,"",1,1);
}
즐거운 하루되세요
> 호시우보 님이 쓴 글입니다.
> 제목 : 문의드립니다
>
진입 3계약
익절 0.5 0.7 1.0에 익절
손절 0.3 0.5 0.7에 손절 하도록 부탁 드립니다.
감사합니다.
Input : shortPeriod(5), longPeriod(20);
value1 = ma(C, shortPeriod);
value2 = ma(C, longPeriod);
# 매수/매도청산
If CrossUP(value1, value2) Then
{
Buy();
}
# 매도/매수청산
If CrossDown(value1, value2) Then
{
Sell();
}
다음글
이전글