예스스탁
예스스탁 답변
2023-11-03 10:01:34
안녕하세요
예스스탁입니다.
input : StartTime(70000),EndTime(50000),진입횟수(1);
input : 익절틱수(0),손절틱수(0);
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 >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
Tcond = true;
entry = 0;
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 (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if Tcond == true Then
{
if MarketPosition <= 0 and entry < 진입횟수 Then
buy("b",atlimit,dayhigh-PriceScale*250);
if MarketPosition == 1 Then
exitlong("bx",atlimit,lowest(L,BarsSinceEntry)+PriceScale*500);
if MarketPosition >= 0 and entry < 진입횟수 Then
sell("s",atlimit,daylow+PriceScale*7000);
if MarketPosition == -1 Then
ExitShort("sx",atlimit,Highest(H,BarsSinceEntry)-PriceScale*40);
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
즐거운 하루되세요
> 푸른 님이 쓴 글입니다.
> 제목 : 문의 드립니다.
> input : StartTime(70000),EndTime(50000);
input : 익절틱수(0),손절틱수(0);
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 >= 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 MarketPosition <= 0 Then
buy("b",atlimit,dayhigh-PriceScale*250);
if MarketPosition == 1 Then
exitlong("bx",atlimit,lowest(L,BarsSinceEntry)+PriceScale*500);
if MarketPosition >= 0 Then
sell("s",atlimit,daylow+PriceScale*7000);
if MarketPosition == -1 Then
ExitShort("sx",atlimit,Highest(H,BarsSinceEntry)-PriceScale*40);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
--------------------------------------------------
StartTime(70000),EndTime(50000); 옆 특정 시간에 진입후 청산 1회를 변경 부탁드립니다