예스스탁
예스스탁 답변
2023-11-01 13:59:25
안녕하세요
예스스탁입니다.
input : StartTime(220000),EndTime(50000);
input : 익절틱수(400),손절틱수(100),진입횟수(20),P1(2),P2(20);
var : Tcond(False),entry(0);
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;
entry = 0;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
var1 = SwingHigh(1, H, 3, 1, 50);
var2 = SwingHigh(1, L, 3, 1, 50);
Var3 = ma(C,P1);
Var4 = ma(C,P2);
if crossup(c, var1) then
{
if Var3 > Var4 Then
buy("b");
Else
Sell("bs");
}
if crossdown(c, var2) then
{
if Var3 < Var4 Then
sell("s");
Else
Buy("sb");
}
if MarketPosition == 1 and IsEntryName("sb") == true and CrossDown(Var3,Var4) Then
Sell("sbs");
if MarketPosition == -1 and IsEntryName("bs") == true and CrossUp(Var3,Var4) Then
Buy("bsb");
즐거운 하루되세요
> 푸른 님이 쓴 글입니다.
> 제목 : 문의 드립니다.
> input : StartTime(220000),EndTime(50000);
input : 익절틱수(400),손절틱수(100),진입횟수(20);
var : Tcond(False),entry(0);
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;
entry = 0;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
var1 = SwingHigh(1, H, 3, 1, 50);
var2 = SwingHigh(1, L, 3, 1, 50);
if crossup(c, var1) then{
buy();
exitshort();
}
if crossdown(c, var2) then{
sell();
exitlong();
}
위 수식어에 추가로
2,20선 정배열에 매도는 매수전환 2,30선 데드크로스에 매도전환
2,20선 역배열에 매수는 매도전환 2,30선 골든크로스에 매수전환
의 수식어를 부탁드립니다.
input : StartTime(192000),EndTime(52000);
input : 익절틱수(0),손절틱수(0);
var : Tcond(False),entry(0);
Variables: Mom(0);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
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 (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
{
Tcond = False;
}
if Tcond == true Then
{
if L ==lowest(L,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 Then
{
Buy("b",AtStop,(highest(H,2)+lowest(L,2))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 9 Then
ExitShort();
}
if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 Then
{
Sell("s",AtStop,(lowest(L,2)+highest(H,2))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 9 Then
ExitLong();
if L ==lowest(L,1) and highest(H,3) >= lowest(L,2)+PriceScale*10 Then
{
Buy("b1",AtStop,(highest(H,3)+lowest(L,1))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 9 Then
ExitShort();
if H == highest(H,1) and lowest(L,3) <= highest(H,2)+PriceScale*10 Then
{
Sell("s1",AtStop,(lowest(L,3)+highest(H,1))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 9 Then
ExitLong();
if L ==lowest(L,1) and highest(H,3) >= lowest(L,2)+PriceScale*10 Then
{
Buy("b2",AtStop,(highest(H,3)+lowest(L,1))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 9 Then
ExitShort();
if H == highest(H,1) and lowest(L,3) <= highest(H,2)+PriceScale*10 Then
{
Sell("s2",AtStop,(lowest(L,3)+highest(H,1))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 9 Then
ExitLong();
if L ==lowest(L,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 Then
{
Buy("b3",AtStop,(highest(H,2)+lowest(L,2))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 9 Then
ExitShort();
if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 Then
{
Sell("s3",AtStop,(lowest(L,2)+highest(H,2))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 9 Then
ExitLong();
if L ==lowest(L,1) and highest(H,3) >= lowest(L,2)+PriceScale*10 Then
{
Buy("b4",AtStop,(highest(H,3)+lowest(L,1))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 9 Then
ExitShort();
if H == highest(H,1) and lowest(L,3) <= highest(H,2)+PriceScale*10 Then
{
Sell("s4",AtStop,(lowest(L,3)+highest(H,1))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 9 Then
ExitLong();
if L ==lowest(L,1) and highest(H,3) >= lowest(L,2)+PriceScale*10 Then
{
Buy("b5",AtStop,(highest(H,3)+lowest(L,1))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 9 Then
ExitShort();
if H == highest(H,1) and lowest(L,3) <= highest(H,2)+PriceScale*10 Then
{
Sell("s5",AtStop,(lowest(L,3)+highest(H,1))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 9 Then
ExitLong();
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
---------------------------------------------------------------------------------
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 문의 드립니다.
> 안녕하세요
예스스탁입니다.
input : StartTime(220000),EndTime(50000);
input : 익절틱수(400),손절틱수(100),진입횟수(20),P1(2),P2(20);
var : Tcond(False),entry(0);
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;
entry = 0;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
var1 = SwingHigh(1, H, 3, 1, 50);
var2 = SwingHigh(1, L, 3, 1, 50);
Var3 = ma(C,P1);
Var4 = ma(C,P2);
if crossup(c, var1) then
{
if Var3 > Var4 Then
buy("b");
Else
Sell("bs");
}
if crossdown(c, var2) then
{
if Var3 < Var4 Then
sell("s");
Else
Buy("sb");
}
if MarketPosition == 1 and IsEntryName("sb") == true and CrossDown(Var3,Var4) Then
Sell("sbs");
if MarketPosition == -1 and IsEntryName("bs") == true and CrossUp(Var3,Var4) Then
Buy("bsb");
즐거운 하루되세요
> 푸른 님이 쓴 글입니다.
> 제목 : 문의 드립니다.
> input : StartTime(220000),EndTime(50000);
input : 익절틱수(400),손절틱수(100),진입횟수(20);
var : Tcond(False),entry(0);
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;
entry = 0;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
var1 = SwingHigh(1, H, 3, 1, 50);
var2 = SwingHigh(1, L, 3, 1, 50);
if crossup(c, var1) then{
buy();
exitshort();
}
if crossdown(c, var2) then{
sell();
exitlong();
}
위 수식어에 추가로
2,20선 정배열에 매도는 매수전환 2,30선 데드크로스에 매도전환
2,20선 역배열에 매수는 매도전환 2,30선 골든크로스에 매수전환
의 수식어를 부탁드립니다.