Ai có thể giúp mình chuyển code từ Pine script (Tradingview) sang MQL5 được không

Ai có thể giúp mình chuyển code từ Pine script (Tradingview) sang MQL5 được không

Ai có thể giúp mình chuyển code từ Pine script (Tradingview) sang MQL5 được không

Xhen Nguyen

New Member
2
1
Mình đang có code indicator như này trên Trading View, nhưng mà giờ mình muốn có indi đó ở trong MT5, mà mình lại không hiểu gì về MQL5 :( Ai giúp mình chuyển qua được không ạ

//@version=5
indicator(title="RSI", format=format.price, timeframe="", timeframe_gaps=true)
//RSI source
len = 14
src = close
rsi = ta.rsi(src, len)
//RSI div source
src_fast = close
len_fast = input(5)
src_slow = close
len_slow = input(14)
up_fast = ta.rma(math.max(ta.change(src_fast), 0), len_fast)
down_fast = ta.rma(-math.min(ta.change(src_fast), 0), len_fast)
rsi_fast = down_fast == 0 ? 100 : up_fast == 0 ? 0 : 100 - 100 / (1 + up_fast / down_fast)
up_slow = ta.rma(math.max(ta.change(src_slow), 0), len_slow)
down_slow = ta.rma(-math.min(ta.change(src_slow), 0), len_slow)
rsi_slow = down_slow == 0 ? 100 : up_slow == 0 ? 0 : 100 - 100 / (1 + up_slow / down_slow)
divergence = rsi_fast - rsi_slow
//RSI display
plot(rsi, title="RSI", linewidth=2, color=#2962FF)
//RSI div display
plotdiv = plot( divergence, title="RSI Div", color=#2EAF94, linewidth=2)
//Level line
b0 = hline(0, title="RSI 0", color=#787B86, linestyle=hline.style_dashed)
b15 = hline(15, title="RSI 15", color=#787B86, linestyle=hline.style_dashed)
bm15 = hline(-15, title="RSI -15", color=#787B86, linestyle=hline.style_dashed)
fill(b15, bm15, title="Background 15 -15", color=color.new(color.orange, 90))
hline(50, title="RSI 50", color=#787B86, linestyle=hline.style_dashed)
hline(90, title="RSI90", color=#ffffff, linestyle=hline.style_dotted)
b70 = hline(70, title="RSI 70", color=#787B86, linestyle=hline.style_dashed)
b30 = hline(30, title="RSI 30", color=#787B86, linestyle=hline.style_dashed)
b65 = hline(65, title="RSI 70", color=#787B8665, linestyle=hline.style_solid)
b35 = hline(35, title="RSI 30", color=#787B8665, linestyle=hline.style_solid)
fill(b70, b65, title="Background top", color=#0085FF15)
fill(b35, b65, title="Background mid", color=#8000FF15)
fill(b30, b35, title="Background bot", color=#0085FF15)
 
 

Đính kèm

  • Pine code.txt
    1.6 KB · Xem: 18

Giới thiệu sách Trading hay
Thấu hiểu Hành vi giá Thị trường Tài chính - Understanding Price Action

Là quyển sách hướng dẫn giao dịch Phương Pháp Price Action của Bob Volman, chỉ sử dụng duy nhất một đường MA và cấu trúc thị trường cùng hành vi giá để tìm kiếm lợi nhuận
Cho mình hỏi học code tradingview từ bước nào nhanh và mỳ ăn liền nhất ạ
 
 
Em k biết gì về code nhưng indi này có phải phân kì rsi 5 với rsi 14 không bác
 
 

BÌNH LUẬN MỚI NHẤT

AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

Back
Bên trên

Miễn trừ trách nhiệm

Tất cả nội dung trên website này đều vì mục đích cung cấp thông tin và không phải lời khuyên đầu tư.

Tại Việt Nam, giao dịch CFD forex có các rủi ro nhất định, trong đó bao gồm rủi ro về pháp lý. Độc giả nên tìm hiểu kỹ trước khi đưa ra quyết định tham gia.