커뮤니티
문의드립니다.
2017-10-29 17:03:07
172
글번호 113732
안녕하십니까..
아래 식은 20 이평을 기준으로 진입 청산하는 식입니다.
1- 아래식에 20이평 신호에 진입하고
60이평 청산신호에 청산코자 합니다
2- 예를 들면
20 이평 매수신호에 매수진입한 경우
..20이평 기준으로는 매도신호(청산신호)가 금방 발생할 수가 있습니다.
그래서 청산(매도)는 60이평 기준으로 발생하는 신호에 청산코자 합니다.
위와 같이 진입청산이 끝난후에는
다시 발생하는 20이평 신호에 진입코자 합니다.
3- 진입은 좀 빨리하되, 대신 잦은 신호 발생을 줄이고
청산은 좀 천천히 하려고 합니다...
감사합니다...
Input : P(20);
var : T(0),Bcond(false),Scond(false);
value3 = ma(C,P);
var1 = ma(c,12);
var2 = (Highest(High, 60)[25] + Lowest(Low, 60)[25]) / 2;
if crossup(C,var1) Then{
T = 1;
Bcond = false;
}
if CrossDown(C,var1) Then{
T = -1;
Scond = false;
}
if stime >= 090000 and stime < 153000 and T == 1 Then{
if L >= var2+PriceScale*2 Then
Bcond = true;
if Bcond == true and C > value3 then
buy("b",atlimit,var1);
}
if stime >= 090000 and stime < 153000 and T == -1 Then{
if H <= var2-PriceScale*2 Then
Scond = true;
if Scond == true and C < value3 then
sell("s",atlimit,var1);
}
답변 1
예스스탁 예스스탁 답변
2017-10-30 15:57:46
안녕하세요
예스스탁입니다.
Input : P1(20),P2(60);
var : T(0),Bcond(false),Scond(false);
var1 = ma(c,12);
var2 = (Highest(High, 60)[25] + Lowest(Low, 60)[25]) / 2;
value3 = ma(C,P1);
value4 = ma(C,P2);
if crossup(C,var1) Then{
T = 1;
Bcond = false;
}
if CrossDown(C,var1) Then{
T = -1;
Scond = false;
}
if stime >= 090000 and stime < 153000 and T == 1 Then{
if L >= var2+PriceScale*2 Then
Bcond = true;
if MarketPosition == 0 and Bcond == true and C > value3 then
buy("b",atlimit,var1);
}
if stime >= 090000 and stime < 153000 and T == -1 Then{
if H <= var2-PriceScale*2 Then
Scond = true;
if MarketPosition == 0 and Scond == true and C < value3 then
sell("s",atlimit,var1);
}
if MarketPosition == 1 Then{
if H <= var2-PriceScale*2 Then
Scond = true;
if Scond == true and C < value4 then
ExitLong("bx",atlimit,var1);
}
if MarketPosition == -1 then{
if L >= var2+PriceScale*2 Then
Bcond = true;
if Bcond == true and C > value4 then
ExitShort("sx",atlimit,var1);
}
즐거운 하루되세요
> 호시우보 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> 안녕하십니까..
아래 식은 20 이평을 기준으로 진입 청산하는 식입니다.
1- 아래식에 20이평 신호에 진입하고
60이평 청산신호에 청산코자 합니다
2- 예를 들면
20 이평 매수신호에 매수진입한 경우
..20이평 기준으로는 매도신호(청산신호)가 금방 발생할 수가 있습니다.
그래서 청산(매도)는 60이평 기준으로 발생하는 신호에 청산코자 합니다.
위와 같이 진입청산이 끝난후에는
다시 발생하는 20이평 신호에 진입코자 합니다.
3- 진입은 좀 빨리하되, 대신 잦은 신호 발생을 줄이고
청산은 좀 천천히 하려고 합니다...
감사합니다...
Input : P(20);
var : T(0),Bcond(false),Scond(false);
value3 = ma(C,P);
var1 = ma(c,12);
var2 = (Highest(High, 60)[25] + Lowest(Low, 60)[25]) / 2;
if crossup(C,var1) Then{
T = 1;
Bcond = false;
}
if CrossDown(C,var1) Then{
T = -1;
Scond = false;
}
if stime >= 090000 and stime < 153000 and T == 1 Then{
if L >= var2+PriceScale*2 Then
Bcond = true;
if Bcond == true and C > value3 then
buy("b",atlimit,var1);
}
if stime >= 090000 and stime < 153000 and T == -1 Then{
if H <= var2-PriceScale*2 Then
Scond = true;
if Scond == true and C < value3 then
sell("s",atlimit,var1);
}
다음글
이전글