답변완료
부탁 드립니다.
도움에 감사 드립니다.
1)아래 수식을 반대로
하락하다가 상승으로의 변곡이 나타 나도록
수정 부탁 드립니다.
2)아울러 수정한 수식을
타주기(분용)을
틱용으로도 수정 부탁 드립니다.
Input: Atime(11),p1(20);
Var: Cnt(0),HH(0),LL(0);
var : count(0),sum1(0),mav1(0),sum2(0),mav2(0),TF(0),S1(0),S2(0),T(0),TM(0);
Array: tp[100](0), upv[100](0),dnv[100](0);
Array : OO[100](0),CC[100](0);
if Bdate != Bdate[1] Then{
S1 = TimeToMinutes(stime);
T = 1;
}
if date != date[1] and Bdate == Bdate[1] Then{
S2 = 1440-S1;
T = 2;
}
if T == 1 then
TM = TimeToMinutes(stime)-S1;
if T == 2 Then
TM = TimeToMinutes(stime)+S2;
TF = TM%Atime;
if Bdate != bdate[1] or (TF < TF[1] and Bdate == Bdate[1]) Then{
OO[0] = O;
for cnt = 1 to 99{
OO[cnt] = OO[cnt-1][1];
CC[cnt] = CC[cnt-1][1];
}
}
CC[0] = C;
if CC[P1+1] > 0 and (Bdate != bdate[1] or (TF < TF[1] and Bdate == Bdate[1])) Then{
sum1 = 0;
sum2 = 0;
for count = 0 to P1-1{
sum1 = sum1+CC[count+1];
sum2 = sum2+CC[count+2];
}
mav1 = sum1/P1;
mav2 = sum2/P1;
If (CC[1] < mav1 and CC[2] >= mav2) Then
{
tp[0] = (OO[1] + CC[1]) / 2;
For Cnt = 1 To 99
{
tp[Cnt] = tp[Cnt -1][1];
}
}
for cnt = 0 to 99
{
if tp[cnt] >= C Then
upv[cnt] = tp[cnt];
Else
upv[cnt] = 1000000;
if tp[cnt] <= C Then
dnv[cnt] = tp[cnt];
Else
dnv[cnt] = 0;
}
var1 =1000000;
LL = 0;
for cnt = 0 to 99
{
if upv[cnt] <var1 THEN
var1 = upv[cnt];
if dnv[cnt] > LL Then
LL = dnv[cnt];
}}
plot1(var1);
2020-01-20
208
글번호 135252
지표
답변완료
수식문의드립니다.
안녕하세요.
시스템 수식 문의드립니다.
tradingwiew 에 있던 것들 중 하나인데..
에스차트에서 적용이 될지 궁금합니다.
아래수식에서 hl2는 (h+l)/2 입니다.
//Author - Rajandran R
//www.marketcalls.in
study("Supertrend V1.0 - Buy or Sell Signal", overlay = true)
Factor=input(3, minval=1,maxval = 100)
Pd=input(7, minval=1,maxval = 100)
Up=hl2-(Factor*atr(Pd))
Dn=hl2+(Factor*atr(Pd))
TrendUp=close[1]>TrendUp[1]? max(Up,TrendUp[1]) : Up
TrendDown=close[1]<TrendDown[1]? min(Dn,TrendDown[1]) : Dn
Trend = close > TrendDown[1] ? 1: close< TrendUp[1]? -1: nz(Trend[1],1)
Tsl = Trend==1? TrendUp: TrendDown
linecolor = Trend == 1 ? green : red
plot(Tsl, color = linecolor , style = line , linewidth = 2,title = "SuperTrend")
plotshape(cross(close,Tsl) and close>Tsl , "Up Arrow", shape.triangleup,location.belowbar,green,0,0)
plotshape(cross(Tsl,close) and close<Tsl , "Down Arrow", shape.triangledown , location.abovebar, red,0,0)
//plot(Trend==1 and Trend[1]==-1,color = linecolor, style = circles, linewidth = 3,title="Trend")
plotarrow(Trend == 1 and Trend[1] == -1 ? Trend : na, title="Up Entry Arrow", colorup=lime, maxheight=60, minheight=50, transp=0)
plotarrow(Trend == -1 and Trend[1] == 1 ? Trend : na, title="Down Entry Arrow", colordown=red, maxheight=60, minheight=50, transp=0)
2020-01-19
251
글번호 135249
시스템
답변완료
문의드립니다.
항상 감사드립니다.
청산식으로 SetStopTrailing, SetStopLoss를 사용중입니다.
청산명을(시스템 성능보고서 상)
A조건일때는 A_SetStopTrailing, A_SetStopLoss
B조건일때는 B_SetStopTrailing, B_SetStopLoss
로 표시할 수 있는지 문의드립니다.
if MarketPosition == 1 then {
SetStopTrailing(1,30,PointStop);
SetStopLoss(30,PointStop);
}
if Marketposition == -1 Then {
SetStopTrailing(1,30,PointStop);
SetStopLoss(30,PointStop);
}
2020-01-18
151
글번호 135245
시스템