RSI (Relative Strength Index) Calculator

Each line represents a consecutive period (e.g., daily, weekly, monthly).
Commonly 14. Must be less than the number of data points.

RSI Calculation Results

Index Price ($) Change ($) Gain ($) Loss ($) Avg Gain ($) Avg Loss ($) RS RSI

No results to display yet. Please enter data and click 'Calculate RSI'.

RSI Analysis & Interpretation

Analysis will appear here after calculation.

Overbought Signal: An RSI value above 70 suggests the asset may be overbought, indicating a potential reversal or pullback. Consider exercising caution or looking for bearish signals.

`; } else if (latestRSI < 30) { analysisHtml += `

Oversold Signal: An RSI value below 30 suggests the asset may be oversold, indicating a potential bounce or reversal to the upside. Consider looking for bullish signals.

`; } else { analysisHtml += `

Neutral / Consolidating: An RSI value between 30 and 70 suggests that the asset is not in an overbought or oversold condition. Price action within this range can indicate consolidation or a trending market without extreme momentum.

`; } // General tips analysisHtml += `

General RSI Guidelines:

  • Trend Confirmation: During an uptrend, RSI often stays above 30 and frequently reaches 70. During a downtrend, it often stays below 70 and frequently reaches 30.
  • Divergence: Watch for divergences where price makes a new high/low, but RSI does not. This can signal a weakening trend.
  • Centerline Crossover: A move above 50 (from below) can suggest an upward trend, while a move below 50 (from above) can suggest a downward trend.
  • False Signals: In strong trends, RSI can remain in overbought/oversold territory for extended periods. Always use RSI in conjunction with other indicators and price action analysis.
`; rsiAnalysisOutput.innerHTML = analysisHtml; } window.resetForm = function() { priceDataInput.value = ''; rsiPeriodInput.value = '14'; rsiResultsTableBody.innerHTML = ''; noResultsMessage.style.display = 'block'; rsiAnalysisOutput.innerHTML = '

Analysis will appear here after calculation.

'; calculatedRSIResults = []; resultsTabButton.disabled = true; analysisTabButton.disabled = true; resultsTabButton.classList.add('rsi-btn-disabled'); analysisTabButton.classList.add('rsi-btn-disabled'); activateTab('input'); // Return to input tab } window.downloadPdf = function() { const element = document.getElementById('rsiTool'); if (!element) { alert('Tool container not found for PDF generation.'); return; } // Temporarily activate all tabs to ensure all content is rendered for PDF const previouslyActiveTabContent = document.querySelector('.rsi-tab-content.active'); const previouslyActiveTabButton = document.querySelector('.rsi-tab-button.active'); tabContents.forEach(content => content.classList.add('active')); tabButtons.forEach(button => button.classList.remove('active')); // Deactivate all buttons document.getElementById('rsiInputTab').classList.add('active'); // Ensure input is active if not already document.getElementById('rsiResultsTab').classList.add('active'); // Ensure results is active document.getElementById('rsiAnalysisTab').classList.add('active'); // Ensure analysis is active // Hide buttons and tabs for PDF export const elementsToHide = document.querySelectorAll('.rsi-tabs, .rsi-btn-group, .rsi-pdf-download-btn'); const originalDisplays = []; elementsToHide.forEach(el => { originalDisplays.push(el.style.display); el.style.display = 'none'; }); html2pdf(element, { margin: 10, filename: 'RSI_Calculator_Results.pdf', image: { type: 'jpeg', quality: 0.98 }, html2canvas: { scale: 2, logging: true, dpi: 192, letterRendering: true }, jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' } }).then(() => { // Restore original state after PDF generation let i = 0; elementsToHide.forEach(el => { el.style.display = originalDisplays[i++]; }); tabContents.forEach(content => content.classList.remove('active')); if (previouslyActiveTabContent) { previouslyActiveTabContent.classList.add('active'); } if (previouslyActiveTabButton) { previouslyActiveTabButton.classList.add('active'); } else { // Fallback to default if no active button was found document.querySelector('.rsi-tab-button[data-tab="input"]').classList.add('active'); document.getElementById('rsiInputTab').classList.add('active'); } }).catch(error => { console.error('Error generating PDF:', error); alert('Failed to generate PDF. Please try again.'); // Ensure elements are restored even on error let i = 0; elementsToHide.forEach(el => { el.style.display = originalDisplays[i++]; }); tabContents.forEach(content => content.classList.remove('active')); if (previouslyActiveTabContent) { previouslyActiveTabContent.classList.add('active'); } if (previouslyActiveTabButton) { previouslyActiveTabButton.classList.add('active'); } else { document.querySelector('.rsi-tab-button[data-tab="input"]').classList.add('active'); document.getElementById('rsiInputTab').classList.add('active'); } }); } // Initialize UI state resetForm(); });
Scroll to Top