jason5480

Trailing Buy

jason5480 Cập nhật   
This script demonstrates how to do trailing buy. With this approach, given an entry signal, instead of buying directly, you just follow the price downwards (for long positions) and you buy when the price increases by a small percentage. The order will be executed when the next bar is closed. This approach may increase the profits (slightly) in some strategies! This script can be used as a template for your own strategy. Be aware that the simulated data may produce unrealistic results.
Phát hành các Ghi chú:
  • Fix some bugs in some edge cases
  • Refactor the code to better reflect what it does
Phát hành các Ghi chú:
  • Fix minor typos
Phát hành các Ghi chú:
  • Use stop orders when trailing instead of market orders at the start of the next candle (suggestion by @freyadog)
  • Use time_filter library
Phát hành các Ghi chú:
  • Minor code clean up
  • Change color scheme
Phát hành các Ghi chú:
  • Update time_filters library
Phát hành các Ghi chú:
  • Replace deprecated "when=" with if statements in strategy calls
Phát hành các Ghi chú:
  • Change fastMA default color to yellow
  • Change trailing entry price default color to blue
Phát hành các Ghi chú:
  • Increase max labels to 150
  • Minor refactoring
Phát hành các Ghi chú:
  • Update time_filters library
Phát hành các Ghi chú:
  • Change the settings so the order type (market, stop-limit) is independent from the trailing
  • Some minor label/color changes
Phát hành các Ghi chú:
  • Added option for limit orders
Phát hành các Ghi chú:
  • small refactoring
Phát hành các Ghi chú:
  • Update time_filters library version
Phát hành các Ghi chú:
  • Update time_filters library version
Phát hành các Ghi chú:
  • Use the 'chrono_utils' library for the date-time window filter

If you're interested in exploring and discovering other high quality free strategies come join us in Discord: discord.gg/2wkm9QqSuY
Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?