커뮤니티
고가와저가사이추격금지구역
2016-07-21 15:26:05
166
글번호 100270
input : HP(5),LP(5);
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();
input : AtrMult(5), AtrPeriod(5);
var : AtrVal(0), posHigh(0), posLow(0);
ATRVal = ATR(AtrPeriod) * AtrMult;
PosHigh = Highest(H,BarssinceEntry+2);
PosLow = Lowest(L,BarsSinceEntry+2);
#5일고가와 5일저가사이 추격상하 매매 금지
If MarketPosition == -1 and C > HH Then
buy("ATR6", AtStop, PosLow + ATRVal);
If MarketPosition == 1 and C < LL Then
sell("ATR5", AtStop, PosHigh - ATRVal);
If MarketPosition == 0 and C < HH Then
buy("ATR8", AtStop, Lowest(L,BarsSinceExit(1)+1) + ATRVal);
If MarketPosition == 0 and C > LL Then
sell("ATR7", AtStop, Highest(H,BarsSinceExit(1)+1) - ATRVal);
위수식에서
5일고가와 5일저가사이에서는 추격안되록하였습나다
그런데 추적이 나오는데 잘못된걸 좀 고쳐주세요
감사합니다
답변 1
예스스탁 예스스탁 답변
2016-07-22 13:02:38
안녕하세요
예스스탁입니다.
input : HP(5),LP(5);
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("b");
if CrossDown(c,LL) Then
sell("s");
input : AtrMult(5), AtrPeriod(5);
var : AtrVal(0), posHigh(0), posLow(0);
ATRVal = ATR(AtrPeriod) * AtrMult;
PosHigh = Highest(H,BarssinceEntry+2);
PosLow = Lowest(L,BarsSinceEntry+2);
#5일고가와 5일저가사이 추격상하 매매 금지
If MarketPosition == -1 and PosLow + ATRVal > HH Then
buy("ATR6", AtStop, PosLow + ATRVal);
If MarketPosition == 1 and PosHigh - ATRVal < LL Then
sell("ATR5", AtStop, PosHigh - ATRVal);
If MarketPosition == 0 and C < HH Then
buy("ATR8", AtStop, Lowest(L,BarsSinceExit(1)+1) + ATRVal);
If MarketPosition == 0 and C > LL Then
sell("ATR7", AtStop, Highest(H,BarsSinceExit(1)+1) - ATRVal);
위식은 ATR6과 ATR5를 수정한 식입니다.
ATR8과 ATR7도 막고자 하시면 아래와 이용하시면 됩니다.
input : HP(5),LP(5);
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("b");
if CrossDown(c,LL) Then
sell("s");
input : AtrMult(5), AtrPeriod(5);
var : AtrVal(0), posHigh(0), posLow(0);
ATRVal = ATR(AtrPeriod) * AtrMult;
PosHigh = Highest(H,BarssinceEntry+2);
PosLow = Lowest(L,BarsSinceEntry+2);
#5일고가와 5일저가사이 추격상하 매매 금지
If MarketPosition == -1 and PosLow + ATRVal > HH Then
buy("ATR6", AtStop, PosLow + ATRVal);
If MarketPosition == 1 and PosHigh - ATRVal < LL Then
sell("ATR5", AtStop, PosHigh - ATRVal);
If MarketPosition == 0 and Lowest(L,BarsSinceExit(1)+1) + ATRVal > HH Then
buy("ATR8", AtStop, Lowest(L,BarsSinceExit(1)+1) + ATRVal);
If MarketPosition == 0 and Highest(H,BarsSinceExit(1)+1) - ATRVal < LL Then
sell("ATR7", AtStop, Highest(H,BarsSinceExit(1)+1) - ATRVal);
즐거운 하루되세요
> 큰바위얼굴 님이 쓴 글입니다.
> 제목 : 고가와저가사이추격금지구역
> input : HP(5),LP(5);
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();
input : AtrMult(5), AtrPeriod(5);
var : AtrVal(0), posHigh(0), posLow(0);
ATRVal = ATR(AtrPeriod) * AtrMult;
PosHigh = Highest(H,BarssinceEntry+2);
PosLow = Lowest(L,BarsSinceEntry+2);
#5일고가와 5일저가사이 추격상하 매매 금지
If MarketPosition == -1 and C > HH Then
buy("ATR6", AtStop, PosLow + ATRVal);
If MarketPosition == 1 and C < LL Then
sell("ATR5", AtStop, PosHigh - ATRVal);
If MarketPosition == 0 and C < HH Then
buy("ATR8", AtStop, Lowest(L,BarsSinceExit(1)+1) + ATRVal);
If MarketPosition == 0 and C > LL Then
sell("ATR7", AtStop, Highest(H,BarsSinceExit(1)+1) - ATRVal);
위수식에서
5일고가와 5일저가사이에서는 추격안되록하였습나다
그런데 추적이 나오는데 잘못된걸 좀 고쳐주세요
감사합니다