예스스탁
예스스탁 답변
2022-03-10 13:18:13
안녕하세요
예스스탁입니다.
StartTime은 설정창의 변수탭에서 220000으로 변경하시면 됩니다.
편집기에서 변경하시면 수식을 다시 적용하셔야 합니다.
input : n(1),x(50);
input : StartTime(80000),EndTime(50000);
Inputs : Period(20), Sence(1.5), CC_DN(Yellow);
Input : 당일수익틱수(100),당일손실틱수(100);
Var : N1(0),dayPl(0),당일수익(0),당일손실(0),Xcond(false);
var : Tcond(false),entry(0);
Vars:
VLineUp(0),
VLineDn(0),
HHighest(0),
LLowest(0),
JustChanged(FALSE),
VLine(0), DBN(0);
Array:
Highs[35](0),
Lows[35](0),
RRange[35](0),
UpWave[1](FALSE),
DnWave[1](FALSE);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
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;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
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 Plot1(VLineUp,"VLineUp", Red);
else if DnWave[1] then Plot1(VLineDn,"VLineUp", CC_DN);
*/
end;
당일수익 = PriceScale*당일수익틱수;
당일손실 = PriceScale*당일손실틱수;
if Bdate != Bdate[1] Then
{
Xcond = false;
N1 = NetProfit;
entry = 0;
}
daypl = NetProfit-N1;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if TotalTrades > TotalTrades[1] then
{
if daypl >= 당일수익 Then
Xcond = true;
if (IsExitName("dbp",1) == true or IsExitName("dsp",1) == true) then
Xcond = true;
}
if Tcond == true and Xcond == False Then
{
if MarketPosition <= 0 and
CountIf(C>O,n) == n and
H >= L[2]+PriceScale*x and UpWave[1] and
(entry == 0 or (entry >= 1 and
(MarketPosition == -1 or (MarketPosition == 0 and MarketPosition(1) != 1)))) Then
Buy();
if MarketPosition >= 0 and
CountIf(C<O,n) == n and
L <= H-PriceScale*x and DnWave[1] and
(entry == 0 or (entry >= 1 and
(MarketPosition == 1 or (MarketPosition == 0 and MarketPosition(1) != -1)))) Then
sell();
}
if MarketPosition == 1 then{
ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts));
}
if MarketPosition == -1 then{
ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts));
}
즐거운 하루되세요
> 아트정 님이 쓴 글입니다.
> 제목 : 식첨부
> input : n(1),x(50);
input : StartTime(80000),EndTime(50000);
Inputs : Period(20), Sence(1.5), CC_DN(Yellow);
Input : 당일수익틱수(100),당일손실틱수(100);
Var : N1(0),dayPl(0),당일수익(0),당일손실(0),Xcond(false);
var : Tcond(false);
Vars:
VLineUp(0),
VLineDn(0),
HHighest(0),
LLowest(0),
JustChanged(FALSE),
VLine(0), DBN(0);
Array:
Highs[35](0),
Lows[35](0),
RRange[35](0),
UpWave[1](FALSE),
DnWave[1](FALSE);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
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;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
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 Plot1(VLineUp,"VLineUp", Red);
else if DnWave[1] then Plot1(VLineDn,"VLineUp", CC_DN);
*/
end;
당일수익 = PriceScale*당일수익틱수;
당일손실 = 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;
}
if Tcond == true and Xcond == False Then
{
if CountIf(C>O,n) == n and
H >= L[2]+PriceScale*x and UpWave[1] Then
Buy();
if CountIf(C<O,n) == n and
L <= H-PriceScale*x and DnWave[1] Then
sell();
}
if MarketPosition == 1 then{
ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts));
}
if MarketPosition == -1 then{
ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts));
}
안녕하세요.
위식에서 수정부탁드려요
매수.매도시 다음신호 나올때까지 동일신호 중복 진입금지.
한신호에서 한번만 신호발생 되도록 해 주세요.
예:매수 신호 발생후 매도신호 나올때까지 한번만 신호발생 중복진임금지
매도시 매수신호 발생시까지 한번만 진입.
시작시간 수정시 오후22시면 어떻게 수정 하는지 여부 알려 주세요.
22000으로 수정하니까 적용이 안됨니다.