tijan84

X% Drop in X Days, sold X Days after

tijan84 ที่อัปเดต:   
It identifies potential buy signals based on a specified percentage drop in price over a set number of days and calculates the total profit or loss (P/L) over a predefined period. Here's a breakdown of the script and its key parameters:

Script Description:
Indicator Name: "X% Drop in X Days, sold X Days after"

Functionality:
The script signals a buy opportunity when the price of an asset drops by a certain percentage (percentage_drop) within a specified length (length) in days.
It calculates the profit or loss percentage after a set number of days (hold_days) from the buy signal.
The script also displays the cumulative total profit or loss over a specified time frame, from a start date (start_period) to an end date (end_period), which is by default set to the current date.
Display:
Buy signals are marked on the chart.
The profit or loss for each trade after the hold period is displayed.
A label showing the total cumulative profit or loss, along with the start and end dates, is displayed on the chart.
Key Parameters:
percentage_drop (10.0% by default): The percentage decrease in price that triggers a buy signal. It represents the threshold for the price drop to consider a buying opportunity.

length (3 days by default): The period over which the drop in price is considered. It's the timeframe used to evaluate the percentage drop.

hold_days (30 days by default): The duration for holding the asset after the buy signal before selling. This parameter defines the time after which the profit or loss is calculated.

start_period (Set to "2022-11-21" by default): The beginning date for calculating the cumulative total profit or loss. This parameter allows the user to define a specific starting point for the analysis.

end_period (Set to the current date by default): The end date for the cumulative total profit or loss calculation. It defaults to the current date but can be set to a specific date for backtesting purposes.

Script Mechanics:
Buy Signal Logic: A buy signal is generated when the closing price is below the highest price of the last 'length' days, adjusted by the 'percentage_drop'.
Profit/Loss Calculation: For each buy signal, the script calculates the profit or loss percentage after 'hold_days' from the purchase. This is displayed on the chart for each trade.
Total P/L Display: The script calculates and displays the cumulative total profit or loss in the defined period (from 'start_period' to 'end_period') in a label on the chart.
Usage:
This script is useful for traders who follow a strategy based on buying assets after significant price drops and holding for a predetermined period. It automates the detection of potential buy opportunities and the calculation of profit or loss, aiding in decision-making and performance analysis.
เอกสารเผยแพร่:
It identifies potential buy signals based on a specified percentage drop in price over a set number of days and calculates the total profit or loss (P/L) over a predefined period. Here's a breakdown of the script and its key parameters:

Script Description:
Indicator Name: "X% Drop in X Days, sold X Days after"

Functionality:
The script signals a buy opportunity when the price of an asset drops by a certain percentage (percentage_drop) within a specified length (length) in days.

Key Parameters:
percentage_drop (5.0% by default): The percentage decrease in price that triggers a buy signal. It represents the threshold for the price drop to consider a buying opportunity.

length (3 days by default): The period over which the drop in price is considered. It's the timeframe used to evaluate the percentage drop.

hold_days (14 days by default): The duration for holding the asset after the buy signal before selling. This parameter defines the time after which the profit or loss is calculated.

start_period (Set to "2022-11-21" by default): The beginning date for calculating the cumulative total profit or loss. This parameter allows the user to define a specific starting point for the analysis.

end_period (Set to the current date by default): The end date for the cumulative total profit or loss calculation. It defaults to the current date but can be set to a specific date for backtesting purposes.

Script Mechanics:
Buy Signal Logic: A buy signal is generated when the closing price is below the highest price of the last 'length' days, adjusted by the 'percentage_drop'.
Profit/Loss Calculation: For each buy signal, the script calculates the profit or loss percentage after 'hold_days' from the purchase. This is displayed on the chart for each trade.
Total P/L Display: The script calculates and displays the cumulative total profit or loss in the defined period (from 'start_period' to 'end_period') in a label on the chart.
Usage:
This script is useful for traders who follow a strategy based on buying assets after significant price drops and holding for a predetermined period. It automates the detection of potential buy opportunities and the calculation of profit or loss, aiding in decision-making and performance analysis.
เอกสารเผยแพร่:
It identifies potential buy signals based on a specified percentage drop in price over a set number of days and calculates the total profit or loss (P/L) over a predefined period. Here's a breakdown of the script and its key parameters:

Script Description:
Indicator Name: "X% Drop in X Days, sold X Days after"

Functionality:
The script signals a buy opportunity when the price of an asset drops by a certain percentage (percentage_drop) within a specified length (length) in days.

Key Parameters:
percentage_drop (5.0% by default): The percentage decrease in price that triggers a buy signal. It represents the threshold for the price drop to consider a buying opportunity.

length (3 days by default): The period over which the drop in price is considered. It's the timeframe used to evaluate the percentage drop.

hold_days (30 days by default): The duration for holding the asset after the buy signal before selling. This parameter defines the time after which the profit or loss is calculated.

start_period (Set to "2022-11-21" by default): The beginning date for calculating the cumulative total profit or loss. This parameter allows the user to define a specific starting point for the analysis.

end_period (Set to the current date by default): The end date for the cumulative total profit or loss calculation. It defaults to the current date but can be set to a specific date for backtesting purposes.

Script Mechanics:
Buy Signal Logic: A buy signal is generated when the closing price is below the highest price of the last 'length' days, adjusted by the 'percentage_drop'.
Profit/Loss Calculation: For each buy signal, the script calculates the profit or loss percentage after 'hold_days' from the purchase. This is displayed on the chart for each trade.
Total P/L Display: The script calculates and displays the cumulative total profit or loss in the defined period (from 'start_period' to 'end_period') in a label on the chart.
Usage:
This script is useful for traders who follow a strategy based on buying assets after significant price drops and holding for a predetermined period. It automates the detection of potential buy opportunities and the calculation of profit or loss, aiding in decision-making and performance analysis.
สคริปต์โอเพนซอร์ซ

ด้วยจิตวิญญาณของ TradingView อย่างแท้จริง ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้ผู้ค้าสามารถเข้าใจและตรวจสอบได้ ไชโยให้กับผู้เขียน! คุณสามารถใช้ได้ฟรี แต่การใช้รหัสนี้ซ้ำในสิ่งพิมพ์อยู่ภายใต้กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?