커뮤니티
이익시현후손절을절반만하기
2016-09-26 08:14:17
102
글번호 102180
input : HP(1),LP(1);
var : cnt(0),HH(0),LL(0);
HH = dayhigh(1);
for cnt = 1 to HP{
if dayhigh(cnt) > HH Then
HH = dayhigh(cnt);
}
LL = dayLow(1);
for cnt = 1 to LP{
if daylow(cnt) < LL Then
LL = dayLow(cnt);
}
if crossup(c,HH) then
buy();
if CrossDown(c,LL) Then
sell();
#목표후익절
if MarketPosition == 1 and highest(H,BarsSinceEntry) >= EntryPrice+5 Then
exitlong("bx",AtStop,highest(H,BarsSinceEntry)-2);
(현재식은 고가진입후 +5p후-2p하락하면 모두익절입니다
이것을 고가진입후 +5p후-2p하락하면 이익실현을 절반 즉1/2로하게부탁합니다)
if MarketPosition == -1 and Lowest(L,BarsSinceEntry) <= EntryPrice-5 Then
ExitShort("sx",AtStop,Lowest(L,BarsSinceEntry)+2);
(현재식은 저가진입후 -5p후+2p상승하면 모두익절입니다
이것을 저가진입후 -5p후+2p상승하면 이익실현을 절반 즉1/2로하게부탁합니다)
답변 1
예스스탁 예스스탁 답변
2016-09-26 15:29:08
안녕하세요
예스스탁입니다.
input : HP(1),LP(1);
var : cnt(0),HH(0),LL(0);
HH = dayhigh(1);
for cnt = 1 to HP{
if dayhigh(cnt) > HH Then
HH = dayhigh(cnt);
}
LL = dayLow(1);
for cnt = 1 to LP{
if daylow(cnt) < LL Then
LL = dayLow(cnt);
}
if crossup(c,HH) then
buy();
if CrossDown(c,LL) Then
sell();
#목표후익절
if MarketPosition == 1 and highest(H,BarsSinceEntry) >= EntryPrice+5 Then
ExitLong("bx",AtStop,highest(H,BarsSinceEntry)-2,"",Floor(CurrentContracts*0.5),1);
if MarketPosition == -1 and Lowest(L,BarsSinceEntry) <= EntryPrice-5 Then
ExitShort("sx",AtStop,Lowest(L,BarsSinceEntry)+2,"",Floor(CurrentContracts*0.5),1);
즐거운 하루되세요
> 큰바위얼굴 님이 쓴 글입니다.
> 제목 : 이익시현후손절을절반만하기
> input : HP(1),LP(1);
var : cnt(0),HH(0),LL(0);
HH = dayhigh(1);
for cnt = 1 to HP{
if dayhigh(cnt) > HH Then
HH = dayhigh(cnt);
}
LL = dayLow(1);
for cnt = 1 to LP{
if daylow(cnt) < LL Then
LL = dayLow(cnt);
}
if crossup(c,HH) then
buy();
if CrossDown(c,LL) Then
sell();
#목표후익절
if MarketPosition == 1 and highest(H,BarsSinceEntry) >= EntryPrice+5 Then
exitlong("bx",AtStop,highest(H,BarsSinceEntry)-2);
(현재식은 고가진입후 +5p후-2p하락하면 모두익절입니다
이것을 고가진입후 +5p후-2p하락하면 이익실현을 절반 즉1/2로하게부탁합니다)
if MarketPosition == -1 and Lowest(L,BarsSinceEntry) <= EntryPrice-5 Then
ExitShort("sx",AtStop,Lowest(L,BarsSinceEntry)+2);
(현재식은 저가진입후 -5p후+2p상승하면 모두익절입니다
이것을 저가진입후 -5p후+2p상승하면 이익실현을 절반 즉1/2로하게부탁합니다)
다음글