예스스탁
예스스탁 답변
2021-05-17 09:23:16
안녕하세요
예스스탁입니다.
1
input : ntime(10);
var : S1(0,Data1),D1(0,Data1),TM(0,Data1),TF(0,Data1),entry(False);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF = TM%ntime;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and ntime > 1 and TM >= TM[1]+ntime) or
(Bdate == Bdate[1] and ntime == 1 and TM > TM[1]) Then
{
entry = true;
}
}
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = False;
if entry == true and Data1(CrossUp(c,ma(c,20))) Then
Buy();
if entry == true and Data1(CrossDown(c,ma(c,20))) Then
Sell();
2
input : ntime(10);
var : S1(0,Data1),D1(0,Data1),TM(0,Data1),TF(0,Data1),entry(False);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF = TM%ntime;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and ntime > 1 and TM >= TM[1]+ntime) or
(Bdate == Bdate[1] and ntime == 1 and TM > TM[1]) Then
{
entry = true;
}
}
if TotalTrades > TotalTrades[1] and PositionProfit(1) > 0 Then
entry = False;
if entry == true and Data1(CrossUp(c,ma(c,20))) Then
Buy();
if entry == true and Data1(CrossDown(c,ma(c,20))) Then
Sell();
즐거운 하루되세요
> bigdeal 님이 쓴 글입니다.
> 제목 : data2참조관련시스템식문의드립니다
> 안녕하세요
data1은 60틱봉 data2는10분봉을 참조하여 시스템식을 만들어 시물레이션을 해보니 10분동안
같은신호가 너무 많이 발생을 합니다. 그래서 10분봉 동안 같은 신호는 제어를 하고 싶습니다.
1.10분봉안에서 발생되는 신호를 2번이상 발생되지 않게 제어하거나
2.10분봉내에서 수익발생시 더이상 신호발생하지 않고 다음봉에서 신호발생하도록 하는
시스템식좀 부탁드립니다. 감사합니다.