예스스탁
예스스탁 답변
2023-11-09 10:31:00
안녕하세요
예스스탁입니다.
1
input : StartTime(143000),EndTime(53000);
input : 익절틱수(0),손절틱수(0);
var : Tcond(False),entry(0);
Variables: Mom(0);
Var : N1(0),dayPl(0),당일수익(400),당일손실(100),Xcond(false);
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;
}
var1 = ma(C,1);
Var2 = ma(C,5);
if Tcond == true Then
{
if L ==lowest(L,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 and var1 > Var2 Then
{
Buy("b",AtStop,(highest(H,2)+lowest(L,2))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 8 Then
ExitShort();
}
if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 and var1 < Var2 Then
{
Sell("s",AtStop,(lowest(L,2)+highest(H,2))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 8 Then
ExitLong();
{
if L ==lowest(L,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 and var1 > Var2 Then
{
Buy("b1",AtStop,(highest(H,2)+lowest(L,2))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 8 Then
ExitShort();
}
if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 and var1 < Var2 Then
{
Sell("s1",AtStop,(lowest(L,2)+highest(H,2))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 8 Then
ExitLong();
{
if L ==lowest(L,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 and var1 >= Var2 Then
{
Buy("b2",AtStop,(highest(H,2)+lowest(L,2))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 8 Then
ExitShort();
}
if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 and var1 <= Var2 Then
{
Sell("s2",AtStop,(lowest(L,2)+highest(H,2))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 8 Then
ExitLong();
if MarketPosition == 1 and CrossDown(var1,Var2) Then
ExitLong();
if MarketPosition == -1 and CrossUp(var1,Var2) Then
ExitShort();
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
2
input : StartTime(100000),EndTime(50000);
input : 익절틱수(0),손절틱수(0);
var : Tcond(False);
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 MarketPosition <= 0 and H < lowest(L,100)+(highest(H,100)-lowest(L,100))*0.5 Then
Buy("b",AtStop,lowest(L,100)+(highest(H,100)-lowest(L,100))*0.5);
if MarketPosition == 1 Then
ExitLong("bx",AtLimit,highest(H,100));
if MarketPosition >= 0 and L > highest(H,100)-(highest(H,100)-lowest(L,100))*0.5 Then
Sell("s",AtStop,highest(H,100)-(highest(H,100)-lowest(L,100))*0.5);
if MarketPosition == 1 Then
ExitShort("sx",AtLimit,lowest(H,100));
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
3
input : StartTime(100000),EndTime(50000);
input : 익절틱수(0),손절틱수(0);
var : Tcond(False);
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 MarketPosition <= 0 and H < lowest(L,100)+(highest(H,100)-lowest(L,100))*0.2 Then
Buy("b",AtStop,lowest(L,100)+(highest(H,100)-lowest(L,100))*0.2);
if MarketPosition == 1 Then
ExitLong("bx",AtLimit,highest(H,100));
if MarketPosition >= 0 and L > highest(H,100)-(highest(H,100)-lowest(L,100))*0.2 Then
Sell("s",AtStop,highest(H,100)-(highest(H,100)-lowest(L,100))*0.2);
if MarketPosition == 1 Then
ExitShort("sx",AtLimit,lowest(H,100));
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
즐거운 하루되세요
> 푸른 님이 쓴 글입니다.
> 제목 : 문의 드립니다
> input : StartTime(143000),EndTime(53000);
input : 익절틱수(0),손절틱수(0);
var : Tcond(False),entry(0);
Variables: Mom(0);
Var : N1(0),dayPl(0),당일수익(400),당일손실(100),Xcond(false);
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;
}
var1 = ma(C,1);
Var2 = ma(C,5);
if Tcond == true Then
{
if L ==lowest(L,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 and var1 >= Var2 Then
{
Buy("b",AtStop,(highest(H,2)+lowest(L,2))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 8 Then
ExitShort();
}
if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 and var1 <= Var2 Then
{
Sell("s",AtStop,(lowest(L,2)+highest(H,2))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 8 Then
ExitLong();
{
if L ==lowest(L,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 and var1 >= Var2 Then
{
Buy("b1",AtStop,(highest(H,2)+lowest(L,2))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 8 Then
ExitShort();
}
if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 and var1 <= Var2 Then
{
Sell("s1",AtStop,(lowest(L,2)+highest(H,2))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 8 Then
ExitLong();
{
if L ==lowest(L,2) and highest(H,2) >= lowest(L,2)+PriceScale*1 and var1 >= Var2 Then
{
Buy("b2",AtStop,(highest(H,2)+lowest(L,2))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 8 Then
ExitShort();
}
if H == highest(H,2) and lowest(L,2) <= highest(H,2)+PriceScale*1 and var1 <= Var2 Then
{
Sell("s2",AtStop,(lowest(L,2)+highest(H,2))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 8 Then
ExitLong();
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
위 수식어는
1,5 이동평균선 역배열에 매수 진입금지
1,5 이동평균선 정배열에 매도 진입금지 입니다.
수식어 변경 사안은 아래입니다.
1,5 이동평균선 역배열에 매도신호후 1,5 이동평균선 골든코로스에 손절
1,5 이동평균선 정배열에 매수신호후 1,5 이동평균선 데드크로스에 손절
--------------------------
수식어 추가입니다.
1.
매매시간 10:00~ 익일05:00
캔들 100개 고점 저점의 50% 매수후 해당된 캔들 100개의 고점에 청산
캔들 100개 고점 저점의 50% 매도후 해당된 캔들 100개의 저점에 청산
2.
매매시간 10:00~ 익일05:00
캔들 100개 고점 저점의 아래 20% 매수후 해당된 캔들 100개의 고점에 청산
캔들 100개 고점 저점의 위 20% 매도후 해당된 캔들 100개의 저점에 청산