답변완료
문의 드립니다!
안녕하세요!
아래수식에서 "plot1"과 "plot2"가 "캔들"과 만났을때 각각 세로선과 알람신호가 발생토록 수정 부탁드립니다
* 세로선의 두께와 색상은 사용자지정이 가능토록 부탁합니다
감사합니다!!
----------------------------------------------------
var : month(0),nday(0),week(0);
var :EX(false),HH(0),LL(0),OO(0),CC(0),DD(0);
var : HH1(0),LL1(0),OO1(0);
var : HH2(0),LL2(0),OO2(0);
month = int(date/100)-int(date/10000)*100;
nday = date - int(date/100)*100;
week = DayOfWeek(date);
#선물만기
#if Month%3 == 0 and nday >= 8 and nday <= 14 and week == 4 then
if nday >= 8 and nday <= 14 and week == 4 then#옵션만기
EX = true;
Else
EX = false;
if EX == false and EX[1] == true Then
{
Condition1 = true;
DD = sDate;
HH = H;
LL = L;
OO = O;
CC = C;
HH1 = HH[1];
LL1 = LL[1];
OO1 = OO[1];
HH2 = HH1[1];
LL2 = LL1[1];
OO2 = OO1[1];
Var41 = Var4[1];
}
if Condition1 == true then
{
if H > HH Then
HH = H;
if L < LL Then
LL = L;
var1 = HH;
var2 = LL;
var3 = var1-var2;
if HH1 > 0 and LL1 > 0 Then
{
plot1(LL1+(HH1-LL1)*0.000,"하단선");
plot2(LL1+(HH1-LL1)*1.000,"상단선");
plot3(LL1+(HH1-LL1)*0.000,"하단선2");
plot4(LL1+(HH1-LL1)*1.000,"상단선2");
plot5(LL1+(HH1-LL1)*0.500,"중심선");
}
if sDate == DD Then
{
Var4 = DayOpen;
Var5 = DayHigh;
Var6 = DayLow;
}
if Var41 > 0 Then
Plot6(Var41,"첫날시가",IFf(oo1 < DayOpen(0) ,MAGENTA,MAGENTA));
if HH2 > 0 and LL2 > 0 Then
{
Plot7(HH2,"전전월물최고");
Plot8(LL2,"전전월물최저");
}
}
2023-09-05
732
글번호 172178
지표
답변완료
이 지표를 종목 검색으로 바꿔 주세요.
input :src(close),i_fastEMA(12),i_slowEMA(25),i_defEMA(25),i_bothEMAs(true);
var : ok(0),countBuy(0),countSell(0);
var : v_fastEMA(0),v_slowEMA(0),v_biasEMA(0),emaColor(0);
var : buycond(False),Sellcond(False);
var : buysignal(False),Sellsignal(False);
var : bull(False),bear(False),tx(0);
v_fastEMA = ema(src, i_fastEMA);
v_slowEMA = ema(src, i_slowEMA);
v_biasEMA = ema(src, i_defEMA);
emaColor = iff(v_fastEMA > v_slowEMA ,green , iff(v_fastEMA < v_slowEMA , red ,Orange));
// Colour the bars
buycond = v_fastEMA > v_slowEMA;
sellcond = v_fastEMA < v_slowEMA;
if buycond Then
{
countBuy = countBuy+1;
countSell = 0;
}
if sellcond Then
{
countSell = countSell+ 1;
countBuy = 0;
}
buysignal = countBuy < 2 and countBuy > 0 and countSell < 1 and buycond and buycond[1] == False;
sellsignal = countSell > 0 and countSell < 2 and countBuy < 1 and sellcond and sellcond[1] == False;
if buysignal Then
PlotPaintBar(h,l,"강조",Green);
if sellsignal Then
PlotPaintBar(h,l,"강조",red);
bull = countBuy > 1;
bear = countSell > 1;
if bull Then
PlotPaintBar(h,l,"강조",Green);
if bear Then
PlotPaintBar(h,l,"강조",red);
그린 매수 신호 나올 때 종목 검색 되도록 해주세요.
2023-09-05
769
글번호 172176
종목검색
답변완료
지표수식을 부탁드립니다
1. ATR지표수식을 만들어주세요
2. avg(C,기간)+(ATR(20)*피보율) //기간 10, 피보율 2.618
avg(C,기간)-(ATR(20)*피보율)
3. M=( avg(max(max(H-L,abs(C(1)-H)),abs(C(1)-L)),단기,1)/C(1)*100+
avg(max(max(H-L,abs(C(1)-H)),abs(C(1)-L)),장기,1)/C(1)*100 ) / 2; //단기5, 장기20
A= M * 배수 ; //배수3
지표B=avg(C,기간)+avg(C,기간)*A/100; //기간12
지표D=avg(C,기간)-avg(C,기간)*A/100;
각각의 지표수식을 부탁드립니다
추가적으로 이평선의 기울기나 각도를 비교할 수 있는
수식도 부탁드립니다
2023-09-05
935
글번호 172175
지표
답변완료
문의 드립니다
1.
input : StartTime(150000),EndTime(50000),진입횟수(10);
input : 익절틱수(250),손절틱수(50);
Input : 당일수익틱수(850),당일손실틱수(100);
Input:Length(1),Pval(0.01);
var : Tcond(False),entry(0);
Variables: Mom(0);
Var : N1(0),dayPl(0),당일수익(0),당일손실(0),Xcond(false);
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;
Xcond = false;
N1 = NetProfit;
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;
}
당일수익 = PriceScale*당일수익틱수;
당일손실 = PriceScale*당일손실틱수;
daypl = NetProfit-N1;
if TotalTrades > TotalTrades[1] then
{
if daypl >= 당일수익 or daypl <= -당일손실 Then
Xcond = true;
if (IsExitName("dbp",1) == true or IsExitName("dbl",1) == true ) then
Xcond = true;
}
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
Buy("CBI_LE",AtStop,Highest(High,Length)+Pval);
ExitLong("CBI_SE",AtStop,Lowest(Low,Length)-Pval);
if MarketPosition == 1 then
{
ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts));
ExitLong("dbl",AtStop,EntryPrice-((당일손실+daypl)/CurrentContracts));
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
2.
input : StartTime(150000),EndTime(50000),진입횟수(10);
input : 익절틱수(250),손절틱수(50);
Input : 당일수익틱수(850),당일손실틱수(100);
Input:Length(1),Pval(0.01);
var : Tcond(False),entry(0);
Variables: Mom(0);
Var : N1(0),dayPl(0),당일수익(0),당일손실(0),Xcond(false);
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;
Xcond = false;
N1 = NetProfit;
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;
}
당일수익 = PriceScale*당일수익틱수;
당일손실 = PriceScale*당일손실틱수;
daypl = NetProfit-N1;
if TotalTrades > TotalTrades[1] then
{
if daypl >= 당일수익 or daypl <= -당일손실 Then
Xcond = true;
if (IsExitName("dbp",1) == true or IsExitName("dbl",1) == true ) then
Xcond = true;
}
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
ExitShort("CBI_LE",AtStop,Highest(High,Length)+Pval);
Sell("CBI_SE",AtStop,Lowest(Low,Length)-Pval);
if MarketPosition == 1 then
{
ExitShort("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts));
ExitShort("dbl",AtStop,EntryPrice-((당일손실+daypl)/CurrentContracts));
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
위 수식어에서 진입없이 연속 손실이 8회의 데이터가 나올때
9회에서 18회까지 진입하는 수식어를 추가할 수 있는지요 ?
-----------------
해외선물 매매에서 3봉이내 저점, 고점의 최소 가격변화가 40틱일때
그 중간인 20틱에 매수나 매도후 5봉 완성에 청산하는 수식어를 부탁드립니다.
매매시간은 21:00~ 05:00 이고 익절 100틱 손절 100틱 입니다
2023-09-06
943
글번호 172166
시스템