예스스탁
예스스탁 답변
2022-06-20 10:10:36
안녕하세요
예스스탁입니다.
1
썸머타임 여부에 따라 진입과 청산시간이 변경되어야 합니다.
썸머타입은 7시, 아니면 8시를 기준이 되게 작성해 드립니다.
2
당일청산은 거래시간 안으로 지정되어야 합니다.
6시이면 장종료시간이므로
썸머타임은 5시50분, 아니면 6시50분에 청산하게 작성해 드립니다.
3
input : 익절틱수(100),손절틱수(15);
var : DD(0),Year(0),V1(0),V2(0),V3(0),V4(0),summer(False);
var : ST(0),ET(0),entry(0);
if NextBarSdate != sDate Then
{
DD = DayOfWeek(NextBarSdate);
Year = Floor(NextBarSdate/10000);
V1 = (10000 * Year) + (100 * 3) + 1;
V2 = 15 - dayofweek(v1);
v3 = (10000 * Year) + (100 * 11) + 1;
v4 = 8 - dayofweek(v3);
Summer = NextBarSdate > (10000 * Year) + (100 * 3) + v2
And NextBarSdate < (10000 * Year) + (100 * 11) + v4;
if summer == true Then
{
ST = 70000;
ET = 55000;
}
Else
{
ST = 80000;
ET = 65000;
}
}
if Year > 0 Then
{
IF ET > ST Then
SetStopEndofday(ET);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(ET);
}
if Bdate != Bdate[1] Then
{
entry = 0;
}
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if ((NextBarSdate != sDate and NextBarStime >= ST) or
(NextBarSdate == sDate and NextBarStime >= ST and sTime < ST)) Then
{
IF ET <= ST Then
{
SetStopEndofday(0);
}
if NextBarOpen < C Then
Buy("b1",AtStop,NextBarOpen+PriceScale*1);
if NextBarOpen > C Then
Sell("s1",AtStop,NextBarOpen-PriceScale*1);
}
Else
{
if DayHigh < DayOpen+PriceScale*1 and DayOpen < DayClose(1) and entry < 1 Then
Buy("b2",AtStop,DayOpen+PriceScale*1);
if DayLow > DayOpen-PriceScale*1 and DayOpen > DayClose(1) and entry < 1 Then
Sell("s2",AtStop,DayOpen-PriceScale*1);
}
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
즐거운 하루되세요
> 푸른 님이 쓴 글입니다.
> 제목 : 문의 드립니다.
> input : 익절틱수(100),손절틱수(15);
if NextBarSdate != sDate Then
{
if NextBarOpen < C Then
Buy("b",AtStop,NextBarOpen+PriceScale*1);
if NextBarOpen > C Then
Sell("s",AtStop,NextBarOpen-PriceScale*1);
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
--------------------
일봉매매 수식어를 하루 분봉 매매로 변경하고자 합니다.
1. 진입청산 1회
2. 0시기준 진입신호 없는 해외선물 분봉 매매
3. 매매시간은 07시~ 익일 06시
4. 익절이 되지않는경우 06시에 전량 청산
5. 전일종가에서 갭상 당일 시가 + 1틱 바이 , -1틱 셀 진입신호후
각각 익절 100틱 손절 15틱