답변완료
매수청산 수식에서 추가 기능 부여 부탁드리겠습니다.
아래 수식에서 다음과 같은 기능을 부여부탁드림니다.
1번
매수진입된 상태에서 -100틱(변수설정) 하락한후 매수진입가격도달시 청산 하는 수식을 추가로 넣어주세요~~
if MarketPosition == 1 then
{
BuySetup = false;
if countif(CrossDown(CCIv,CCI값),BarsSinceEntry) >= 1 and
CCIv < CCI값 and C < O Then
ExitLong("매수cci청산"); # CCI청산
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*즉시익절1 and C < O Then
ExitLong("즉시익절1"); # 수익청산
if highest(H,BarsSinceEntry) >= (EntryPrice+PriceScale*즉시익절1*N2) Then
ExitLong("본전청산1",AtStop,EntryPrice+PriceScale*즉시익절1*N3); # 본전
Else
{
if L <= EntryPrice-PriceScale*즉시손절1 Then
ExitLong("즉시손절1",AtStop,L-PriceScale*저점손절틱수); # 손절
}
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*tr수익 Then
ExitLong("tr",AtStop, highest(H,BarsSinceEntry)-PriceScale*tr하락); # tr청산
}
===========================================================================
2번
매수진입된 상태에서 -100틱(변수설정) 하락한후 CCI값(기간20) > 200 이상 일때 청산 하는 수식을 추가로 넣어주세요~~
if MarketPosition == 1 then
{
BuySetup = false;
if countif(CrossDown(CCIv,CCI값),BarsSinceEntry) >= 1 and
CCIv < CCI값 and C < O Then
ExitLong("매수cci청산"); # CCI청산
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*즉시익절1 and C < O Then
ExitLong("즉시익절1"); # 수익청산
if highest(H,BarsSinceEntry) >= (EntryPrice+PriceScale*즉시익절1*N2) Then
ExitLong("본전청산1",AtStop,EntryPrice+PriceScale*즉시익절1*N3); # 본전
Else
{
if L <= EntryPrice-PriceScale*즉시손절1 Then
ExitLong("즉시손절1",AtStop,L-PriceScale*저점손절틱수); # 손절
}
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*tr수익 Then
ExitLong("tr",AtStop, highest(H,BarsSinceEntry)-PriceScale*tr하락); # tr청산
}
===========================================================================
2020-02-25
333
글번호 136275
시스템
답변완료
주석요청
안녕하세요?
아래 스크립트는 글번호 66149번에 답변 주신 내용입니다.
번거로우시겠지만 구체적이고 자세한 주석 요청드립니다.
언제나 감사드립니다.
input : N1(5),N2(10),X(10);
var : entry(0,data1);
var : H1(0,data1),L1(0,data1),H2(0,data2),L2(0,data2);
H1 = data1(highest(H,N1));
L1 = data1(Lowest(L,N1));
H2 = data2(highest(H,N2));
L2 = data2(Lowest(L,N2));
if (sdate != sdate[1] and stime >= 101500) or
(sdate == sdate[1] and stime >= 101500 and stime[1] < 101500) Then
{
entry = 0;
}
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
entry = entry+1;
if stime >= 101500 and stime < 170000 then
{
if entry < X then
{
if MarketPosition <= 0 and data2(C > H2[1]) Then
buy("b",AtStop,H1+PriceScale);
if MarketPosition >= 0 and data2(C < L2[1]) Then
sell("s",AtStop,L1-PriceScale);
}
}
SetStopEndofday(170000);
2020-02-24
405
글번호 136268
시스템
답변완료
안녕하세요
averageprice = (((high[5]+low[5])/2)+((high[4]+low[4])/2)+((high[3]+low[3])/2)+((high[2]+low[2])/2)+((high[1]+low[1])/2)+((high[6]+low[6])/2))/6
if close > averageprice then
drawcandle(open,high,low,close) coloured(0,255,0)
endif
if close < averageprice then
drawcandle(open,high,low,close) coloured(255,0,0)
endif
return
--------------------------------------------------------------------------
macd1= exponentialaverage[8](close)-exponentialaverage[34](close)
signal1= average[34,1](macd1)
hist1= macd1-signal1
macd2= exponentialaverage[8](close)-exponentialaverage[55](close)
signal2= average[55,1](macd2)
hist2= macd2-signal2
return hist2 coloured(0,128,0) style(histogram),hist1 coloured(218,165,32) style(histogram)
------------------------------------------------------------------------
예스수식으로 변환 문의드립니다. 감사합니다.
2020-02-24
481
글번호 136258
지표
답변완료
수식 확인 부탁합니다
수고하십니다.
아래 종목검색식으로 일정기간동안 계속 "0"위에 있는 종목을 검색하려고 하는데
어느 값에서는 되고, 어느 값에서는 검색이 안되네요..
검색이 안되는 값에서 지표를 확인해 보면 분명히 해당되는 종목이 있는데도요..
아래 수식 확인 좀 부탁드립니다.
수고하세요
*************종목검색식
input : period(3),period1(20), period2(10) ;
var : Counter(0), Lowval(0), Highval(0), DownVel(0),UpVel(0), DnAroon(0),UpAroon(0),AroonOsc(0) ;
Lowval= Lowest(Low, Period+1);
Highval = Highest(High, Period+1);
For counter= 0 To Period {
If Low[counter] == Lowval Then
DownVel = counter;
If High[counter] == highval Then
UpVel = counter;
}
UpAroon = 100*(Period-UpVel)/Period;
DnAroon = 100*(Period-DownVel)/Period;
AroonOsc = upAroon - dnAroon;
if countif(AroonOSC>0,period1)>=period2 then
var1 = 1 ;
else var1 = 0 ;
Find(var1);
2020-02-23
471
글번호 136249
종목검색
답변완료
문의 드립니다
수고하십니다.
아래 식의 경우 시스템식과 지표식은 동일한데..
그 밑의 동일한 로직의 종목검색식에서는
시스템식에서 신호가 나온 종목이 검색되지 않는 경우가 왕왕 있는데 그 이유가 뭔가요...?
혹 N일전 종목검색 로직이 이상있는건지요..?
확인 좀 부탁드립니다.
수고하세요
*****시스템식
input : Period(3);
var : Counter(0), Lowval(0), Highval(0), DownVel(0),UpVel(0), DnAroon(0),UpAroon(0) ;
Lowval= Lowest(Low, Period+1);
Highval = Highest(High, Period+1);
For counter= 0 To Period {
If Low[counter] == Lowval Then
DownVel = counter;
If High[counter] == highval Then
UpVel = counter;
}
UpAroon = 100*(Period-UpVel)/Period;
DnAroon = 100*(Period-DownVel)/Period;
if crossup(UpAroon,DnAroon) Then
buy("B10S10");
if CrossDown(UpAroon,DnAroon) Then
sell("S10");
*****종목검색식
Input : Period(3);
input : N일전(3);
var : Counter(0), Lowval(0), Highval(0), DownVel(0),UpVel(0), DnAroon(0),UpAroon(0),AroonOsc(0) ;
Lowval= Lowest(Low, Period+1);
Highval = Highest(High, Period+1);
For counter= 0 To Period {
If Low[counter] == Lowval Then
DownVel = counter;
If High[counter] == highval Then
UpVel = counter;
}
UpAroon = 100*(Period-UpVel)/Period;
DnAroon = 100*(Period-DownVel)/Period;
if crossup(UpAroon[N일전],DnAroon[N일전]) Then
var1 = 1 ;
else var1 = 0 ;
Find(var1);
2020-02-23
415
글번호 136248
시스템
답변완료
수식문의드립니다
Crossup(DIPlus(Period), DIMinus(Period))and
if(DIPlus(5)>DIMinus(5), C>=SAR(0.02,0.2),!C>=SAR(0.02,0.2))
and MACD(short,long)>-20 and
A = (highest(high,shortPeriod)+lowest(low,shortPeriod))/2;
B = (highest(high,midPeriod)+lowest(low,midPeriod))/2;
Crossup(c, A) and CrossUp(c, B) and
c>eavg(c,30)
period 10
short 5
long 10
shortperiod 3
midperiod 26
====================
종목검색 할수 있게 부탁드립니다...감사합니다^^
2020-02-23
396
글번호 136247
종목검색