PROTECTED SOURCE SCRIPT

Gold Silver Ratio Indicator by MossinNagant

614
This system is designed to trade manually in the gold-silver ratio.

It sells and buys at the percentage you specify in the lower and upper limits and sells and buys at the same rate for each subsequent increase or decrease you specify.

start_time: Gets the start date from the user (default: January 1, 2025).

initial_dollar_input: Initial balance (in USD, default: 10,000 USD). 50% of this balance will buy gold and 50% will buy silver.

threshold_high_input: Upper threshold level (default: 90).

threshold_low_input: Lower threshold level (default: 80).

step_input: Step size (in percentage, default: 2%).

trade_percent_input: Percentage rate to be sold in each transaction.

Transaction logic;
Transaction Logic:
sell_gold_basic and sell_gold_step: When the rate exceeds the upper threshold (threshold_high), gold is sold.

sell_silver_basic and sell_silver_step: When the rate falls below the lower threshold (threshold_low), silver is sold.

step: A new transaction is triggered with each additional step (e.g. 2% increments).

Transactions:
When gold is sold: 10% is sold (gold_sold), silver is bought with it (silver_bought).

When silver is sold: 10% is sold (silver_sold), gold is bought with it (gold_bought).

Sales and purchase transactions are shown on the chart with labels (label.new).
------------

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.