예스스탁
예스스탁 답변
2021-04-26 16:00:25
안녕하세요
예스스탁입니다.
input : StartTime(150000),EndTime(055000),xtime(055500);
INPUTS: R(4), S(8), U(6), ZEROLINE(0), SMTHLEN(10);
var : Truestrength(0),Truestrengthsig(0),T(0),tm(0);
Input : 당일수익틱수(200);
Var : N1(0),dayPl(0),당일수익(0),Xcond(false);
Var : value(0),Tcond(false);
if sDate != sDate[1] then
SetStopEndofday(xtime);
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
Tcond = False;
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
Tcond = true;
SetStopEndofday(0);
Xcond = false;
N1 = NetProfit;
}
당일수익 = PriceScale*당일수익틱수;
daypl = NetProfit-N1;
if TotalTrades > TotalTrades[1] then
{
if daypl >= 당일수익 Then
Xcond = true;
if (IsExitName("dbp",1) == true or IsExitName("dsp",1) == true ) then
Xcond = true;
}
Truestrength = TSI(C, R, S, U);
Truestrengthsig = Ema(TSI(C, R, S, U), SMTHLEN);
var1 = ma(C,5);
Var2 = ma(C,10);
if crossup(Truestrength,Truestrengthsig) and Truestrength < 0 Then
{
t = 1;
tm = TimeToMinutes(sTime);
}
if CrossDown(Truestrength,Truestrengthsig) and Truestrength > 0 Then
{
t = -1;
tm = TimeToMinutes(sTime);
}
if T == 1 and TimeToMinutes(sTime) >= tm+10 and CrossUp(var1,Var2) Then
Buy();
if T == -1 and TimeToMinutes(sTime) >= tm+10 and CrossDown(var1,Var2) Then
Sell();
즐거운 하루되세요
> 푸른 님이 쓴 글입니다.
> 제목 : 수식어 부탁드립니다
> input : StartTime(150000),EndTime(055000),xtime(055500);
INPUTS: R(4), S(8), U(6), ZEROLINE(0), SMTHLEN(10);
var : Truestrength(0),Truestrengthsig(0);
Input : 당일수익틱수(200);
Var : N1(0),dayPl(0),당일수익(0),Xcond(false);
Var : value(0),Tcond(false);
if sDate != sDate[1] then
SetStopEndofday(xtime);
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
Tcond = False;
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
Tcond = true;
SetStopEndofday(0);
Xcond = false;
N1 = NetProfit;
}
당일수익 = PriceScale*당일수익틱수;
daypl = NetProfit-N1;
if TotalTrades > TotalTrades[1] then
{
if daypl >= 당일수익 Then
Xcond = true;
if (IsExitName("dbp",1) == true or IsExitName("dsp",1) == true ) then
Xcond = true;
}
Truestrength = TSI(C, R, S, U);
Truestrengthsig = Ema(TSI(C, R, S, U), SMTHLEN);
if crossup(Truestrength,Truestrengthsig) and Truestrength < 0 Then
buy();
if CrossDown(Truestrength,Truestrengthsig) and Truestrength > 0 Then
sell();
;
------------------------------
True Strength Index 지표를 이용한 수식어 변경입니다.
True Strength Index의 cross down 신호시 10분 이후 5,10선 1차 dead cross에서 진입하고
True Strength Index의 cross up 신호시 10분 이후 5,10선 1차 golden cross에서 sell청산하는
수식어와 그 반대되는 buy신호후 청산하는 수식어도 같이 부탁 드립니다.