OPEN-SOURCE SCRIPT
Matrix Risk/Reward

Matrix Risk/Reward is a visual trade-planning overlay. Click three points on the chart (entry, stop, target), then drag them. The script converts those prices into dollar risk, dollar reward, tick distance, risk/reward ratio, and live open P&L for the size you set.
It does not read your broker or prop-firm order ticket, and it does not place, modify, or cancel orders. The three points are planning levels you control.
HOW TO USE
1. Add the indicator to the chart.
2. Click Entry, then Stop, then Target.
3. Set Size to your contracts, lots, or units.
4. Click the indicator on the chart so the three points light up, then drag those points, not the dashed rays.
5. Read dollar SL/TP on the labels and in the table.
Direction is detected automatically: stop below entry = long, stop above entry = short. Stop and target must sit on opposite sides of entry for a valid R:R.
WHAT IT SHOWS
- Stop loss in dollars and ticks
- Take profit in dollars and ticks
- Open P&L in dollars
- Reward-to-risk ratio
- Dollars per tick
- Bid / ask / spread when a quote mode is active
- Colored risk and reward zones
OPEN P&L QUOTE
Last +/- spread (default, all plans): bid = last minus half spread, ask = last plus half spread. Longs mark to bid. Shorts mark to ask. Set Spread (ticks) to your market (1 is typical for MES, MNQ, ES, NQ).
Last price: uses the chart close only.
1-tick bid/ask (Ultimate): uses live 1-tick bid and ask. Requires a TradingView Ultimate plan. If those quotes are missing, it falls back to Last +/- spread.
POINT VALUE
Dollar math is price move x point value x size.
Leave Point value override at 0 to auto-detect common futures (MNQ 2, MES 5, NQ 20, ES 50, YM 5, RTY 50, GC 100, MGC 10, CL 1000, MCL 100, MYM 0.5, M2K 0.5). For other symbols the script uses the chart's built-in point value. If dollars look wrong, set the override yourself.
SETTINGS
Position: Size, point value override, open P&L quote mode, spread in ticks.
Levels: Draggable entry, stop, and target.
Display: Table, zone colors, and zone transparency.
NOTES
This is a calculator overlay, not a strategy and not a broker bridge.
If you want the dollars to match a live ticket, drag this tool onto those prices.
1-tick bid/ask is optional. Leave the default quote mode on unless you have Ultimate.
Not financial advice. Size, point value, and spread must match the instrument you are trading.
It does not read your broker or prop-firm order ticket, and it does not place, modify, or cancel orders. The three points are planning levels you control.
HOW TO USE
1. Add the indicator to the chart.
2. Click Entry, then Stop, then Target.
3. Set Size to your contracts, lots, or units.
4. Click the indicator on the chart so the three points light up, then drag those points, not the dashed rays.
5. Read dollar SL/TP on the labels and in the table.
Direction is detected automatically: stop below entry = long, stop above entry = short. Stop and target must sit on opposite sides of entry for a valid R:R.
WHAT IT SHOWS
- Stop loss in dollars and ticks
- Take profit in dollars and ticks
- Open P&L in dollars
- Reward-to-risk ratio
- Dollars per tick
- Bid / ask / spread when a quote mode is active
- Colored risk and reward zones
OPEN P&L QUOTE
Last +/- spread (default, all plans): bid = last minus half spread, ask = last plus half spread. Longs mark to bid. Shorts mark to ask. Set Spread (ticks) to your market (1 is typical for MES, MNQ, ES, NQ).
Last price: uses the chart close only.
1-tick bid/ask (Ultimate): uses live 1-tick bid and ask. Requires a TradingView Ultimate plan. If those quotes are missing, it falls back to Last +/- spread.
POINT VALUE
Dollar math is price move x point value x size.
Leave Point value override at 0 to auto-detect common futures (MNQ 2, MES 5, NQ 20, ES 50, YM 5, RTY 50, GC 100, MGC 10, CL 1000, MCL 100, MYM 0.5, M2K 0.5). For other symbols the script uses the chart's built-in point value. If dollars look wrong, set the override yourself.
SETTINGS
Position: Size, point value override, open P&L quote mode, spread in ticks.
Levels: Draggable entry, stop, and target.
Display: Table, zone colors, and zone transparency.
NOTES
This is a calculator overlay, not a strategy and not a broker bridge.
If you want the dollars to match a live ticket, drag this tool onto those prices.
1-tick bid/ask is optional. Leave the default quote mode on unless you have Ultimate.
Not financial advice. Size, point value, and spread must match the instrument you are trading.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。