답변완료
키움 지표을 변환 하려고 함니다(부탁드림니다)
a=shift(close,-midPeriod+1);
b=TEMA(c,Period);
valuewhen(1,crossup(A,B),A)
period 12
midperiod 26
2021-11-11
730
글번호 153532
지표
답변완료
문의드립니다
안녕하세요?
아래수식에서 푸른색원의 크기를 예를들어 두배 더크게 하거나 반으로줄이는등 크기를 조정하려면 어느수치를 대입하여보아야하는지 알려주세요
감사합니다
if var1 >= 0 and Trnd == dntr and Trnd != Trnd[1] then{
var1 = -1;
value1 = hival[1];
TL2 = Text_New(sdate[hibar[1]],stime[hibar[1]],value1+PriceScale*2,"●");
TL_SetColor(TL,BLUE);
TL_SetSize(TL,2);
Text_SetStyle(TL2,2,2);#텍스트 좌우 상하 정렬
Text_SetColor(TL2,BLUE);#텍스트 색상
TL= Text_New(sdate[hibar[1]],stime[hibar[1]],H,"하락");
Text_SetColor(TL,BLUE);#텍스트 색상
TL13 = TL_New(date11,time11,Value11,date12,time12,Value11);
TL14 = TL_New(date12,time12,Value11,date12,time12,Value12);
TL_SetColor(TL13,color);
TL_SetColor(TL14,color);
}
2021-11-11
966
글번호 153526
지표
답변완료
수식수정
아래수식중 분활매수 수식수정좀부탁드립니다 평단2퍼떨어질때마다고정금액1만원추가매수10번 평단5프로떨어질때마다2만원고정10번 평단10프로떨어질때마다3만원고정10번 1만원10번 끝나면2만원10번 끝나면3만원10번 이런식으로 순차적으로 매수되게 가능하면수정좀부탁드립니다 그리고매도수식은 평단2퍼상승시전액매도 각포지션 2퍼상승시 분활매도 요거2개남겨주시고 나머진 없애주세요 궁금한게잇는데 코인에서수식돌리는중인데 추가매수는수식상으로20번으로제한되잇나요?아니면 무한으로계속들어갈수잇나요?아래수식상으론 추가매수횟수를늘려도20번정도박에안들어가는거같던데 시물레이션돌려밧는데 어느시점밑으론추가매수되는게안나오던데 추가매수횟수제한이잇는지궁금합니다
input : Period(20),금액(10000);
var1 = Disparity(Period);
if MarketPosition == 0 and CountIf(C<O and var1 <= 97,3) == 3 Then
Buy("b",OnClose,DEF,금액/C);
if MarketPosition == 1 and MaxEntries < 10 Then
{
Buy("bb",AtLimit,AvgEntryPrice*0.98,(금액*(MaxEntries+1))/C);
if C > O Then
{
Var2 = Var2+1;
if Var2 == 3 Then
Var3 = L;
}
ExitLong("Bp",AtLimit,AvgEntryPrice*1.02);
if Var2 >= 3 and C < Var3 Then
ExitLong("bx1");
if CountIf(C>O and var1 >= 103,3) == 3 Then
ExitLong("bx2");
}
Else
{
var2 = 0;
}
SetStopProfittarget(2,PercentStop);
2021-11-10
739
글번호 153524
시스템
답변완료
문의 드립니다.~~~~
아래와 같이 답을 주셨는데
실행을 해 보니
의도대로 되지 않고
청산과 재진입이 과다 실행이 되어
다시 문의 드립니다,~~
1,진입은 추세 진입식으로
2,트레일링 추세익절청산과 동시에 재진입,
추세손절과 동시에 재진입으로 부탁드립니다.
정확한 수식을 위해
답변 주신 수식 위에 있는
변수와 시간조건식을 같이 올립니다.
input : 진입틱수(20);
input : 최소손실틱(0),손실감소틱(20);
input : StartTime1(70000),EndTime1(53000);
input : StartTime2(99999999),EndTime2(99999999);
input : StartTime3(99999999),EndTime3(99999999);
input : StartTime4(99999999),EndTime4(99999999);
var : Tcond(false);
var : OO(0),HH(0),LL(0);
if (sdate != sdate[1] and stime >= EndTime1) or
(sdate == sdate[1] and stime >= EndTime1 and stime[1] < EndTime1) Then
{
Tcond = False;
}
if (DayOfWeek(sDate) != 1 and sdate != sdate[1] and stime >= StartTime1) or
(sdate == sdate[1] and stime >= StartTime1 and stime[1] < StartTime1) Then
{
Tcond = true;
OO = O;
HH = H;
LL = L;
}
if (sdate != sdate[1] and stime >= EndTime2) or
(sdate == sdate[1] and stime >= EndTime2 and stime[1] < EndTime2) Then
{
Tcond = False;
}
if (DayOfWeek(sDate) != 1 and sdate != sdate[1] and stime >= StartTime2) or
(sdate == sdate[1] and stime >= StartTime2 and stime[1] < StartTime2) Then
{
Tcond = true;
OO = O;
HH = H;
LL = L;
}
if (sdate != sdate[1] and stime >= EndTime3) or
(sdate == sdate[1] and stime >= EndTime3 and stime[1] < EndTime3) Then
{
Tcond = False;
}
if (DayOfWeek(sDate) != 1 and sdate != sdate[1] and stime >= StartTime3) or
(sdate == sdate[1] and stime >= StartTime3 and stime[1] < StartTime3) Then
{
Tcond = true;
OO = O;
HH = H;
LL = L;
}
if (sdate != sdate[1] and stime >= EndTime4) or
(sdate == sdate[1] and stime >= EndTime4 and stime[1] < EndTime4) Then
{
Tcond = False;
}
if (DayOfWeek(sDate) != 1 and sdate != sdate[1] and stime >= StartTime4) or
(sdate == sdate[1] and stime >= StartTime4 and stime[1] < StartTime4) Then
{
Tcond = true;
OO = O;
HH = H;
LL = L;
}
if Tcond == true Then
{
if MarketPosition == 0 and OO > 0 and LL > OO-PriceScale*진입틱수 Then
Buy("시작매수",AtStop,LL+PriceScale*진입틱수);
if MarketPosition == 0 and OO > 0 and HH < OO+PriceScale*진입틱수 Then
Sell("시작매도",AtStop,HH-PriceScale*진입틱수);
}
if MarketPosition == 1 Then
{
if Tcond == true Then
Sell("Bl1",AtStop,EntryPrice-PriceScale*진입틱수);
Else
Exitlong("Bl2",AtLimit,EntryPrice-PriceScale*진입틱수);
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*최소손실틱 Then
{
if Tcond == true Then
Sell("sx1",AtLimit,highest(H,BarsSinceEntry)-PriceScale*손실감소틱);
Else
ExitLong("sx2",AtLimit,highest(H,BarsSinceEntry)-PriceScale*손실감소틱);
}
}
if MarketPosition == -1 Then
{
if Tcond == true Then
Buy("sl1",AtStop,EntryPrice+PriceScale*진입틱수);
Else
ExitShort("sl2",AtStop,EntryPrice+PriceScale*진입틱수);
if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*최소손실틱 Then
{
if Tcond == true Then
Buy("bx1",AtStop,lowest(L,BarsSinceEntry)+PriceScale*손실감소틱);
Else
ExitShort("bx2",AtLimit,Lowest(L,BarsSinceEntry)+PriceScale*손실감소틱);
}
}
2021-11-11
939
글번호 153523
시스템
답변완료
시스템식 문의 드립니다.
해당 식을 작성이후에 시뮬레이션을 돌려봤는데. 적용이 안되는 이유가
무엇인지 확인하고 싶습니다.
위 그림대로 고점 과 저점 라인을 정확히 변수로 넣었지만. 매수가 안됩니다.
그리고, 보시면 고점을 기준을 주가가 아래로 하락하다가 해당타점에서 매수를
해야 하는데, 매수는 커녕 아무런 반응이 없네요..ㅜ.ㅜ
마지막으로 하나 궁금한점은. 아래의 식을 사용하면,
제가 고점이라고 변수로 금액을 입력하게 되면, 해당 봉 이후에, 타점이 와서 매수가
되는지 궁금하네요..
제가 생각하는 매수 시점이 입력된 고점(그 봉 이후에) 주가가 하락하다가
작성 타점에서 매수하는것을 생각하면서 만든 식인데 제대로 작성하는지도 궁금합니다.
확인을 부탁드립니다.
해당 시스템식은 아래와 같습니다.
------------------------------------------------------------------
input : 고점(7000),저점(2000);
input : 투자금액(10000000);
var : entry(False),매수786(0),매수618(0),매수5(0),손절382(0),타점익절1(0),타점익절2(0);
매수786 = 저점+(고점-저점)*0.786;
매수618 = 저점+(고점-저점)*0.618;
매수5 = 저점+(고점-저점)*0.5;
손절382 = 저점+(고점-저점)*382;
타점익절1 = 매수618+(매수786-매수618)*0.66;
타점익절2 = 매수5+(매수618-매수5)*0.66;
if Bdate != Bdate[1] Then
entry = true;
if TotalTrades > TotalTrades[1] Then
entry = False;
if MarketPosition == 0 and entry == true Then
{
Buy("618매수",AtLimit,매수618,Floor(투자금액));
}
if MarketPosition == 1 and MaxEntries == 1 and IsEntryName("618매수") == true Then
{
Buy("5매수",AtLimit,매수5,Floor(투자금액));
}
if MarketPosition == 1 Then
{
if MaxEntries == 1 Then
{
ExitLong("1타점익절",AtLimit,타점익절1);
}
if MaxEntries == 2 Then
{
ExitLong("2타점익절",AtLimit,타점익절2);
}
ExitLong("382손절",AtStop,손절382);
}
-----------------------------------------------------------------------
2021-11-10
1074
글번호 153520
시스템
답변완료
문의 드립니다.
친절한 도움에 감사드립니다.
수식 사용 중에 의도한 것과 상이하여 문의 드립니다.
제가 확인하고 싶은 것은 현재 캔들이 현재 캔들 이전 1~N번째 캔들 중에 최고가를 돌파하면 현재캔들의 종가에 매수(단, 양봉에만).
최저가를 돌파하면 현재캔들의 종가에 매도(단, 음봉에만).
이 내용입니다.
아래 수식은 N을 5로 해서 해봤는데요.
세가지 상이한 점을 말씀드립니다.
1. 제 의도한 개념으로는 1번 음봉의 종가에 매도 신호가 나오고 진입하는 것이 맞는 거 같습니다. 이전 5개 캔들의 최저가를 돌파한 캔들이니까요.
그런데 그 다음 양봉캔들에서 매수로 진입하였습니다.
2. 3번 매수 진입은 왜 진입한 건지 이해가 안됩니다. 이전 캔들 5개의 최고가를 넘긴 것이 안닌데 말입니다. 오히려 앞에 2번째 음봉 캔들(2번)의 종가에 매도가 들어가는 것이 맞는데요. 이 부분도 확인 부탁드립니다.
3. 4번 매수 진입도 맞지 않습니다. 이전 5개 캔들의 최저가를 돌파했으니 매도 진입이 맞는데, 양봉이니 매도 진입하지 않아야 맞습니다.
확인 수정 부탁드립니다.
아래 수식 수정한 것 외에.....
* 신호가 나온 현재 캔들의 종가 진입인데, 다음봉에서 N틱이상 눌렀다가 신호나온 캔들의 종가를 돌파할 때 진입하는 수식, 추가로 부탁드립니다.
수식과 차트 이미지 같이 올려드립니다.
감사합니다.
input : n1(5);
input : StartTime(233000),EndTime(013000);
input : 익절틱수(80),손절틱수(0);
var : Tcond(false), T(0);
Array : H1[50](0),L1[50](0);
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
Tcond = False;
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
T = 0;
Tcond = true;
}
if Tcond == true Then
{
if C > H1[n1]+PriceScale*1 and C > O Then
Buy("b");
if C < L1[N1]-PriceScale*1 and C < O Then
Sell("s");
if MarketPosition == 1 Then
ExitLong("bx",AtStop,L[BarsSinceEntry]-PriceScale*1);
if MarketPosition == -1 Then
ExitShort("sx",AtStop,H[BarsSinceEntry]+PriceScale*1);
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
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
{
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
2021-11-10
1037
글번호 153518
시스템