예스스탁
예스스탁 답변
2025-03-14 13:46:12
안녕하세요
예스스탁입니다.
input : ShortPeriod(20), LongPeriod(38);
input : StartTime(140000),EndTime(40000);
var : Tcond(false);
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;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
var : wmaFast(0), wmaSlow(0), Trend(0);
wmaFast = wma(C, ShortPeriod);
wmaSlow = wma(C, LongPeriod);
if CrossUp(wmaFast, wmaSlow) Then
Trend = -1;
if CrossDown(wmaFast, wmaSlow) Then
Trend = 1;
if trend == 1 and trend != trend[1] Then
Buy();
if trend == -1 and trend != trend[1] Then
Sell();
SetStopLoss(30*PriceScale,PointStop);
if MarketPosition == 0 and MarketPosition(1) == 1 and IsExitName("StopLoss",1) == true Then
{
Sell("bs",AtStop,EntryPrice(1)-PriceScale*50);
}
if MarketPosition == 0 and MarketPosition(1) == -1 and IsExitName("StopLoss",1) == true Then
{
Buy("sb",AtStop,EntryPrice(1)+PriceScale*50);
}
즐거운 하루되세요
> 푸른 님이 쓴 글입니다.
> 제목 : 문의 드립니다
>
input : ShortPeriod(20), LongPeriod(38);
input : StartTime(140000),EndTime(40000);
var : Tcond(false);
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;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
var : wmaFast(0), wmaSlow(0), Trend(0);
wmaFast = wma(C, ShortPeriod);
wmaSlow = wma(C, LongPeriod);
if CrossUp(wmaFast, wmaSlow) Then
Trend = -1;
if CrossDown(wmaFast, wmaSlow) Then
Trend = 1;
if trend == 1 and trend != trend[1] Then
Buy();
if trend == -1 and trend != trend[1] Then
Sell();
위 수식어의 수정입니다.
Buy, Sell 진입신호후 -30틱에 손절 및 -50틱 반대 포지션 진입을 부탁드립니다.
input : StartTime(160000),EndTime(40000);
var : Tcond(false);
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;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
var : HH(0),LL(0),MM(0),t(0);
HH = DayHigh;
LL = DayLow;
MM = (HH+LL)/2;
if bdate != Bdate[1] Then
T = 0;
Else
{
if CrossUp(H,MM) Then
T = 1;
if CrossDown(L,MM) Then
T = -1;
if T == 1 and MarketPosition <= 0 Then
buy("bbb0",AtStop,LL+(HH-LL)*0.910);
if T == 1 and MarketPosition <= 0 Then
Sell("ss0",AtStop,LL+(HH-LL)*0.910);
if MarketPosition == 1 and MaxEntries == 1 Then
buy("b1",AtStop,LL+(HH-LL)*1.310);
if T == -1 and MarketPosition >= 0 Then
Sell("s0",AtStop,LL+(HH-LL)*0.600);
if MarketPosition == 1 and MaxEntries == 1 Then
Sell("s1",AtStop,LL+(HH-LL)*-0.300);
if T == 1 and MarketPosition <= 0 Then
buy("b2",AtStop,LL+(HH-LL)*0.680);
if MarketPosition == 1 and MaxEntries == 1 Then
buy("b3",AtStop,LL+(HH-LL)*0.750);
if T == -1 and MarketPosition >= 0 Then
buy("bb2",AtStop,LL+(HH-LL)*0.600);
if MarketPosition == 1 and MaxEntries == 1 Then
Sell("s3",AtStop,LL+(HH-LL)*-0.300);
if T == -1 and MarketPosition <= 0 Then
buy("b4",AtStop,LL+(HH-LL)*0.900);
if MarketPosition == 1 and MaxEntries == 1 Then
buy("b5",AtStop,LL+(HH-LL)*0.100);
if T == -1 and MarketPosition >= 0 Then
Sell("s4",AtStop,LL+(HH-LL)*0.600);
if MarketPosition == 1 and MaxEntries == 1 Then
Sell("s5",AtStop,LL+(HH-LL)*-0.300);
if T == 1 and MarketPosition <= 0 Then
buy("b6",AtStop,LL+(HH-LL)*0.680);
if MarketPosition == 1 and MaxEntries == 1 Then
buy("b7",AtStop,LL+(HH-LL)*0.750);
if T == -1 and MarketPosition >= 0 Then
Sell("s6",AtStop,LL+(HH-LL)*0.600);
if MarketPosition == 1 and MaxEntries == 1 Then
Sell("s7",AtStop,LL+(HH-LL)*-0.300);
if T == -1 and MarketPosition <= 0 Then
buy("b8",AtStop,LL+(HH-LL)*0.900);
if MarketPosition == 1 and MaxEntries == 1 Then
buy("b9",AtStop,LL+(HH-LL)*0.100);
if T == -1 and MarketPosition >= 0 Then
Sell("s8",AtStop,LL+(HH-LL)*0.600);
if MarketPosition == 1 and MaxEntries == 1 Then
Sell("s9",AtStop,LL+(HH-LL)*0.100);
}
SetStopLoss(200*PriceScale,PointStop);
if MarketPosition == 0 and MarketPosition(1) == 1 and IsExitName("StopLoss",1) == true Then
{
Sell("bs",AtStop,EntryPrice(1)-PriceScale*50);
}
if MarketPosition == 0 and MarketPosition(1) == -1 and IsExitName("StopLoss",1) == true Then
{
Buy("sb",AtStop,EntryPrice(1)+PriceScale*50);
}
> 푸른 님이 쓴 글입니다.
> 제목 : 문의 드립니다
>
input : ShortPeriod(20), LongPeriod(38);
input : StartTime(140000),EndTime(40000);
var : Tcond(false);
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;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
var : wmaFast(0), wmaSlow(0), Trend(0);
wmaFast = wma(C, ShortPeriod);
wmaSlow = wma(C, LongPeriod);
if CrossUp(wmaFast, wmaSlow) Then
Trend = -1;
if CrossDown(wmaFast, wmaSlow) Then
Trend = 1;
if trend == 1 and trend != trend[1] Then
Buy();
if trend == -1 and trend != trend[1] Then
Sell();
위 수식어의 수정입니다.
Buy, Sell 진입신호후 -30틱에 손절 및 -50틱 반대 포지션 진입을 부탁드립니다.