답변완료
수식추가 부탁드립니다.
안녕하세요?
아래수식2가지에 간단한 수식추가 부탁드립니다.
[1]과 [2]모두 이동평균선 2개 추가(외부변수)
현재방식그대로이되, 정배열에서 매도, 역배열에서 매수가 되게끔 하고싶습니다.
감사합니다.
[1]
input : 매수기준선(0.05),매도기준선(0.05),n(5);
input : 익절틱수(50),손절틱수(50),진입횟수(3);
var : BB(0),SS(0),BI(0),BC(0),SI(0),SC(0),entry(0);
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;
BB = Floor(O)+0.05;
if O >= BB Then
BB = BB+1;
SS = Floor(O)+0.05;
if O <= SS Then
SS = SS-1;
if O < BB and C >= BB and C > O Then
{
BI = Index;
BC = C;
}
if O > SS and C <= SS and C < O Then
{
SI = Index;
SC = C;
}
if MarketPosition == 0 and BI > 0 and Index > BI and Index < BI+n and C > O and C == BC and entry < 진입횟수 Then
Buy();
if MarketPosition == 0 and SI > 0 and Index > SI and Index < SI+n and C < O and C == SC and entry < 진입횟수 Then
Sell();
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
[2]
input : n(5);
input : 익절틱수(50),손절틱수(50),진입횟수(3);
var : BB(0),SS(0),BI(0),BC(0),SI(0),SC(0),entry(0);
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 C > O then
{
var1 = C;
Var2 = var1[1];
Var3 = Index;
Var4 = Var3[1];
if MarketPosition == 0 and var1 == Var2 and Var3 <= Var4+n and entry < 진입횟수 Then
Buy();
}
if C < O then
{
var5 = C;
Var6 = var5[1];
Var7 = Index;
Var8 = Var7[1];
if MarketPosition == 0 and var5 == Var6 and Var7 <= Var8+n and entry < 진입횟수 Then
Sell();
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
2021-03-24
751
글번호 147384
시스템
답변완료
종목검색식 부탁할께요~
Input : Value(2.7), P1(36), P2(28), P3(5),StopPer(1);
Var: ChUp(0), ChDn(0), slowK(0), slowD(0), Bap(0);
setstoploss(StopPer);
ChUP = dayOpen()+(DayHigh(1)-DayLow(1))/Value;
ChDn = dayOpen()-(DayHigh(1)-DayLow(1))/Value;
slowK = stochasticsK(p1,p2);
slowD = stochasticsD(p1,p2,p3);
bap = (dayLow()+dayhigh())/2;
if CrossUp(slowK, slowD) then {var1 = C;var5 = 1;}
if CrossDown(slowK, slowD) then {var2 = C;var6 = 1;}
#buy/sell
if dayindex()==0 then {if H >= ChUP then buy(); if L <= ChDn then sell();
var5 = 0; var6 = 0;}
if C > (chUP+ChDn)/2 and accumN(iff(H>=ChUp,1,0),dayindex()+1)==0
and stime<143000 then buy("Buy",atstop,ChUP);
if C < (chUP+ChDn)/2 and accumN(iff(L<=ChDn,1,0),dayindex()+1)==0
&& stime<143000 then sell("Sell",atstop,ChDn);
#exitlong
if slowK < slowD and stime >=100000 and var6 == 1 then exitlong("EL1", atstop, var2-0.01);
if stime <= 100000 and marketposition(0)==1 then exitlong("EL2",atstop,L[dayindex()]);
if stime >=100000 and marketposition(0)==1 then
{exitlong("EL3",atstop,(dayOpen()+(ChUp))/2);exitlong("EL4",atstop,bap);}
if stime == 145000 then exitlong("EL5");
//exitshort
if slowK > slowD and stime >=100000 and var5 == 1 then
exitshort("ES1", atstop, var1+0.01);
if stime <= 100000 and marketposition(0)==-1 then
exitshort("ES2",atstop,H[dayindex()]);
if stime >= 100000 and marketposition(0)==-1 then
{ exitshort("ES3",atstop,(dayOpen()+(ChDn))/2);
exitshort("ES4",atstop,baP);}
if stime == 145000 then Exitshort("ES5");
2021-03-24
936
글번호 147381
종목검색
답변완료
수식 문의드립니다.
안녕하세요,수고많으십니다.
1.전월봉의 시가,고가,저가,종가를 나타내는 수식작성 부탁드립니다.
2.전년봉의 시가,고가,저가,종가를 나타내는 수식작성 부탁드립니다.
작성에 도움주심에 감사드립니다.환절기에 건강 유의하시고요,
2021-03-24
1115
글번호 147375
지표
답변완료
문의드립니다
매번 감사드립니다
아래식을 항셍장시작 한국시간 오전10시15분 기준 바꿔주세요
감사합니다
var : DH(0), DL(500); // DL:일중최고, DL:일중최고
DH=DayHigh(0);
DL=DayLow(0);
// 단기 피보나치 로그선그리기
plot1(DH,"일중 최고선");
plot2( 10^((LOG10(DH)-(LOG10(DH)-LOG10(DL))*0.236)),"단기 23.6선");
plot3( 10^((LOG10(DH)-(LOG10(DH)-LOG10(DL))*0.382)),"단기 38.2선");
plot4( 10^((LOG10(DH)-(LOG10(DH)-LOG10(DL))*0.500)),"단기 50선");
plot5( 10^((LOG10(DH)-(LOG10(DH)-LOG10(DL))*0.618)),"단기 61.8선");
plot6( 10^((LOG10(DH)-(LOG10(DH)-LOG10(DL))*0.764)),"단기 76.4선");
plot7(DL,"일중 최저선");
// MessageLog("요일 date[1] : % DayOfWeek(date[1]) : %",date[1],DayOfWeek(date[1]));
// MessageLog(" weeklyhigh : %,2f weeklylow: %,2f",DH,DL);
2021-03-24
1263
글번호 147369
지표
답변완료
문의드립니다.
1.피보나치되돌림비율선에 대한 것입니다.
250일중 최저가와 최고가 사이의 되돌림비율선 설정에 대한 요청입니다.
가. 상승추세인 경우의 표시문제
- 최저가 발생일이 최고가 발생일보다 빠른 경우의 표시방법은 최저가을 100%, 최고가를
0%로 하고, 100%(최저가), 76.4%, 61.8%, 50%, 38.2%, 23.6%, 0%(최고가),최고가 위로
38.2%, 76.4%의 선이 표시되게 수식 요청드리며 각 선들에 대한 색상표시를 변동시킬
수 있게 해주세요.
나. 하락추세인 경우의 표시문제
- 최저가 발생일이 최고가 발생일보다 늦은 경우의 표시방법은 최저가을 0%, 최고가를
100%로 하고, 100%(최고가), 76.4%, 61.8%, 50%, 38.2%, 23.6%, 0%(최저가),최저가
밑으로 -38.2%, -76.4%의 선이 표시되게 수식 요청드리며 각 선들에 대한 색상표시를
변동시킬 수 있게 해주세요.
2. 20일이평선이 상향추세이고, 주가와의 이격율이 50%이상으로 한번이상 발생된 경우에
20일이평선라인, 최고가라인, 이평선과 최고가라인의 중심라인을 표시할 수 있는
지표수식을 부탁드립니다.
감사합니다.
2021-03-24
1261
글번호 147364
지표