커뮤니티
문이 드립니다.
2018-06-03 22:10:14
196
글번호 119457
문의 드립니다.
아래식에 (20 이평 크로스 진입)
60 이평 크로스 up, down 에 청산하고자 합니다.
부탁합니다.
감사합니다.
var1 = ma(C,20);
# 매도/매수 1회로 제한
var : count(0),cnt(0);
count = 0;
for cnt = 0 to 20{
if sdate == EntryDate(cnt) Then
count = count+1;
}
if count < 1 and stime >= 093000 and stime < 153000 and crossup(c,var1) Then
if TotalTrades == 0 or
(MarketPosition == -1 and BarsSinceEntry >= 50) or
(TotalTrades >= 1 and MarketPosition == 0 and BarsSinceExit(1) >= 50) Then
buy();
if count < 1 and stime >= 093000 and stime < 153000 and CrossDown(c,var1) Then
if TotalTrades == 0 or
(MarketPosition == 1 and BarsSinceEntry >= 50) or
(TotalTrades >= 1 and MarketPosition == 0 and BarsSinceExit(1) >= 50) Then
sell();
답변 1
예스스탁 예스스탁 답변
2018-06-05 10:05:32
안녕하세요
예스스탁입니다.
var1 = ma(C,20);
var2 = ma(c,60);
# 매도/매수 1회로 제한
var : count(0),cnt(0);
count = 0;
for cnt = 0 to 20{
if sdate == EntryDate(cnt) Then
count = count+1;
}
if count < 1 and stime >= 093000 and stime < 153000 and crossup(c,var1) Then
if TotalTrades == 0 or
(MarketPosition == -1 and BarsSinceEntry >= 50) or
(TotalTrades >= 1 and MarketPosition == 0 and BarsSinceExit(1) >= 50) Then
buy();
if count < 1 and stime >= 093000 and stime < 153000 and CrossDown(c,var1) Then
if TotalTrades == 0 or
(MarketPosition == 1 and BarsSinceEntry >= 50) or
(TotalTrades >= 1 and MarketPosition == 0 and BarsSinceExit(1) >= 50) Then
sell();
if MarketPosition == 1 and CrossDown(c,var2) Then
exitlong();
if MarketPosition == -1 and CrossUp(c,var2) Then
ExitShort();
즐거운 하루되세요
> 호시우보 님이 쓴 글입니다.
> 제목 : 문이 드립니다.
>
문의 드립니다.
아래식에 (20 이평 크로스 진입)
60 이평 크로스 up, down 에 청산하고자 합니다.
부탁합니다.
감사합니다.
var1 = ma(C,20);
# 매도/매수 1회로 제한
var : count(0),cnt(0);
count = 0;
for cnt = 0 to 20{
if sdate == EntryDate(cnt) Then
count = count+1;
}
if count < 1 and stime >= 093000 and stime < 153000 and crossup(c,var1) Then
if TotalTrades == 0 or
(MarketPosition == -1 and BarsSinceEntry >= 50) or
(TotalTrades >= 1 and MarketPosition == 0 and BarsSinceExit(1) >= 50) Then
buy();
if count < 1 and stime >= 093000 and stime < 153000 and CrossDown(c,var1) Then
if TotalTrades == 0 or
(MarketPosition == 1 and BarsSinceEntry >= 50) or
(TotalTrades >= 1 and MarketPosition == 0 and BarsSinceExit(1) >= 50) Then
sell();