예스스탁
예스스탁 답변
2025-02-18 13:16:26
안녕하세요
예스스탁입니다.
Input : Length1(4),Length2(18),Length3(60);
Var : TLen1(0),TLen2(0),TLen3(0),Tma1(0),Tma2(0),Tma3(0),T(0);
var : pst(0),OO(0);
TLen1 = Ceiling((Length1 + 1) * .5);
TLen2 = Ceiling((Length2 + 1) * .5);
TLen3 = Ceiling((Length3 + 1) * .5);
Tma1 = ma(ma(C, TLen1), TLen1);
Tma2 = ma(ma(C, TLen2), TLen2);
Tma3 = ma(ma(C, TLen3), TLen3);
if Tma1 > Tma1[1] Then
T = 1;
if Tma1< Tma1[1] Then
T = -1;
if T == 1 and T[1] != 1 Then
var1 = 0;
// if T == 1 and C > O and (C+O)/2 >= Tma1 and Tma2 > Tma2[1] and Tma3>Tma3 [1] Then{ 60이평포함
if T == 1 and C > O and (C+O)/2 >= Tma1 and Tma2 >Tma2[1] and Tma1>Tma2 Then{
var1 = var1+1;
if pst <= 0 and var1 == 1 Then
{
pst = 1;
OO = O;
Plot1(L,"매수",Red);
}
}
if T == -1 and T[1] != -1 Then
var2 = 0;
// if T == -1 and C < O and (C+O)/2 <= Tma1 and Tma2 < Tma2[1] and Tma3 < Tma3[1] Then{ 60이평포함
if T == -1 and C < O and (C+O)/2 <= Tma1 and Tma2 < Tma2[1] and Tma1 < Tma2 Then
{
var2 = var2+1;
if pst >= 0 and var2 == 1 Then
{
pst = -1;
OO = O;
Plot2(H,"매도",Blue);
}
}
if pst == 1 and C < OO Then
{
pst = -1;
OO = O;
Plot3(H,"스위칭매도",Cyan);
}
if pst == -1 and C > OO Then
{
pst = 1;
OO = O;
Plot4(L,"스위칭매수",Magenta);
}
즐거운 하루되세요
> 라몬 님이 쓴 글입니다.
> 제목 : 도움 부탁드립니다
> 안녕하세요
늘 도움주셔서 감사합니다.
아래와 같은 수식이 있는 시스템식은 어떻게 검색식 표현 되려면으로 수정해야 하는지요?
if MarketPosition == 1 and C < O[BarsSinceEntry] Then
Sell();
if MarketPosition == -1 and C > O[BarsSinceEntry] Then
Buy();
*검색식으로 바꿀 시스템식
Input : Length1(4),Length2(18),Length3(60);
Var : TLen1(0),TLen2(0),TLen3(0),Tma1(0),Tma2(0),Tma3(0),T(0);
TLen1 = Ceiling((Length1 + 1) * .5);
TLen2 = Ceiling((Length2 + 1) * .5);
TLen3 = Ceiling((Length3 + 1) * .5);
Tma1 = ma(ma(C, TLen1), TLen1);
Tma2 = ma(ma(C, TLen2), TLen2);
Tma3 = ma(ma(C, TLen3), TLen3);
if Tma1 > Tma1[1] Then
T = 1;
if Tma1< Tma1[1] Then
T = -1;
if T == 1 and T[1] != 1 Then
var1 = 0;
// if T == 1 and C > O and (C+O)/2 >= Tma1 and Tma2 > Tma2[1] and Tma3>Tma3 [1] Then{ 60이평포함
if T == 1 and C > O and (C+O)/2 >= Tma1 and Tma2 >Tma2[1] and Tma1>Tma2 Then{
var1 = var1+1;
if var1 == 1 Then
buy("5매수");
}
if T == -1 and T[1] != -1 Then
var2 = 0;
// if T == -1 and C < O and (C+O)/2 <= Tma1 and Tma2 < Tma2[1] and Tma3 < Tma3[1] Then{ 60이평포함
if T == -1 and C < O and (C+O)/2 <= Tma1 and Tma2 < Tma2[1] and Tma1 < Tma2 Then
{
var2 = var2+1;
if var2 == 1 Then
sell("5매도");
}
if MarketPosition == 1 and C < O[BarsSinceEntry] Then
Sell();
if MarketPosition == -1 and C > O[BarsSinceEntry] Then
Buy();