Chiến lược theo dõi đảo ngược Renko

Tác giả:ChaoZhang, Ngày: 2023-09-15 15:53:40
Tags:

Tổng quan chiến lược

Chiến lược theo dõi đảo ngược Renko là một chiến lược giao dịch ngắn hạn sử dụng gạch Renko để xác định sự đảo ngược thị trường. Nó nắm bắt các cơ hội đảo ngược ngắn hạn bằng cách theo dõi sự thay đổi màu sắc giữa các gạch liền kề.

Chiến lược logic

  1. Sử dụng gạch Renko không sơn lại.

  2. Theo dõi sự thay đổi màu sắc giữa các viên gạch lân cận.

  3. Các tín hiệu xuất hiện khi màu gạch hiện tại chuyển đổi trong khi hai gạch trước đó chia sẻ cùng màu.

  4. Tín hiệu dài: Gạch tăng xuất hiện sau hai gạch giảm.

  5. Tín hiệu ngắn: Gạch giảm xuất hiện sau hai gạch tăng.

  6. Các tùy chọn nhập cảnh: lệnh thị trường hoặc lệnh dừng.

  7. Đặt stop loss/take profit ở kích thước gạch nhân với một hệ số.

Lõi chính là tận dụng các cơ hội rút lui gây ra bởi các lần lật màu gạch. Các viên gạch cùng màu liên tiếp đại diện cho sự hình thành xu hướng, và màu lật gạch tiếp theo cho thấy khả năng đảo ngược.

Kích thước gạch và hệ số dừng lỗ / lấy lợi nhuận có thể được điều chỉnh để tối ưu hóa.

Ưu điểm của Chiến lược

  • Đồ gạch trực tiếp hiển thị thông tin đảo ngược

  • Logic đơn giản và rõ ràng, dễ thực hiện

  • Cơ hội dài và ngắn đối xứng

  • Điều chỉnh kích thước gạch linh hoạt

  • Kiểm soát rủi ro nghiêm ngặt với lệnh dừng lỗ/lấy lợi nhuận

Cảnh báo về rủi ro

  • Cần một số lượng nhất định các viên gạch liên tiếp để tạo ra tín hiệu

  • Kích thước gạch ảnh hưởng trực tiếp đến lợi nhuận / sử dụng

  • Khó xác định thời gian xu hướng

  • Có thể xảy ra stop loss liên tiếp

Kết luận

Chiến lược theo dõi đảo ngược Renko áp dụng sáng tạo các chỉ số kỹ thuật truyền thống bằng cách trực tiếp sử dụng chuyển đổi màu gạch để xác định đảo ngược ngắn hạn.


/*backtest
start: 2023-09-07 00:00:00
end: 2023-09-08 18:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=3
//Simple Renko strategy, very profitable. Thanks to vacalo69 for the idea.
//Rules when the strategy opens order at market as follows:
//- Buy when previous brick (-1) was bearish and previous brick (-2) was bearish too and actual brick close is bullish
//- Sell when previous brick (-1) was bullish and previous brick (-2) was bullish too and actual brick close is bearish
//Rules when the strategy send stop order are the same but this time a stop buy or stop sell is placed (better overall results).
//Note that strategy open an order only after that condition is met, at the beginning of next candle, so the actual close is not the actual price.
//Only input is the brick size multiplier for stop loss and take profit: SL and TP are placed at (brick size)x(multiplier) Or put it very high if you want startegy to close order on opposite signal.
//Adjust brick size considering: 
//- Strategy works well if there are three or more consecutive bricks of same "color"
//- Expected Profit
//- Drawdown
//- Time on trade
//
//Study with alerts, MT4 expert advisor and jforex automatic strategy are available at request.
//

strategy("Renko Strategy Open_Close", overlay=true, calc_on_every_tick=true, pyramiding=0,default_qty_type=strategy.percent_of_equity,default_qty_value=100,currency=currency.USD)

//INPUTS
Multiplier=input(1,minval=0, title='Brick size multiplier: use high value to avoid SL and TP')
UseStopOrders=input(true,title='Use stop orders instead of market orders')

//CALCULATIONS
BrickSize=abs(open[1]-close[1])
targetProfit = 0
targetSL = 0

//STRATEGY CONDITIONS
longCondition = open[1]>close[1] and close>open and open[1]<open[2]
shortCondition = open[1]<close[1] and close<open and open[1]>open[2]

//STRATEGY
if (longCondition and not UseStopOrders)
    strategy.entry("LongBrick", strategy.long)
    targetProfit=close+BrickSize*Multiplier
    targetSL=close-BrickSize
    strategy.exit("CloseLong","LongBrick", limit=targetProfit, stop=targetSL)
    
if (shortCondition and not UseStopOrders)
    strategy.entry("ShortBrick", strategy.short)
    targetProfit = close-BrickSize*Multiplier
    targetSL = close+BrickSize
    strategy.exit("CloseShort","ShortBrick", limit=targetProfit, stop=targetSL)

if (longCondition and UseStopOrders)
    strategy.entry("LongBrick_Stop", strategy.long, stop=open[2])
    targetProfit=close+BrickSize*Multiplier
    targetSL=close-BrickSize
    strategy.exit("CloseLong","LongBrick_Stop", limit=targetProfit, stop=targetSL)
    
if (shortCondition and UseStopOrders)
    strategy.entry("ShortBrick_Stop", strategy.short, stop=open[2])
    targetProfit = close-BrickSize*Multiplier
    targetSL = close+BrickSize
    strategy.exit("CloseShort","ShortBrick_Stop", limit=targetProfit, stop=targetSL)

Thêm nữa