답변완료
추가수정 요청...
잘 작동됩니다. 감사합니다. ^^
문제가 있는데요
*정해진 체크시간에 돌파 체크하고 만약 돌파 하지 않는다면 아래 정해진 시간에 강제 진입
위 상황인데 정해진 시간 전에 종료가 되면 또 한번 진입합니다.
만약 이평선 크로스로 진입하되 강제시간 전에 수익이 난다면 추가 진입을 안했으면 좋겠습니다.
감사합니다. ^^
-----------------------------------------------------------------------------------------------------
안녕하세요
예스스탁입니다.
input : position(1), P1(5),P2(20);
input : StartTime(220000),EndTime(223000),xtime(55800),vol1(1);
input : 최소수익틱수(100),수익감소틱수(10);
var : Tcond(false);
IF xtime > starttime Then
SetStopEndofday(xtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(xtime);
}
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 position == 1 Then
Buy("b2",OnClose,Def,vol1);
if MarketPosition == 0 and position == -1 Then
Sell("s2",OnClose,Def,vol1);
}
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
Tcond = true;
IF xtime <= starttime Then
{
SetStopEndofday(0);
}
}
var1 = ma(C,P1);
Var2 = ma(C,P2);
if Tcond == true Then
{
if MarketPosition == 0 and position == 1 and CrossUp(var1,Var2) Then
Buy("b1",OnClose,Def,vol1);
if MarketPosition == 0 and position == -1 and CrossDown(var1,Var2) Then
Sell("s1",OnClose,Def,vol1);
}
if MarketPosition == 1 and Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*최소수익틱수 Then
ExitLong("매수스탑x",AtStop,Highest(H,BarsSinceEntry)-PriceScale*수익감소틱수);
if MarketPosition == -1 and lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*최소수익틱수 Then
ExitShort("매도스턉x",AtStop,lowest(L,BarsSinceEntry)+PriceScale*수익감소틱수);
즐거운 하루되세요
> 스카스카 님이 쓴 글입니다.
> 제목 : 수정 요청드립니다. ^^ 감사합니다~
> 아래 수식을 사용하고 있습니다.
추가 내용을 요청드립니다. ^^ 감사합니다.
-----------------------------------------------------------------------------------------------------
포지션에 따라 (1 or -1) 매수/매도 진입을 하는데
이동평균선 돌파 후 진입 기능 (5일선 / 20일선)
*단 정해진 체크시간에 돌파 체크하고 만약 돌파 하지 않는다면 아래 정해진 시간에 강제 진입
[예시]
1. 매수의 경우 22시 부터 22시 30분까지 이동평균선 (5일선 20일선) 5일선이 20일선을 크로스하면 매수진입...
만약 크로스 안하면 22시 30분 강제 진입
매도의 경우 반대
** 5일선 10일선은 마음대로 (일수)수정이 가능했으면 좋겠습니다.
** 이동평균선 진입 시간도 수정이 가능하면 좋겠습니다.
요청 드립니다~ ^^
--------------------------------------------------------------------------------------------------------
input : position1(1),ntime1(223000),vol1(1);
input : xtime(55800);
input : 최소수익틱수(100),수익감소틱수(10);
var : ST(0);
if Bdate != Bdate[1] Then
{
ST = sTime;
}
if ST > 0 then
{
if (sdate != sdate[1] and stime >= ntime1) or
(sdate == sdate[1] and stime >= ntime1 and stime[1] < ntime1) Then
{
if position1 == 1 Then
Buy("매수-1",OnClose,DEf,vol1);
if position1 == -1 Then
Sell("매도-1",OnClose,DEf,vol1);
}
if MarketPosition == 1 and Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*최소수익틱수 Then
ExitLong("매수스탑x",AtStop,Highest(H,BarsSinceEntry)-PriceScale*수익감소틱수);
if MarketPosition == -1 and lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*최소수익틱수 Then
ExitShort("매도스턉x",AtStop,lowest(L,BarsSinceEntry)+PriceScale*수익감소틱수);
}
IF Xtime > ST Then
SetStopEndofday(Xtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Xtime);
}
if (sdate != sdate[1] and stime >= ST) or
(sdate == sdate[1] and stime >= ST and stime[1] < ST) Then
{
IF Xtime <= ST Then
{
SetStopEndofday(0);
}
}
2022-08-26
1367
글번호 161785
시스템
답변완료
78592번글 다시 확인 요청 드립니다
아래 방식으로좀 부탁 드립니다 점찍기
* Tx01 = Text_New(sdate,stime,H,"●");
Text_SetStyle(Tx01,2,2);
Text_SetColor(Tx01,RED );
Text_SetSize(Tx01,20);
78592 글
안녕하세요
예스스탁입니다.
Input : Period(9);
Var : CCIv(0),LC(0),HC(0),T(0),S(0);
CCIv = CCI(Period);
If CCIv > 100 Then
T = 1;
else If CCIv < -100 Then
T = -1;
Else
T = 0;
if T != T[1] Then
{
if T == 1 Then
plot1(H,"검색",Magenta);
if T == -1 Then
plot1(L,"검색",Cyan);
}
즐거운 하루되세요
> 요타 님이 쓴 글입니다.
> 제목 : 점찍기 좀 부탁 드립니다.
>
* 좋은 주말 되십시요.
아래 매매식에서 지펴 로 점찍기 좀 부탁 드립니다.
* cci 과매도/ 과매수 되면 점찍히게 부탁 드립니다.
## 아래 식
Input : Period(9);
Var : CCIv(0),LC(0),HC(0),T(0),S(0);
CCIv = CCI(Period);
If CCIv > 100 Then
T = 1;
else If CCIv < -100 Then
T = -1;
Else
T = 0;
if T == 1 Then
{
if T != T[1] Then
{
S = 0;
LC = C;
}
if C < LC Then
LC = C;
if MarketPosition == 0 and C < O Then
{
S = S+1;
if S == 1 Then
Sell("s");
}
}
if MarketPosition == 0 and IsEntryName("s") == true and L > LC Then
Sell("ss",AtStop,LC);
if MarketPosition == -1 Then
ExitShort("sx",AtStop,DayHigh(1));
if T == -1 Then
{
if T != T[1] Then
{
S = 0;
HC = C;
}
if C > HC Then
HC = C;
if MarketPosition == 0 and C > O Then
{
S = S+1;
if S == 1 Then
Buy("b");
}
}
if MarketPosition == 0 and MarketPosition(1) == 1 and
IsEntryName("b") == true and H < HC Then
Buy("bb",AtStop,HC);
if MarketPosition == 1 Then
ExitLong("bx",AtStop,DayLow(1));
* 좋은 주말 되십시요.
2022-08-26
1365
글번호 161778
지표