답변완료
수식 변환 부탁 드립니다.
안녕하세요!
수식 변환 부탁드립니다. 감사합니다^
/@version=5
indicator(overlay=true)
// ** ---> Inputs ------------- {
var bool positive = false
var bool negative = false
string RSI_group = "RSI Settings"
string mom_group = "Momentum Vales"
string visual = "Visuals"
int Len2 = input(14,"RSI 1️⃣",inline = "rsi",group = RSI_group)
int pmom = input(65," Positive above",inline = "rsi1",group =RSI_group )
int nmom = input(32,"Negative below",inline = "rsi1",group =RSI_group )
bool showlabels = input(true,"Show Momentum ❓",inline = "001",group =visual )
color p = input(color.rgb(76, 175, 79, 62),"Positive",inline = "001",group =visual )
color n = input(color.rgb(255, 82, 82, 66),"Negative",inline = "001",group =visual )
bool filleshow = input(true,"Show highlighter ❓",inline = "002",group =visual )
color bull = input(color.rgb(76, 175, 79, 62),"Bull",inline = "002",group =visual )
color bear = input(color.rgb(255, 82, 82, 66),"Bear",inline = "002",group =visual )
rsi = ta.rsi(close, Len2)
//------------------- }
// ** ---> Momentums ------------- {
p_mom = rsi[1] < pmom and rsi > pmom and rsi > nmom and ta.change(ta.ema(close,5)) > 0
n_mom = rsi < nmom and ta.change(ta.ema(close,5)) < 0
if p_mom
positive:= true
negative:= false
if n_mom
positive:= false
negative:= true
// ** ---> Entry Conditions ------------- {
a = plot(filleshow ? ta.ema(high,5) : na,display = display.none,editable = false)
b = plot(filleshow ? ta.ema(low,10) : na,style = plot.style_stepline,color = color.red,display = display.none,editable = false)
// fill(a,b,color = color.from_gradient(rsi14,35,pmom,color.rgb(255, 82, 82, 66),color.rgb(76, 175, 79, 64)) )
fill(a,b,color = positive ? bull :bear ,editable = false)
//plotting
pcondition = positive and not positive[1]
ncondition2 = negative and not negative[1]
plotshape(showlabels ? pcondition: na , title="Positive Signal",style=shape.labelup, color=p, location= location.belowbar , size=size.tiny,text= "Positive",textcolor = color.white)
plotshape(showlabels ? ncondition2: na , title="Negative Signal",style=shape.labeldown, color=n, location= location.abovebar , size=size.tiny,text = "Negative",textcolor = color.white)
// Alerts //
alertcondition(pcondition,"Positive Trend")
alertcondition(ncondition2,"Negative Trend")
//
2024-05-04
866
글번호 179144
지표
답변완료
수식추가
Inputs : Period(20), Sence(1.5), CC_DN(Yellow);
Vars:
VLineUp(0),
VLineDn(0),
HHighest(0),
LLowest(0),
JustChanged(FALSE),
VLine(0), DBN(0),T(0);
Array:
Highs[35](0),
Lows[35](0),
RRange[35](0),
UpWave[1](FALSE),
DnWave[1](FALSE);
If STime == 180000 Then
DBN = 0;
DBN = DBN + 1;
Var1 = Period;
Var2 = Var1 - 1;
Var3 = Var1 - 2;
Var5 = Sence;
Var6 = H-L;
JustChanged = FALSE;
if CurrentBar <= Var2 then begin
Highs[CurrentBar] = Close;
Lows[CurrentBar] = Close;
RRange[CurrentBar] = (H-L) /2;
end;
if CurrentBar == Var1 then begin
if Highs[Var2] >= Highs[Var3] then begin
UpWave[1] = TRUE;
HHighest = Highs[Var2];
VLineUp = HHighest - (Var5 * MA(Var6,Var2));
#Plot1(VLineUp,"VLineUp");
end;
if Highs[Var2] < Highs[Var3] then begin
DnWave[1] = TRUE;
LLowest = Lows[Var2];
VLineDn = LLowest + (Var5 * MA(Var6,Var2));
#Plot2(VLineDn,"VLineDn");
end;
end;
if CurrentBar > Var1 then begin
if DnWave[1] and Close > VLineDn then begin
DnWave[1] = FALSE;
UpWave[1] = TRUE;
JustChanged = TRUE;
HHighest = Close;
LLowest = 0;
end;
if UpWave[1] and Close < VLineUp and JustChanged == FALSE then begin
UpWave[1] = FALSE;
DnWave[1] = TRUE;
JustChanged = TRUE;
LLowest = Close;
HHighest = 0;
end;
if JustChanged == FALSE then begin
if Close > HHighest then
HHighest = Close;
else if Close < LLowest then
LLowest = Close;
end;
VLineUp = HHighest - (Var5 * MA(Var6,Var2));
VLineDn = LLowest + (Var5 * MA(Var6,Var2));
if UpWave[1] then
T = 1;
else if DnWave[1] then
T = -1;
end;
Input : BBP(20), MultiD(2);
var : BBmd(0),BBup(0),BBdn(0);
BBmd = ma(C,Period);
BBup = BollBandUp(BBP,MultiD);
BBdn = BollBandDown(BBP,MultiD);
if CrossDown(C,BBup) and t == -1 Then
sell();
if crossup(C,BBdn) and t == 1 Then
buy();
안녕하세요
위식에추가 부탁드림니다.
이평60선추가
매수 기존식 + 이평60선위에서는 매수.
손절청산 이평60선 하향돌파시.
매도 기존식 + 이평60선아래에서 매도.
손절청산 이평60선 상향돌파시
2024-05-03
998
글번호 179118
시스템