1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.
Source Code
The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.
Overview
TN Markowitz GMVP Sovereign v6 fetches log returns for the specified assets, computes their covariance matrix, and inverts it to rebalance portfolio allocations at set bar intervals. The strategy enters long trades during each rebalancing period and displays asset weights in an on-screen table overlay. Key inputs include the rebalance frequency, covariance lookback period, and three custom asset symbols. The strategy does not include predefined stop-loss or take-profit rules.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
再平衡頻率 (Bars)
enum
RebalanceFreq.Standard
freq
協方差回顧長度
int
30
lookback
資產 1
symbol
BINANCE:BTCUSDT
s1
資產 2
symbol
BINANCE:ETHUSDT
s2
資產 3
symbol
BINANCE:SOLUSDT
s3
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
Boilerplate is a foundational framework designed for automated strategy development. It integrates multi-timeframe Exponential Moving Average (EMA) and Average Directional Index (ADX) filters to avoid trading counter-trends or choppy markets, along with a sess
This strategy automates the TradingLatino methodology by evaluating Squeeze Momentum combined with the Average Directional Index (ADX). It executes long or short positions based on momentum shifts and directional strength. Risk management options include const
This strategy overlays the price chart and combines Smart Money Concepts with prop-firm account limits. It scores setups using break of structure, fair value gaps, order blocks, volume spikes, and optional London or New York killzones. Entries use a minimum sc
This strategy executes trades based on dual exponential moving average trend alignment, customizable Bollinger Bands, and normalized ATR volatility thresholds. It enters positions in the direction of the moving average trend and manages risk using a dynamic st
The PMax Explorer strategy calculates the Profit Maximizer indicator by applying an ATR trailing stop band to various moving average types including EMA, VAR, ZLEMA, and TSF. It plots the selected moving average and PMax line directly on the price chart to tri
This strategy trades EMA crossovers on the price chart. It enters long when the fast EMA crosses above the slow EMA and price is above a longer trend EMA, and enters short on the opposite cross below that filter. Entries are allowed only in a morning session o