커뮤니티
문의드립니다
2018-08-02 14:59:43
161
글번호 121095
Var : cnt_total(0);
Var : Entrycnt(0);
Entrycnt = 0;
for cnt_total = 0 to 100
{ if sdate == EntryDate(cnt_total)
Then Entrycnt = Entrycnt+1;}
input : stime11(90000);
input : stime12(95900);
if MarketPosition == 0
and entrycnt <1
and Time >= stime11
and Time <= stime12
and RSI(10) > 60
Then
buy("매수");
if MarketPosition == 0
and entrycnt <1
and Time >= stime11
and Time <= stime12
and RSI(10) < 40
Then
sell("매도");
if MarketPosition == 1
and RSI(10) < 50
Then
exitlong("매수청산");
if MarketPosition == -1
and RSI(10) > 50
Then
ExitShort("매도청산");
위식에서
매수진입시그널이 나오고
매수청산시그널이 안나왔을 조건하에
N봉후 매수진입을 늦게하고 싶습니다
만약
N=9봉 후 진입 이라면
매수진입시그널이 나오고
1봉 2봉 3봉... 이 지나고
4봉에서 매수청산 시그널이 나왔다면
매수진입이 없어야 함
매도진입도 같게 하고싶습니다
감사합니다
답변 1
예스스탁 예스스탁 답변
2018-08-03 09:59:17
안녕하세요
예스스탁입니다.
input : N(9);
Var : cnt_total(0);
Var : Entrycnt(0);
Entrycnt = 0;
for cnt_total = 0 to 100
{ if sdate == EntryDate(cnt_total)
Then Entrycnt = Entrycnt+1;}
input : stime11(90000);
input : stime12(95900);
if MarketPosition == 0
and entrycnt <1
and Time >= stime11
and Time <= stime12
and RSI(10) > 60
Then
{
value1 = index;
Condition1 = false;
}
if index <= value1+n and index > value1 then
{
if RSI(10) < 50 Then
Condition1 = true;
if Condition1 == true and index == value1+n Then
buy("매수");
}
if MarketPosition == 0
and entrycnt <1
and Time >= stime11
and Time <= stime12
and RSI(10) < 40
Then
{
value2 = index;
Condition2 = false;
}
if index <= value2+n and index > value2 then
{
if RSI(10) > 50 Then
Condition2 = true;
if Condition2 == false and index == value2+n Then
sell("매도");
}
if MarketPosition == 1
and RSI(10) < 50
Then
exitlong("매수청산");
if MarketPosition == -1
and RSI(10) > 50
Then
ExitShort("매도청산");
즐거운 하루되세요
> 파인애플 님이 쓴 글입니다.
> 제목 : 문의드립니다
>
Var : cnt_total(0);
Var : Entrycnt(0);
Entrycnt = 0;
for cnt_total = 0 to 100
{ if sdate == EntryDate(cnt_total)
Then Entrycnt = Entrycnt+1;}
input : stime11(90000);
input : stime12(95900);
if MarketPosition == 0
and entrycnt <1
and Time >= stime11
and Time <= stime12
and RSI(10) > 60
Then
buy("매수");
if MarketPosition == 0
and entrycnt <1
and Time >= stime11
and Time <= stime12
and RSI(10) < 40
Then
sell("매도");
if MarketPosition == 1
and RSI(10) < 50
Then
exitlong("매수청산");
if MarketPosition == -1
and RSI(10) > 50
Then
ExitShort("매도청산");
위식에서
매수진입시그널이 나오고
매수청산시그널이 안나왔을 조건하에
N봉후 매수진입을 늦게하고 싶습니다
만약
N=9봉 후 진입 이라면
매수진입시그널이 나오고
1봉 2봉 3봉... 이 지나고
4봉에서 매수청산 시그널이 나왔다면
매수진입이 없어야 함
매도진입도 같게 하고싶습니다
감사합니다