Strategy with Reference Lines by itasouza

By itasouza

Performance Metrics

Description

Oct 11📊 Strategy with Reference LinesDescription:This strategy uses a contrarian approach based on the analysis of the previous candle to identify entry and exit points. The strategy draws horizontal reference lines at important levels of the previous candle and generates buy/sell signals based on the candle's direction.Key Features:🔹 Multi-Timeframe Analysis: Configurable for 1H, 2H, 3H, 4H, 6H, 12H, and 1D🔹 Reference Lines: High, low, close, and midpoint (50%) of the previous candle🔹 Visual Signals: Labels with prices and actions (BUY/SELL/TP)🔹 Optional Trading: Enable/disable automatic order execution🔹 Complete System: Automatic entry, Take Profit, and Stop Loss🔹 Alerts: Notifications when a new candle is detectedStrategy Logic:When the previous candle is POSITIVE:Signal: 🔴 SELL at the previous candle's closeTake Profit: 🎯 Midpoint (50%) of the previous candleStop Loss: 🔴 High of the previous candleWhen the previous candle is NEGATIVE:Signal: 🟢 BUY at the previous candle's closeTake Profit: 🎯 Midpoint (50%) of the previous candleStop Loss: 🟢 Low of the previous candleVisual Elements:Green Line: High of the previous candle (when positive)Red Line: Low of the previous candle (when negative)Yellow Line: Close of the previous candle (always present)Blue Line: Midpoint (50%) of the previous candle (always present)Labels: Prices and actions with emojis for easy identificationSettings:Timeframe: Default 4H (configurable)Auto Trading: Disabled by default (safety)Alerts: Include entry prices, TP, and SLRecommended Usage:✅ Visual Analysis: Use with trading disabled for analysis✅ Backtesting: Enable trading to test historically✅ Swing Trading: Ideal for 4H or higher timeframes✅ Risk Management: Automatic SL and TP for protectionRisk Disclaimer:This strategy is for educational and analysis purposes only. Always test in a simulation environment before using with real capital. Trading involves significant risks and may result in losses.Oct 11Release NotesadjustmentsOct 13Release NotesTradingView Indicator Update DescriptionIndicator NameStrategy with Reference LinesVersionv2.0General DescriptionIndicator that creates reference lines based on the previous candle of the configured timeframe, providing objective entry points and technical analysis.Main Features1. Timeframe ConfigurationSelection between: 1H, 2H, 3H, 4H, 6H, 12H, 1DAnalysis based on chosen timeframe, regardless of current chart timeframe2. Automatic Reference LinesGreen Line: Previous candle high (when candle was bullish)Red Line: Previous candle low (when candle was bearish)Yellow Line: Previous candle close (always present)Blue Line: Midpoint (50% between open and close)3. Informative LabelsExact prices of reference linesTemporal observation: "Wait for 1H elapsed from candle"Configured timeframe information4. Smart AlertsNotification when new timeframe candle closesComplete previous candle dataTemporal guidance for analysis5. Automatic Trading (Optional)Automatic entry based on previous candle directionTake Profit at midpoint (50%)Stop Loss at previous candle high/lowHow to UseInitial SetupSelect desired timeframe in inputEnable/disable automatic trading as neededApply indicator to chartLine InterpretationPrevious Bullish Candle: Green line at high + yellow line at closePrevious Bearish Candle: Red line at low + yellow line at closeMidpoint: Always present as blue line (TP reference)Recommended StrategyWait for candle close in configured timeframeObserve created reference linesWait 1 hour elapsed from candle for analysisUse lines as entry/exit pointsTechnical CharacteristicsCompatibilityWorks on any visualization timeframeUpdates only when on configured timeframeAccurate data from chosen timeframePerformanceOptimized calculation with request.security()lookahead_off and gaps_off parameters for precisionAutomatic new candle detectionCustomizationConfigurable line colorsAdjustable line stylesCustomizable label sizesVersion 2.0 UpdatesImplemented Improvements✅ Removal of trading texts (SELL/BUY/TP)✅ Addition of temporal observation "Wait for 1H elapsed"✅ Cleaner and more objective interface✅ Informative alerts without trading bias✅ Accurate configured timeframe dataTechnical Fixes✅ Correct new candle detection✅ Data consistent with Data Window✅ Multi-timeframe functionality✅ Optimized Pine Script v6 syntaxInstallation InstructionsCopy complete code from teste.txt filePaste into TradingView Pine Script editorSave and apply to chartConfigure desired timeframeEnable alerts if neededSupport and FeedbackVersion tested on multiple assetsCompatible with all marketsOptimized for objective technical analysisNote: This indicator provides only objective technical information. Always conduct your own analysis before making trading decisions.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView