답변완료
수식변환 부탁합니다.
안녕하세요...수식변환 부탁드립니다.
AA = lowestsince(1,crossup(KK,5),avg(C,7));
BB = lowestsince(1,crossdown(KK,10),avg(C,6));
(AA > BB) and (AA < C)
감사합니다.
2024-05-10
708
글번호 179366
종목검색
답변완료
수식 검토 부탁드립니다 ㅠ
안녕하세요?
항상 좋은 자료와 시스템 공부하는데 잘 활용하고 있게 해주셔서 감사합니다.
1.나름 시스템식을 만들었는데,롱이 나왔다 바로 숏이 나오네요,,,
뭐가 잘못된것일까요?
2. settrailingstop의 목표가를 볼린져밴드의 상한선,하한선의 값으로 설정하고 싶은데
수식을 어떻게 만들면 될까요?
미리 감사합니다.
화창한 오월의 햇살도 함께 만끽하시기 바랍니다.
input : P1(5),P2(10),profit(20), 드랍(5);
var : mav1_1(0,data1),mav1_2(0,data1),
mav2_1(0,data2),mav2_2(0,data2),
mav3_1(0,data3),mav3_2(0,data3),
mav4_1(0,data4),mav4_2(0,data4);
mav1_1 = data1(wma(C,P1));
mav1_2 = data1(wma(C,P2));
mav2_1 = data2(wma(C,P1));
mav2_2 = data2(wma(C,P2));
mav3_1 = data3(wma(C,P1));
mav3_2 = data3(wma(C,P2));
mav4_1 = data4(wma(C,P1));
mav4_2 = data4(wma(C,P2));
if CrossUp(mav2_1,mav2_2) and
(mav2_1>mav2_2) and
(mav3_1>mav3_2) and
(mav4_1>mav4_2) Then
buy();
ExitShort();
if CrossDown(mav2_1,mav2_2) and
(mav2_1<mav2_2) and
(mav3_1<mav3_2) and
(mav4_1<mav4_2) Then
Sell();
ExitLong();
if MarketPosition == 1 Then
SetStopTrailing(드랍*PriceScale,profit*PriceScale,PointStop,0);
Else
SetStopTrailing(0,0);
if MarketPosition == -1 Then
SetStopTrailingg(드랍*PriceScale,profit*PriceScale,PointStop,0);
Else
SetStopTrailing(0,0);
2024-05-10
870
글번호 179359
시스템
답변완료
수식 변환 부탁 드립니다.
안녕하세요!
다음 수식을 예스로 변환 부탁드립니다.
//@version=4
study(format=format.price, precision=4, overlay=true)
signal_length = input(title="Signal Smoothing", type=input.integer, minval = 1, maxval = 200, defval = 11)
sma_signal = input(title="Simple MA (Signal Line)", type=input.bool, defval=true)
lin_reg = input(title="Lin Reg", type=input.bool, defval=true)
linreg_length = input(title="Linear Regression Length", type=input.integer, minval = 1, maxval = 200, defval = 11)
bopen = lin_reg ? linreg(open, linreg_length, 0) : open
bhigh = lin_reg ? linreg(high, linreg_length, 0) : high
blow = lin_reg ? linreg(low, linreg_length, 0) : low
bclose = lin_reg ? linreg(close, linreg_length, 0) : close
r = bopen < bclose
signal = sma_signal ? sma(bclose, signal_length) : ema(bclose, signal_length)
plotcandle(r ? bopen : na, r ? bhigh : na, r ? blow: na, r ? bclose : na, title="LinReg Candles", color= color.green, wickcolor=color.green, bordercolor=color.green, editable= true)
plotcandle(r ? na : bopen, r ? na : bhigh, r ? na : blow, r ? na : bclose, title="LinReg Candles", color=color.red, wickcolor=color.red, bordercolor=color.red, editable= true)
plot(signal, color=color.white)
2024-05-10
760
글번호 179342
지표