KryptoNight

Early/Delayed Signal Function

KryptoNight Cập nhật   
Early/Delayed Signal Function (before the bar close or after)

Usually, signals are considered to be valid at the bar close.
Some traders may prefer to have a chance to enter earlier.
It is of great risk, and the Strategy Tester is unable to provide consistent backtest data with regards to this.

But for those who want to integrate such a choice in their strategies, here is the Early Signal Function.
The function takes 2 parameters
- the signal that is considered valid at the bar close, of type bool
- the early time value in seconds, the time before the signal is valid, of type int
it returns a value of type bool - a New Entry Signal

The resulting conditions used for alerts would be:
- newLongCondition = earlySignal_f(myLongSignal, earlyTime)
- newShrtCondition = earlySignal_f(myShrtSignal, earlyTime)

Note: the signals can also be delayed - use a negative value for early time
Phát hành các Ghi chú:
improved the early alert function,
using the new built-in function for alerts, that works in both strategy() & study() scripts
Phát hành các Ghi chú:
test long alert
Phát hành các Ghi chú:
fix: now it is possible to delay the signals, use a negative value in seconds

Join the Discord Server for more info about the published tools.
discord.io/CryptoWorld
a Discord bot for Charting (TradingView and Heatmaps) is available

🟣 If you like any of my Invite-Only Tools, let me know

(DM or Discord for inquiries)
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 đồ?