Midas Mk. II - Ultimate Crypto Swing

Tác giả:ChaoZhang, Ngày: 2022-05-09 23:06:21
Tags:SMAMACD

Kế hoạch này chỉ được sử dụng trong biểu đồ tiền điện tử 4h <<

Làm thế nào nó hoạt động - Để chuyển đổi giao dịch trong một nến 4 giờ, có phạm vi lớn hơn nhiều so với nến khung thời gian ngắn hơn, kịch bản sử dụng một khung thời gian dài hơn ema, sma và MACD để tính đến như vậy. Khi ema và sma vượt qua và tỷ lệ thay đổi của biểu đồ MACD có lợi cho hướng, thì hệ thống cung cấp một tín hiệu dài / ngắn. Làm thế nào để sử dụng - Các kịch bản hoạt động tốt nhất khi tín hiệu là ngang bằng với các phân tích khác (cộng thái, mô hình hài hòa, vv) kịch bản này không cung cấp bất kỳ tín hiệu thoát, vì vậy tôi khuyên bạn nên thoát khi nến vỡ ra khỏi cấu trúc, hoặc các chiến lược khác.

Các cập nhật hoặc sửa đổi sẽ được ghi lại trong các bình luận. Chúc may mắn với kịch bản này!

backtest img


/*backtest
start: 2022-04-08 00:00:00
end: 2022-05-07 23:59:00
period: 15m
basePeriod: 5m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Bhangerang

 // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Bhangerang

//@version=5
indicator(title="Midas Mk. II - Ultimate Crypto Swing", overlay=true)

[MACD_line, Signal_line, hist] = ta.macd(close, 55, 89, 9)

// Strategy conditions
crossover = ta.crossover(ta.ema(close, 21), ta.sma(close, 55))
crossunder = ta.crossunder(ta.ema(close, 21), ta.sma(close, 55))

long_entry_condition = crossover and (hist >= 0 or (hist[0] > hist[1] and hist[1] > hist[2]))
short_entry_condition = crossunder and (hist <= 0 or (hist[0] < hist[1] and hist[1] < hist[2]))

simple_crossover = crossover and not long_entry_condition
simple_crossunder = crossunder and not short_entry_condition


// Plot on the chart
plotchar(long_entry_condition,  "Go Long",  "▲", location.belowbar, color.lime, size = size.small, text = "long")
plotchar(short_entry_condition, "Go Short", "▼", location.abovebar, color.red, size = size.small, text = "short")
plotchar(simple_crossover, "Crossing Up", "▲", location.belowbar, color.lime, size = size.tiny)
plotchar(simple_crossunder, "Crossing Down", "▼", location.abovebar, color.red, size = size.tiny)


if long_entry_condition
    strategy.entry("Enter Long", strategy.long)
else if short_entry_condition
    strategy.entry("Enter Short", strategy.short)

Có liên quan

Thêm nữa