예스스탁
예스스탁 답변
2023-10-25 12:02:50
안녕하세요
예스스탁입니다.
해당 내용은 처리가 가능하지 않습니다.
올리신 수식의 진입은 봉미완성시에 가격조건이 충족되면 즉시 신호가 발생하는 타입으로
다른 조건을 체크해서 신호를 제어할 수 없습니다.
즐거운 하루되세요
> 푸른 님이 쓴 글입니다.
> 제목 : 문의 드립니다
> input : StartTime(150000),EndTime(50000),midtime(210000);
input : 익절틱수1(800),손절틱수1(0);
input : 익절틱수2(160),손절틱수2(0);
var : Tcond(False),entry(0),T(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);
}
T = 1;
}
if (sdate != sdate[1] and stime >= midtime) or
(sdate == sdate[1] and stime >= midtime and stime[1] < midtime) Then
{
Tcond = False;
T = 2;
}
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
{
Tcond = False;
T = 0;
}
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 == 4 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 == 4 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 == 4 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 == 4 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 == 4 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 == 4 Then
ExitLong();
if T == 1 Then
{
SetStopProfittarget(PriceScale*익절틱수2,PointStop);
SetStopLoss(PriceScale*손절틱수2,PointStop);
}
Else
{
SetStopProfittarget(PriceScale*익절틱수1,PointStop);
SetStopLoss(PriceScale*손절틱수1,PointStop);
}
익절시 해당 캔들의 다음신호 진입금지의
수식어가 가능한지 문의 드립니다.
input : StartTime(150000),EndTime(50000),midtime(210000);
input : 익절틱수1(800),손절틱수1(0);
input : 익절틱수2(300),손절틱수2(0);
var : Tcond(False),entry(0),T(0),count(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;
count = 0;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
T = 1;
}
if (sdate != sdate[1] and stime >= midtime) or
(sdate == sdate[1] and stime >= midtime and stime[1] < midtime) Then
{
Tcond = False;
T = 2;
}
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
{
Tcond = False;
T = 0;
}
if TotalTrades > TotalTrades[1] and IsExitName("StopProfitTarget",1) == true Then
count = count+1;
if Tcond == true and count < 2 Then
{
if MarketPosition <= 0 and 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 == 4 Then
ExitLong();
if MarketPosition >= 0 and 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 == 4 Then
ExitShort();
if MarketPosition <= 0 and 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 == 4 Then
ExitLong();
if MarketPosition >= 0 and 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 == 4 Then
ExitShort();
if MarketPosition <= 0 and 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 == 4 Then
ExitLong();
if MarketPosition >= 0 and 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 == 4 Then
ExitShort();
}
if T == 1 Then
{
SetStopProfittarget(PriceScale*익절틱수2,PointStop);
SetStopLoss(PriceScale*손절틱수2,PointStop);
}
Else
{
SetStopProfittarget(PriceScale*익절틱수1,PointStop);
SetStopLoss(PriceScale*손절틱수1,PointStop);
}
--------
> 푸른 님이 쓴 글입니다.
> 제목 : 문의 드립니다
> input : StartTime(150000),EndTime(50000),midtime(210000);
input : 익절틱수1(800),손절틱수1(0);
input : 익절틱수2(160),손절틱수2(0);
var : Tcond(False),entry(0),T(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);
}
T = 1;
}
if (sdate != sdate[1] and stime >= midtime) or
(sdate == sdate[1] and stime >= midtime and stime[1] < midtime) Then
{
Tcond = False;
T = 2;
}
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
{
Tcond = False;
T = 0;
}
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 == 4 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 == 4 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 == 4 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 == 4 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 == 4 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 == 4 Then
ExitLong();
if T == 1 Then
{
SetStopProfittarget(PriceScale*익절틱수2,PointStop);
SetStopLoss(PriceScale*손절틱수2,PointStop);
}
Else
{
SetStopProfittarget(PriceScale*익절틱수1,PointStop);
SetStopLoss(PriceScale*손절틱수1,PointStop);
}
익절시 해당 캔들의 다음신호 진입금지의
수식어가 가능한지 문의 드립니다.