예스스탁
예스스탁 답변
2025-03-14 16:19:57
안녕하세요
예스스탁입니다.
input : EmaPeriod(80);
input : RSIPeriod1(7),RSIPeriod2(14),RSIPeriod3(21),RSI차이(7);
input : ADXPeriod(20);
input : 익절(50),손절(50);
var : Emav(0,Data1),RSI1(0,Data1),RSI2(0,Data1),RSI3(0,Data1),ADXv(0,Data1);
var : Bcond(False,Data1),Scond(False,Data1);
Input : 당일수익틱수(200);
Var : N1(0,Data1),dayPl(0,Data1),당일수익(0,Data1);
var : Tcond(false,Data1),Xcond(false,Data1),S1(0);
if Bdate != Bdate[1] Then
{
Xcond = False;
}
당일수익 = data1(PriceScale*당일수익틱수);
if Bdate != Bdate[1] Then
{
Xcond = false;
N1 = NetProfit;
}
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;
}
Emav = data1(Ema(C,EmaPeriod));
RSI1 = data1(RSI(RSIPeriod1));
RSI2 = data1(RSI(RSIPeriod2));
RSI3 = data1(RSI(RSIPeriod3));
ADXv = data1(ADX(ADXperiod));
Bcond = MarketPosition == 0 and MarketPosition(1) == 1 and MarketPosition(2) == 1;
Scond = MarketPosition == 0 and MarketPosition(1) == -1 and MarketPosition(2) == -1;
if Xcond == false then
{
if S1 >= 0 and
C > Emav and
RSI1 >= RSI2+RSI차이 and RSI2 >= RSI3+RSI차이 and
ADXV >= 21 and
Bcond == False and
Data2(ma(C,60) > ma(C,10)) Then
{
S1= 1;
}
if S1 <= 0 and
C < Emav and
RSI1 <= RSI2-RSI차이 and RSI2 <= RSI3-RSI차이 and
ADXV >= 21 and
Scond == False and
Data2(ma(C,60) < ma(C,10)) Then
{
S1 = -1;
}
}
if MarketPosition == 1 then
{
ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts));
}
if MarketPosition == -1 then
{
ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts));
}
Inputs : Period(20), Sence(1.5), CC_DN(Yellow);
Vars:
VLineUp(0,Data1),
VLineDn(0,Data1),
HHighest(0,Data1),
LLowest(0,Data1),
JustChanged(FALSE,Data1),
VLine(0,Data1), DBN(0,Data1),T(0,Data1);
Array:
Highs[35](0,Data1),
Lows[35](0,Data1),
RRange[35](0,Data1),
UpWave[1](FALSE,Data1),
DnWave[1](FALSE,Data1);
var : v1(0,Data1),v2(0,Data1),v3(0,Data1);
var : v4(0,Data1),v5(0,Data1),v6(0,Data1);
If STime == 180000 Then
DBN = 0;
DBN = DBN + 1;
v1 = Period;
v2 = v1 - 1;
v3 = v1 - 2;
v5 = Sence;
v6 = H-L;
JustChanged = FALSE;
if CurrentBar <= v2 then begin
Highs[CurrentBar] = Close;
Lows[CurrentBar] = Close;
RRange[CurrentBar] = (H-L) /2;
end;
if CurrentBar == v1 then begin
if Highs[v2] >= Highs[v3] then begin
UpWave[1] = TRUE;
HHighest = Highs[v2];
VLineUp = HHighest - (v5 * MA(v6,v2));
#Plot1(VLineUp,"VLineUp");
end;
if Highs[v2] < Highs[v3] then begin
DnWave[1] = TRUE;
LLowest = Lows[v2];
VLineDn = LLowest + (v5 * MA(v6,v2));
#Plot2(VLineDn,"VLineDn");
end;
end;
if CurrentBar > v1 then begin
if DnWave[1] and Close > VLineDn then begin
DnWave[1] = FALSE;
UpWave[1] = TRUE;
JustChanged = TRUE;
HHighest = Close;
LLowest = 0;
end;
if UpWave[1] and Close < VLineUp and JustChanged == FALSE then begin
UpWave[1] = FALSE;
DnWave[1] = TRUE;
JustChanged = TRUE;
LLowest = Close;
HHighest = 0;
end;
if JustChanged == FALSE then begin
if Close > HHighest then
HHighest = Close;
else if Close < LLowest then
LLowest = Close;
end;
VLineUp = HHighest - (v5 * MA(v6,v2));
VLineDn = LLowest + (v5 * MA(v6,v2));
if UpWave[1] then
T = 1;
else if DnWave[1] then
T = -1;
end;
Input : BBP(20), MultiD(2),P(30);
var : BBmd(0,Data1),BBup(0,Data1),BBdn(0,Data1),mav(0,Data1);
BBmd = ma(C,Period);
BBup = BollBandUp(BBP,MultiD);
BBdn = BollBandDown(BBP,MultiD);
mav = ma(C,P);
var : S2(0,Data1);
if S2 >= 0 and CrossDown(C,BBup) and t == -1 and c > mav Then
S2 = -1;
if S2 <= 0 and crossup(C,BBdn) and t == 1 and c < mav Then
S2 = 1;
if S1 == 1 and S2 == 1 and (S1[1] != 1 or S2[1] != 1) Then
Buy();
if S1 == -1 and S2 == -1 and (S1[1] != -1 or S2[1] != -1) Then
Sell();
즐거운 하루되세요
> 아트정 님이 쓴 글입니다.
> 제목 : 수식 수정
> A식
input : EmaPeriod(80);
input : RSIPeriod1(7),RSIPeriod2(14),RSIPeriod3(21),RSI차이(7);
input : ADXPeriod(20);
input : 익절(50),손절(50);
var : Emav(0,Data1),RSI1(0,Data1),RSI2(0,Data1),RSI3(0,Data1),ADXv(0,Data1);
var : Bcond(False,Data1),Scond(False,Data1);
Input : 당일수익틱수(200);
Var : N1(0,Data1),dayPl(0,Data1),당일수익(0,Data1);
var : Tcond(false,Data1),Xcond(false,Data1);
if Bdate != Bdate[1] Then
{
Xcond = False;
}
당일수익 = data1(PriceScale*당일수익틱수);
if Bdate != Bdate[1] Then
{
Xcond = false;
N1 = NetProfit;
}
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;
}
Emav = data1(Ema(C,EmaPeriod));
RSI1 = data1(RSI(RSIPeriod1));
RSI2 = data1(RSI(RSIPeriod2));
RSI3 = data1(RSI(RSIPeriod3));
ADXv = data1(ADX(ADXperiod));
Bcond = MarketPosition == 0 and MarketPosition(1) == 1 and MarketPosition(2) == 1;
Scond = MarketPosition == 0 and MarketPosition(1) == -1 and MarketPosition(2) == -1;
if Xcond == false then
{
if C > Emav and
RSI1 >= RSI2+RSI차이 and RSI2 >= RSI3+RSI차이 and
ADXV >= 21 and
Bcond == False and
Data2(ma(C,60) > ma(C,10)) Then
buy();
if C < Emav and
RSI1 <= RSI2-RSI차이 and RSI2 <= RSI3-RSI차이 and
ADXV >= 21 and
Scond == False and
Data2(ma(C,60) < ma(C,10)) Then
Sell();
}
if MarketPosition == 1 then
{
ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts));
}
if MarketPosition == -1 then
{
ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts));
}
b식
Inputs : Period(20), Sence(1.5), CC_DN(Yellow);
Vars:
VLineUp(0),
VLineDn(0),
HHighest(0),
LLowest(0),
JustChanged(FALSE),
VLine(0), DBN(0),T(0);
Array:
Highs[35](0),
Lows[35](0),
RRange[35](0),
UpWave[1](FALSE),
DnWave[1](FALSE);
If STime == 180000 Then
DBN = 0;
DBN = DBN + 1;
Var1 = Period;
Var2 = Var1 - 1;
Var3 = Var1 - 2;
Var5 = Sence;
Var6 = H-L;
JustChanged = FALSE;
if CurrentBar <= Var2 then begin
Highs[CurrentBar] = Close;
Lows[CurrentBar] = Close;
RRange[CurrentBar] = (H-L) /2;
end;
if CurrentBar == Var1 then begin
if Highs[Var2] >= Highs[Var3] then begin
UpWave[1] = TRUE;
HHighest = Highs[Var2];
VLineUp = HHighest - (Var5 * MA(Var6,Var2));
#Plot1(VLineUp,"VLineUp");
end;
if Highs[Var2] < Highs[Var3] then begin
DnWave[1] = TRUE;
LLowest = Lows[Var2];
VLineDn = LLowest + (Var5 * MA(Var6,Var2));
#Plot2(VLineDn,"VLineDn");
end;
end;
if CurrentBar > Var1 then begin
if DnWave[1] and Close > VLineDn then begin
DnWave[1] = FALSE;
UpWave[1] = TRUE;
JustChanged = TRUE;
HHighest = Close;
LLowest = 0;
end;
if UpWave[1] and Close < VLineUp and JustChanged == FALSE then begin
UpWave[1] = FALSE;
DnWave[1] = TRUE;
JustChanged = TRUE;
LLowest = Close;
HHighest = 0;
end;
if JustChanged == FALSE then begin
if Close > HHighest then
HHighest = Close;
else if Close < LLowest then
LLowest = Close;
end;
VLineUp = HHighest - (Var5 * MA(Var6,Var2));
VLineDn = LLowest + (Var5 * MA(Var6,Var2));
if UpWave[1] then
T = 1;
else if DnWave[1] then
T = -1;
end;
Input : BBP(20), MultiD(2),P(30);
var : BBmd(0),BBup(0),BBdn(0),mav(0);
BBmd = ma(C,Period);
BBup = BollBandUp(BBP,MultiD);
BBdn = BollBandDown(BBP,MultiD);
mav = ma(C,P);
if CrossDown(C,BBup) and t == -1 and c > mav Then
sell();
if crossup(C,BBdn) and t == 1 and c < mav Then
buy();
안녕하세요 두식이 같은방향으로 신호시 진입하도록 수정부탁드림니다.
수식 A+B
위 두식이 일치할때 진입.
A식이 신호발생 상태에서 B식이 같은방향으로 신호시 진입