답변완료
문의 드립니다
input : StartTime(70000),EndTime(50000),진입횟수(2);
input : 익절틱수(0),손절틱수(0);
var : Tcond(False),entry(0),SE(0),BE(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;
BE = 0;
SE = 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
{
if entry < 1 Then
buy("b1",atlimit,dayhigh-PriceScale*250);
Else
{
if L > BE Then
buy("b2",atlimit,BE);
Else
buy("b3",AtStop,BE);
}
}
if MarketPosition == 1 Then
{
if BE == 0 Then
BE = EntryPrice;
exitlong("bx",atlimit,lowest(L,BarsSinceEntry)+PriceScale*500);
}
if MarketPosition >= 0 and entry < 진입횟수 Then
{
if entry < 1 Then
sell("s",atlimit,daylow+PriceScale*7000);
Else
{
if H < SE Then
Sell("s2",atlimit,SE);
Else
Sell("s3",AtStop,SE);
}
}
if MarketPosition == -1 Then
{
if SE == 0 Then
SE = EntryPrice;
ExitShort("sx",atlimit,Highest(H,BarsSinceEntry)-PriceScale*40);
}
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
게시판 84413 문의 내용인데요 .
1차 진입싯점에 2차도 진입이 되도록 부탁드렸는데 신호가 나오질 않습니다.
수정이 가능하지 문의 드립니다.
2023-11-07
853
글번호 173799
시스템
답변완료
문의 드립니다.
안녕하십니까 수고가 많으십니다.
키움수식을 변환시키고 종목을찾고 싶어 문의 드렸습니다.
첫번째 질문(최고가 이후 최저가)
지표수식 : 조건=Highest(H(1), period)<H;
LL=LowestSince(1, 조건(1), L)
변수값 : period : 240
이것을 변환시키고 선으로 나타내고 싶습니다.
-----------------
두번째 질문
지표수식 : B1 = valuewhen(1,(highest(h(1),Period) < highest(h,Period)),((highest(high,Period)+lowest(low,Period))/2));
A1=highest(H, Period) - (((highest(H, Period)-B1)/5)*5);
B2 = valuewhen(1,(highest(h(1),Period) < highest(h,Period)),((highest(high,Period)+lowest(low,Period))/2));
A2=highest(H, Period) - (((highest(H, Period)-B2)/5)*비율);
P = ((A1-A2)/2);
조건=Highest(H(1), period)<H;
LL=LowestSince(1, 조건(1), L);
HH=HighestSince(1, LL(1)>L , H);
LL+P+P;
변수값 : period : 240
비율 : 6.18
이것을 선으로 나타내고 싶습니다.
-----------------------------------
마지막 질문 세번째
지표수식 : B1 = valuewhen(1,(highest(h(1),Period) < highest(h,Period)),((highest(high,Period)+lowest(low,Period))/2));
A1=highest(H, Period) - (((highest(H, Period)-B1)/5)*5);
B2 = valuewhen(1,(highest(h(1),Period) < highest(h,Period)),((highest(high,Period)+lowest(low,Period))/2));
A2=highest(H, Period) - (((highest(H, Period)-B2)/5)*비율);
P = ((A1-A2)/2);
조건=Highest(H(1), period)<H;
LL=LowestSince(1, 조건(1), L);
HH=HighestSince(1, LL(1)>L , H);
LL-P-P;
Crossup(HH,LL+P+P);
valuewhen(1,Crossup(HH,LL+P+P),LL-P-P);
변수값 : period : 240
비율 : 6.18
선으로 나타내고
Crossdown(LL,valuewhen(1,Crossup(HH,LL+P+P),LL-P-P));
신호도 나타내고 싶습니다.
이 신호가만족하면 종목 검색도 하고 싶습니다.
마지막 질문은 3가지(선,신호,종목검색) 만들어 주실수 있나요??
부탁드리겠습니다.
2023-11-07
1030
글번호 173789
검색
답변완료
macd 시그널 박스
input : P(20);
input : short(48),long(104),sig(27),val(-0.075);
Var : macdv(0),macds(0),T(0),TL(0);
var1 = highest(H,P);
var2 = Lowest(L,P);
var3 = (var1+var2)/2;
if Var3 > Var3[1] Then
T = 1;
if Var3 <Var3 [1] Then
T = -1;
Plot1(Var3,"var3",IFF(T == 1,Red,Blue));
macdv = macd(short,long);
macds = ema(macdv,sig);
if macds <= -0.075 and T == 1 and T != T[1] Then
TL = TL_New(sDate,sTime,0,sDate,sTime,999);
TL_SetColor(TL,Red);
TL_SetSize(TL,0.5);
macd 시그널선이 -0.075 밑으로 내려가면 차트 상단에서 하단까지 box 시작.
-0.075 위로 올라오면 box 끝. 감사합니다.
2023-11-07
1072
글번호 173788
지표