OPEN-SOURCE SCRIPT
NQ Position Size Calculator

NQ Position Size Line Calculator is designed specifically for Nasdaq 100 futures (NQ) and micro futures (MNQ) traders who want to maintain disciplined risk management. This visual tool eliminates the guesswork from position sizing by displaying distance lines and contract calculations directly on your chart.
The indicator creates horizontal lines at 10-tick intervals from your stop loss level, showing you exactly how many contracts to trade at each distance to maintain your predetermined risk amount. Whether you're trading regular NQ contracts or micro MNQ contracts, this calculator ensures you never risk more than intended while providing instant visual feedback for optimal position sizing decisions.
How to Use the Indicator
Step 1: Configure Your Settings
Contract Type: Choose between:
Display Options:
Step 2: Read the Visual Display
Once configured, the indicator displays:
Stop Loss Line:
Distance Lines:
Labels (if enabled):
Step 3: Use the Information Tables
The indicator provides two helpful tables:
Position Size Table (top-right):
Settings Table (bottom-right):
Step 4: Apply to Your Trading
For Long Positions:
For Short Positions:
Step 5: Trading Execution
Before Entering a Trade:
Risk Management Features:
The indicator creates horizontal lines at 10-tick intervals from your stop loss level, showing you exactly how many contracts to trade at each distance to maintain your predetermined risk amount. Whether you're trading regular NQ contracts or micro MNQ contracts, this calculator ensures you never risk more than intended while providing instant visual feedback for optimal position sizing decisions.
How to Use the Indicator
Step 1: Configure Your Settings
- Stop Loss Price: Enter your exact stop loss level (e.g., 20000.00)
- Risk Amount ($): Set your maximum dollar risk per trade (e.g., $500)
Contract Type: Choose between:
- NQ (Regular): $5 per tick - for larger accounts
- MNQ (Micro): $0.50 per tick - for smaller accounts or conservative sizing
Display Options:
- Max Lines: Number of distance lines to show (default: 30)
- Show Labels: Toggle tick distance and contract count labels
- Line Color: Customize the color of distance lines
- Label Size: Choose tiny, small, or normal label sizes
Step 2: Read the Visual Display
Once configured, the indicator displays:
Stop Loss Line:
- Thick yellow line marking your exact stop loss level
- Yellow label showing the stop loss price
Distance Lines:
- Dashed red lines at 10-tick intervals above and below your stop loss
- Lines appear on both sides for long and short position planning
Labels (if enabled):
- Green labels (right side): For long positions above your stop loss
- Red labels (left side): For short positions below your stop loss
- Format: "20T 5x" means 20 ticks distance, 5 contracts maximum
Step 3: Use the Information Tables
The indicator provides two helpful tables:
Position Size Table (top-right):
- Shows common tick distances (10, 20, 40, 80, 160 ticks)
- Displays risk per contract at each distance
- Contract count for your specified risk amount
- Total risk with rounded contract numbers
Settings Table (bottom-right):
- Confirms your current risk amount
- Shows selected contract type
- Displays current settings for quick reference
Step 4: Apply to Your Trading
For Long Positions:
- Look at the green labels on the right side of your chart
- Find your desired entry level
- Read the label to see: distance in ticks and maximum contracts
- Example: "30T 8x" = 30 ticks from stop, buy 8 contracts maximum
For Short Positions:
- Look at the red labels on the left side of your chart
- Find your desired entry level
- Read the label for tick distance and contract count
- Example: "40T 6x" = 40 ticks from stop, sell 6 contracts maximum
Step 5: Trading Execution
Before Entering a Trade:
- Identify your stop loss level and input it into the indicator
- Choose your entry point by looking at the distance lines
- Note the contract count from the corresponding label
- Verify the risk amount matches your trading plan
- Execute your trade with the calculated position size
Risk Management Features:
- Contract rounding: All position sizes are rounded down (never up) to ensure you don't exceed your risk limit
- Zero position filtering: Lines only show where position size is at least 1 contract
- Dual-sided display: Plan both long and short opportunities simultaneously
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。