답변완료
수정좀 부탁드립니다
늘 감사합니다.
아래 수식은 지금도 잘 사용하고 있습니다.
그런데 항셍에서는 10시 15분에 시작이라 시가는 10시 15분 부터가 맞는데
30분 단위의 아래수식에서 45분에 변경이 됩니다.
즉 항셍만 10시 30분, 11시등으로 30분 단위로 변경 부탁드립니다.
input : ntime1(30),ntime2(60);
var : S1(0),D1(0),TM(0),TF1(0),TF2(0),O1(0),O2(0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF1 = TM%ntime1;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime1 > 1 and TF1 < TF1[1]) or
(Bdate == Bdate[1] and ntime1 > 1 and TM >= TM[1]+ntime1) or
(Bdate == Bdate[1] and ntime1 == 1 and TM > TM[1]) Then
{
O1 = O;
}
Plot1(O1,"30분봉시가");
Plot2(C,"30분봉종가");
TF2 = TM%ntime2;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime2 > 1 and TF2 < TF2[1]) or
(Bdate == Bdate[1] and ntime2 > 1 and TM >= TM[1]+ntime2) or
(Bdate == Bdate[1] and ntime2 == 1 and TM > TM[1]) Then
{
O2 = O;
}
Plot3(O2,"60분봉시가");
Plot4(C,"60분봉종가");
}
Plot5(DayOpen," 일봉시가");
Plot6(C,"일봉종가");
2021-06-23
1097
글번호 150199
지표
답변완료
수식확인
지금 사용하고 있는 수식에서 대략 하루정도 매집되는 물량은 매도신호시 전부 매도가 되는데, 2~3일이나 여러번 매수한 물량에 대해서는 일부만 매도가 되고 나머진 매도가 안되는 현상이 생깁니다. 수식문제인지 셋팅문제인지 알수가 없어서.. 확인좀 부탁드립니다.
Input : 투자금액(20000000),RSIP(14), P1(5), P2(25), P3(100), 시작일(20210618),시작시간(090000),청산시간(153000);
var : value(0),e(0),x(0),count(0),Vma(0), Tcond(false);
var : Rsiv(0),vv(0), Entry(0), mav1(0);
var1 = ma(C,p1);
var2 = ma(C,p2);
var3 = ma(C,p3);
var4 = sar(0.02,0.2);
mav1 = ma(C,30);
Rsiv = RSI(RSIP);
if NextBarSdate >= 시작일 and NextBarStime >= 시작시간 Then
Tcond = true;
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
count = count+1;
if sdate >= 시작일 and stime >= 시작시간 Then
Tcond = true;
if Tcond == true then
{
if crossup(c,var4) Then
Entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if MarketPosition == 0 and Entry < 1 and CrossUp(var1,var2) and C > var4 Then
buy("b1",OnClose,DEF,Floor((투자금액*0.05)/c));
if MarketPosition == 1 and Entry < 1 and CrossUp(var1,var2) and Rsiv < 70 and C > var4 and MaxEntries == 1 Then
buy("b2",atlimit,LatestEntryPrice(0)*0.99,Floor((투자금액*0.07)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and CrossUp(var1,var2) and Rsiv < 70 and C > var4 and MaxEntries == 2 Then
buy("b3",atlimit,LatestEntryPrice(0)*0.99,Floor((투자금액*0.08)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and CrossDown(Rsiv, 30) and MaxEntries == 3 Then
buy("b4",atlimit,LatestEntryPrice(0)*0.99,Floor((투자금액*0.08)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and CrossDown(Rsiv, 30) and MaxEntries == 4 Then
buy("b5",atlimit,LatestEntryPrice(0)*0.99,Floor((투자금액*0.10)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and CrossDown(Rsiv, 30) and MaxEntries == 5 Then
buy("b6",atlimit,LatestEntryPrice(0)*1.00,Floor((투자금액*0.10)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and Crossup(Rsiv, 30) and MaxEntries == 6 Then
buy("b7",atlimit,LatestEntryPrice(0)*1.00,Floor((투자금액*0.12)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and Crossup(Rsiv, 30) and MaxEntries == 7 Then
buy("b8",atlimit,LatestEntryPrice(0)*1.00,Floor((투자금액*0.12)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and Crossup(Rsiv, 30) and MaxEntries == 8 Then
buy("b9",atlimit,LatestEntryPrice(0)*1.00,Floor((투자금액*0.14)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and Crossup(Rsiv, 30) and MaxEntries == 9 Then
buy("b10",atlimit,LatestEntryPrice(0)*1.00,Floor((투자금액*0.14)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and
highest(l,BarsSinceEntry) >= EntryPrice*1.10 Then
ExitLong("bx");
if MarketPosition == 1 and
Rsiv > 80 Then
ExitLong("br");
if MarketPosition == 1 and Rsiv > 65 and var1 > var2 and var2 > var3 and C < var4 Then
exitlong("s");
}
2021-06-23
1135
글번호 150186
시스템
답변완료
문의합니다
수고 많으십니다
아래 지표식 중 해당지표 신호발생시 해당봉이 끝날때까지 계속 신호음이 울리는데
한번 또는 정해진 횟수만큼만 울리도록 설절할수 있나요?
감사합니다~
tx = Text_New(sdate,sTime,L,"▲"+NewLine+"▲");
Text_SetColor(tx,RED);
Text_SetStyle(tx,2,0);
PlaySound("C:₩예스트레이더₩data₩Sound₩alert.wav");
}
{
tx = Text_New(sdate,sTime,H,"▼"+NewLine+"▼");
Text_SetColor(tx,BLUE);
Text_SetStyle(tx,2,1);
PlaySound("C:₩예스트레이더₩data₩Sound₩alert.wav");
}
2021-06-22
1412
글번호 150184
지표
답변완료
문의
input : Period1(5),P1(10),Period3(20);
var : LT(0),HT(0),newH(0),newL(0),T(0),Z(false),SL(0);
var : t1(0),x(0),highestsince(0),y(0),lowestsince(0);
LT = lowest(L,P1);
HT = highest(H,P1);
if H > HT[1] Then
newH = H;
if L < LT[1] Then
newL = l;
T = ma(c,period3);
Z = (NewL==low[1]&&NewL<low) or (NewH== high[1] && NewH>high);
if Z == true Then
SL = T;
SL = valuewhen(1,Z,T);
if SL != SL[1] Then
var1 = T;
t1 = ma(c,period1);
if CrossUp(C,t1) Then
highestsince = t1;
if highestsince > 0 and t1 > highestsince Then
highestsince = t1;
if CrossDown(C,t1) Then
lowestsince = t1;
if lowestsince > 0 and t1 < lowestsince Then
lowestsince = t1;
if CrossDown(c,t1) Then
Var2 = highestsince;
if CrossUp(c,t1) Then
Var3 = lowestsince;
if var1 > 0 Then
Plot1(var1,"수식1");
if var2 > 0 Then
Plot2(var2,"수식2");
if var3 > 0 Then
Plot3(var3,"수식3");
선언되지 않는 valuewhen이 있다고 나와서 수정부탁드립니다
2021-06-22
1338
글번호 150183
지표