커뮤니티
문의 드립니다
2018-07-25 12:53:59
100
글번호 120886
늘 감사드립니다
IF MarketPosition == 0 and Crossup(H, BBTop) and Tcond == True then
{
Buy("매수",OnClose,def,2);
}
IF MarketPosition == 1 and Tcond == True then
{
Exitlong("10틱매수수익",AtStop,EntryPrice + PriceScale*10,"",1,1);
}
IF "환매식"
IF MarketPosition == 0 and Crossdown(L, BBBot) and Tcond == True then
{
Sell("매도",OnClose,def,2);
}
IF MarketPosition == -1 and Tcond == True then
{
Exitshort("10틱매도수익",AtStop,EntryPrice + PriceScale*10,"",1,1);
}
IF "환매식"
위의 식에서 볼맨하단과 상단을 뚫으면 2개 매수 매도해서 10틱 수익이 나면 1개는 청산해라
라는 식은데 제 원하는데로 표시가 안되네요...
수정 부탁드립니다
늘 감사합니다
답변 1
예스스탁 예스스탁 답변
2018-07-25 17:53:45
안녕하세요
예스스탁입니다.
목표수익청산은 atlimit 신호타입으로 지정하셔야 합니다.
(매수주문은 지정한 가격이하,매도주문은 지정한 가격이상)
매도청산의 가격은 EntryPrice - PriceScale*10로 지정하셔야 합니다.
Input : Period(20), MultiD(2);
var : BBTop(0),BBBot(0),Tcond(false);
BBTop = BollBandUp(Period,MultiD);
BBBot = BollBandDown(Period,MultiD);
Tcond = true;
IF MarketPosition == 0 and Crossup(H, BBTop) and Tcond == True then
{
Buy("매수",OnClose,def,2);
}
IF MarketPosition == 1 and Tcond == True then
{
Exitlong("10틱매수수익",AtLimit,EntryPrice + PriceScale*10,"",1,1);
}
IF MarketPosition == 0 and Crossdown(L, BBBot) and Tcond == True then
{
Sell("매도",OnClose,def,2);
}
IF MarketPosition == -1 and Tcond == True then
{
Exitshort("10틱매도수익",AtLimit, EntryPrice - PriceScale*10,"",1,1);
}
즐거운 하루되세요
> 돌아온스머프 님이 쓴 글입니다.
> 제목 : 문의 드립니다
> 늘 감사드립니다
IF MarketPosition == 0 and Crossup(H, BBTop) and Tcond == True then
{
Buy("매수",OnClose,def,2);
}
IF MarketPosition == 1 and Tcond == True then
{
Exitlong("10틱매수수익",AtStop,EntryPrice + PriceScale*10,"",1,1);
}
IF "환매식"
IF MarketPosition == 0 and Crossdown(L, BBBot) and Tcond == True then
{
Sell("매도",OnClose,def,2);
}
IF MarketPosition == -1 and Tcond == True then
{
Exitshort("10틱매도수익",AtStop,EntryPrice + PriceScale*10,"",1,1);
}
IF "환매식"
위의 식에서 볼맨하단과 상단을 뚫으면 2개 매수 매도해서 10틱 수익이 나면 1개는 청산해라
라는 식은데 제 원하는데로 표시가 안되네요...
수정 부탁드립니다
늘 감사합니다
다음글
이전글