답변완료
수고하십니다.
중최고가=최고값(고가,20);
중최저가=최저값(저가,20);
경계=(중최고가+중최저가)/2-(중최고가-중최저가)*배분1;
경계1=crossup(종가, 경계)&& 종가>시가*배분2;
경계2=crossdown(c, 경계);
기준봉=valuewhen(1, 경계1 or 경계2, 시가);
기준봉1=crossup(종가, 기준봉);
기준봉2=crossdown(종가, 기준봉);
결과기준=valuewhen(1, 기준봉1 or 기준봉2, 시가);
결과기준1=crossup(종가, 결과기준);
결과기준2=crossdown(종가, 결과기준);
valuewhen(1, 결과기준1 or 결과기준2, 시가)
배분1 0.236
배분2 1.02
BBandsUp(20,2)상단선이 위에선을 돌파한 종목을 부탁 합니다.
수식이 부족하면 코멘트 주십시요..
늘 감사드립니다.
2025-03-05
345
글번호 188800
종목검색
답변완료
수식 수정 의뢰 드립니다.
매매에 도움을 받고자 문의 드립니다.
아래는 ATR 관련 수식입니다. 혹시 시스템식이나 지표식으로 예스로 변환이 가능할까요?
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, S electedValue( ROC( C, 1 ) ) ));
SD = StochD(8, 3, 3);
MH = MACD(8, 21) - Signal(8, 21, 5);
trendup = IIf(MH > 0 OR (MH > 0 AND MH > Ref(MH, -1)) AND RSI(3) >50 AND SD < 80 AND SD > Ref(SD, -1) AND ValueWhen(C,O<C), colorBlue, colorWhite);
trendcolor = IIf(MH < 0 OR (MH < 0 AND MH < Ref(MH, -1)) AND RSI(3) <50 AND SD > 20 AND SD < Ref(SD, -1) AND ValueWhen(C,O>C), colorRed, trendup);
Plot( C, "Close", trendcolor, styleCandle | styleThick );
_SECTION_END();
no=Param( "Swing", 5, 1, 55 );
res=HHV(H,no);
sup=LLV(L,no);
tsl=IIf(ValueWhen(IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1,0))!=0,IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1,0)),1)==1,sup,res);
Plot(tsl, _DEFAULT_NAME(), colorBlue, styleStaircase);
Buy = Cross(C,res) ;
Sell = Cross(sup,C) ;
_SECTION_END();
a=C;
g=(EMA(Close,3) * (2 / 4 - 1)-EMA(Close,5) * (2 / 6 - 1)) / (2 /4- 2 /6);
e=Ref(tsl,-1);
Buy = Cross(C,tsl) ;
Sell = Cross(tsl,C) ;
SellPrice=ValueWhen(Sell,e,1);
BuyPrice=ValueWhen(Buy,e,1);
Long=Flip(Buy,Sell);
Shrt=Flip(Sell,Buy );
Filter=Buy OR Sell;
Buy = Cross(C,tsl) ;
Sell = Cross(tsl,C) ;
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ),0, IIf( Buy, Low, High ) );
a1=Ref(tsl,-1);
dist = 0.8*ATR(1); //0.8
dist1 = 1.8*ATR(1); //1.2
for( i = 0; i < BarCount; i++ )
{
if( Buy[i] )
{
PlotText( "Buy:" + L[ i ] + "₩nTgt: " + (a1[i]*1.005) + "₩nSL: " + (tsl[i]*0.9975), i, L[ i ]-dist[i], colorLime);
}
if( Sell[i] )
{
PlotText( "Sell:" + H[ i ] + "₩nT: " + (a1[i]*0.995) + "₩nSL: " + (tsl[i]*1.0025), i, H[ i ]+dist1[i], colorBlack);
}
}
2025-03-05
825
글번호 188785
시스템