PulseHub
OPEN-SOURCE SCRIPT

Risk Calculation Mean Reversion

493
Overview

The Risk Indicator is a comprehensive position sizing and risk management tool designed for traders who want to visualize their potential profit/loss scenarios based on actual dollar amounts rather than just percentages. It displays multiple timeframe 200 EMAs while calculating real-time profit targets and stop-loss distances based on your specified buying power and risk parameters.

Key Features

📊 Multi-Timeframe EMAs

Current 200 EMA (red line) - The standard 200-period EMA on your current chart

1-Minute 200 EMA (black line) - The 200 EMA from the 1-minute timeframe, providing ultra-short term context

1-Hour 200 EMA (baby blue line) - The 200 EMA from the 1-hour timeframe for broader trend perspective

💰 Position Size Calculator

Automatically calculates maximum share size based on your total buying power

Shows exact share count at current price

Real-time updates as price moves

📈 Profit Target Analysis

Distance to each EMA displayed in:

Points (price difference)

Dollar value (based on full position size)

Percentage move required (optional toggle)

Three target levels:

Current 200 EMA (red)

1-Minute 200 EMA (black)

1-Hour 200 EMA (baby blue)

📉 Risk Management

Full Buying Power Risk: Points needed to lose your entire allocated capital

Equity at Risk: Your predefined maximum loss amount (natural stop-loss distance)

Both displayed in points for easy stop placement

🔔 Smart Alerts

Tiered profit alerts trigger when unrealized profit to the current 200 EMA reaches specific thresholds:

$100 through $1000 in $100 increments

Each alert has an independent cooldown counter to prevent spam

Customizable cooldown period (in bars)

Detailed alert messages include:

Profit amount

Current share count

Entry price

EMA target price

Points to target

📋 Information Table

A clean, color-coded table in the bottom right corner displays:

Position Summary

Current share size and price

Total buying power used

Loss Scenarios (red/orange)

Points to lose full buying power

Points to lose equity at risk

Profit Targets (green)

Full position targets at each EMA (with optional percentages)

Equity-scaled targets (profit if only risking your equity amount)

Input Parameters

Parameter Description
Buying Power ($) Your total available capital for this trade (default: $200,000)
Equity at Risk ($) Maximum dollar amount you're willing to lose (default: $25,000)
Show % on Profit Targets Toggle percentage display next to profit targets
Cooldown (Bars) Bars between repeated alerts (default: 20)

How to Use

Set Your Parameters

Enter your total buying power

Define your maximum risk per trade

Adjust cooldown based on your trading style

Read the Table

Top section shows your exact position size

Loss scenarios help you set appropriate stops

Profit targets show potential returns at key levels

Monitor Alerts

Set PulseWire alerts on any of the 10 profit levels

Receive notifications when targets are hit

Cooldown prevents alert fatigue during fast moves

Scale Your Position

Use the equity-scaled targets (bottom row) to see profits if you're only risking your defined amount

Full buying power targets show maximum potential

Alert Messages Example

Risk Alert ($500+): Profit to 200 EMA = $523.45 | 1000 shares @ $150.25 | EMA target $150.78 | 0.53 pts

Ideal For

Position traders who need precise risk calculations

Swing traders using EMAs as dynamic support/resistance

Risk-averse traders who think in dollar terms, not just percentages

Anyone scaling positions who needs to visualize profit scenarios

Notes

All calculations use the current bar's closing price

Table updates only on the last bar for performance

EMAs from lower timeframes may have gaps; indicator handles this gracefully

Cooldown counters are independent per alert level

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by PulseWire. Read more in the Terms of Use.