커뮤니티
질문드립니다.
2018-08-09 12:58:34
133
글번호 121248
if N틱 이상 수익 then
("1차매수청산")
if a틱 이상 수익 then
("1차매도청산")
if x틱이상 상승하고 y틱만큼 하락 then
("매수안전청산")
if j틱이상 하락하고 w틱만큼 상승하면 then
("매도안전청산")
답변 1
예스스탁 예스스탁 답변
2018-08-09 14:10:19
안녕하세요
예스스탁입니다.
input : N(20),X(15),Y(5);
input : A(20),J(15),W(5);
if MarketPosition == 1 Then
{
ExitLong("1차매수청산",atlimit,EntryPrice+PriceScale*N);
if Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*X Then
ExitLong("매수안전청산",AtStop,highest(h,BarsSinceEntry)-PriceScale*Y);
}
if MarketPosition == -1 Then
{
ExitShort("1차매도청산",atlimit,EntryPrice+PriceScale*A);
if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*J Then
ExitShort("매도안전청산",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*W);
}
즐거운 하루되세요
> stockric 님이 쓴 글입니다.
> 제목 : 질문드립니다.
> if N틱 이상 수익 then
("1차매수청산")
if a틱 이상 수익 then
("1차매도청산")
if x틱이상 상승하고 y틱만큼 하락 then
("매수안전청산")
if j틱이상 하락하고 w틱만큼 상승하면 then
("매도안전청산")
다음글
이전글