PROTECTED SOURCE SCRIPT
Telah dikemas kini Punjabi Trader / Simple Trading Logics🎯

This Pine Script® code, under Mozilla Public License 2.0, is a trading strategy titled "Punjabi Trader / Simple Trading Logics🎯". It uses ATR to analyze price movements across multiple timeframes (7-140 periods) and generates buy/sell signals by comparing average open and close prices. Highly customizable, it allows users to set date ranges, price types (Open, Close, HL2, etc.), chart styles (Traditional/ATR), and visual options like colors and labels. Key features:
Date Range: Set start/end dates (default: April 1, 2025–January 1, 2030).
Timeframes: 7 to 140 periods for price analysis.
Price Types: Supports various price types for calculations.
Averages: Computes three averages (Avg1: open, Avg2: close, Avg3: mean) across timeframes.
Visuals: Custom plot colors, show/hide averages, and optional last-bar labels.
Strategy Logic: Buy signals when Avg1 < Avg2; sell when Avg1 > Avg2, within date range.
Alerts: Buy ("Buy Entry Taken!") and sell ("Sell Entry Taken!") alerts.
User-friendly with tooltips, grouped settings, and error checks (e.g., end date after start date).
ਇਹ ਪਾਈਨ ਸਕ੍ਰਿਪਟ® ਕੋਡ, ਮੋਜ਼ੀਲਾ ਪਬਲਿਕ ਲਾਇਸੰਸ 2.0 ਅਧੀਨ, "ਪੰਜਾਬੀ ਟਰੇਡਰ / ਸਧਾਰਨ ਵਪਾਰਕ ਲਾਜਿਕ🎯" ਵਪਾਰਕ ਰਣਨੀਤੀ ਹੈ। ਇਹ ਰੇਂਕੋ ਚਾਰਟਸ ਨਾਲ 7-140 ਅਵਧੀਆਂ ਵਿੱਚ ਮੁੱਲ ਗਤੀਆਂ ਦਾ ਵਿਸ਼ਲੇਸ਼ਣ ਕਰਦੀ ਹੈ ਅਤੇ ਔਸਤ ਖੋਲ੍ਹਣ/ਬੰਦ ਮੁੱਲਾਂ ਦੀ ਤੁਲਨਾ ਨਾਲ ਖਰੀਦੋ/ਵਿਕਰੀ ਸੰਕੇਤ ਪੈਦਾ ਕਰਦੀ ਹੈ। ਅਨੁਕੂਲਿਤ, ਇਹ ਤਾਰੀਖ ਰੇਂਜ, ਮੁੱਲ ਕਿਸਮਾਂ (ਖੋਲ੍ਹਣ, ਬੰਦ, HL2, ਆਦਿ), ਚਾਰਟ ਸਟਾਈਲ (ਪਰੰਪਰਾਗਤ/ATR ਰੇਂਕੋ), ਅਤੇ ਵਿਜ਼ੂਅਲ ਸੈਟਿੰਗਾਂ ਜਿਵੇਂ ਰੰਗ ਅਤੇ ਲੇਬਲ ਸੈੱਟ ਕਰਨ ਦਿੰਦੀ ਹੈ। ਮੁੱਖ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ:
ਤਾਰੀਖ ਰੇਂਜ: ਸ਼ੁਰੂ/ਅੰਤਮ ਤਾਰੀਖ ਸੈੱਟ ਕਰੋ (ਮੂਲ: 1 ਅਪ੍ਰੈਲ, 2025–1 ਜਨਵਰੀ, 2030)।
ਸਮਾਂ-ਸੀਮਾਵਾਂ: ਮੁੱਲ ਵਿਸ਼ਲੇਸ਼ਣ ਲਈ 7-140 ਅਵਧੀਆਂ।
ਮੁੱਲ ਕਿਸਮਾਂ: ਵੱਖ-ਵੱਖ ਮੁੱਲ ਕਿਸਮਾਂ ਦਾ ਸਮਰਥਨ।
ਔਸਤਾਂ: ਤਿੰਨ ਔਸਤਾਂ ਦੀ ਗਣਨਾ (Avg1: ਖੋਲ੍ਹਣ, Avg2: ਬੰਦ, Avg3: ਮੱਧਮਾਨ)।
ਵਿਜ਼ੂਅਲਸ: ਅਨੁਕੂਲਿਤ ਰੰਗ, ਔਸਤਾਂ ਵਿਖਾਉਣ/ਲੁਕਾਉਣ, ਅਤੇ ਵਿਕਲਪਿਕ ਲੇਬਲ।
ਰਣਨੀਤੀ ਲਾਜਿਕ: Avg1 < Avg2 ਹੋਵੇ ਤਾਂ ਖਰੀਦੋ; Avg1 > Avg2 ਹੋਵੇ ਤਾਂ ਵਿਕਰੀ, ਤਾਰੀਖ ਰੇਂਜ ਅੰਦਰ।
ਚੇਤਾਵਨੀਆਂ: ਖਰੀਦੋ ("ਖਰੀਦੋ ਐਂਟਰੀ!") ਅਤੇ ਵਿਕਰੀ ("ਵਿਕਰੀ ਐਂਟਰੀ!") ਚੇਤਾਵਨੀਆਂ।
ਵਰਤੋਂਕਾਰ-ਅਨੁਕੂਲ, ਟੂਲਟਿੱਪਸ, ਸਮੂਹਬੱਧ ਸੈਟਿੰਗਾਂ, ਅਤੇ ਗਲਤੀ ਜਾਂਚ (ਜਿਵੇਂ ਅੰਤਮ ਤਾਰੀਖ ਸ਼ੁਰੂ ਤੋਂ ਬਾਅਦ) ਨਾਲ।
Disclaimer
The "Punjabi Trader / Simple Trading Logics🎯" Pine Script® is for educational purposes only, not financial advice. Trading carries risks, including potential capital loss. Performance is not guaranteed, and past results don’t predict future outcomes. Users should research, consult a financial advisor, and test in a demo account before live trading. The author, Dshergill, is not liable for any losses. Use at your own risk.
"ਪੰਜਾਬੀ ਟਰੇਡਰ / ਸਧਾਰਨ ਵਪਾਰਕ ਲਾਜਿਕ🎯" ਪਾਈਨ ਸਕ੍ਰਿਪਟ® ਸਿਰਫ਼ ਸਿੱਖਿਆ ਲਈ ਹੈ, ਵਿੱਤੀ ਸਲਾਹ ਨਹੀਂ। ਵਪਾਰ ਵਿੱਚ ਜੋਖਮ ਹੈ, ਜਿਸ ਵਿੱਚ ਪੂੰਜੀ ਦਾ ਨੁਕਸਾਨ ਸ਼ਾਮਲ ਹੈ। ਕਾਰਗੁਜ਼ਾਰੀ ਦੀ ਗਾਰੰਟੀ ਨਹੀਂ, ਅਤੇ ਪਿਛਲੇ ਨਤੀਜੇ ਭਵਿੱਖ ਦੀ ਭਵਿੱਖਬਾਣੀ ਨਹੀਂ ਕਰਦੇ। ਖੋਜ ਕਰੋ, ਵਿੱਤੀ ਸਲਾਹਕਾਰ ਨਾਲ ਸਲਾਹ ਲਓ, ਅਤੇ ਲਾਈਵ ਵਪਾਰ ਤੋਂ ਪਹਿਲਾਂ ਡੈਮੋ ਵਿੱਚ ਜਾਂਚੋ। ਲੇਖਕ, Dshergill, ਕਿਸੇ ਨੁਕਸਾਨ ਲਈ ਜ਼ਿੰਮੇਵਾਰ ਨਹੀਂ। ਆਪਣੇ ਜੋਖਮ 'ਤੇ ਵਰਤੋ।
Date Range: Set start/end dates (default: April 1, 2025–January 1, 2030).
Timeframes: 7 to 140 periods for price analysis.
Price Types: Supports various price types for calculations.
Averages: Computes three averages (Avg1: open, Avg2: close, Avg3: mean) across timeframes.
Visuals: Custom plot colors, show/hide averages, and optional last-bar labels.
Strategy Logic: Buy signals when Avg1 < Avg2; sell when Avg1 > Avg2, within date range.
Alerts: Buy ("Buy Entry Taken!") and sell ("Sell Entry Taken!") alerts.
User-friendly with tooltips, grouped settings, and error checks (e.g., end date after start date).
ਇਹ ਪਾਈਨ ਸਕ੍ਰਿਪਟ® ਕੋਡ, ਮੋਜ਼ੀਲਾ ਪਬਲਿਕ ਲਾਇਸੰਸ 2.0 ਅਧੀਨ, "ਪੰਜਾਬੀ ਟਰੇਡਰ / ਸਧਾਰਨ ਵਪਾਰਕ ਲਾਜਿਕ🎯" ਵਪਾਰਕ ਰਣਨੀਤੀ ਹੈ। ਇਹ ਰੇਂਕੋ ਚਾਰਟਸ ਨਾਲ 7-140 ਅਵਧੀਆਂ ਵਿੱਚ ਮੁੱਲ ਗਤੀਆਂ ਦਾ ਵਿਸ਼ਲੇਸ਼ਣ ਕਰਦੀ ਹੈ ਅਤੇ ਔਸਤ ਖੋਲ੍ਹਣ/ਬੰਦ ਮੁੱਲਾਂ ਦੀ ਤੁਲਨਾ ਨਾਲ ਖਰੀਦੋ/ਵਿਕਰੀ ਸੰਕੇਤ ਪੈਦਾ ਕਰਦੀ ਹੈ। ਅਨੁਕੂਲਿਤ, ਇਹ ਤਾਰੀਖ ਰੇਂਜ, ਮੁੱਲ ਕਿਸਮਾਂ (ਖੋਲ੍ਹਣ, ਬੰਦ, HL2, ਆਦਿ), ਚਾਰਟ ਸਟਾਈਲ (ਪਰੰਪਰਾਗਤ/ATR ਰੇਂਕੋ), ਅਤੇ ਵਿਜ਼ੂਅਲ ਸੈਟਿੰਗਾਂ ਜਿਵੇਂ ਰੰਗ ਅਤੇ ਲੇਬਲ ਸੈੱਟ ਕਰਨ ਦਿੰਦੀ ਹੈ। ਮੁੱਖ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ:
ਤਾਰੀਖ ਰੇਂਜ: ਸ਼ੁਰੂ/ਅੰਤਮ ਤਾਰੀਖ ਸੈੱਟ ਕਰੋ (ਮੂਲ: 1 ਅਪ੍ਰੈਲ, 2025–1 ਜਨਵਰੀ, 2030)।
ਸਮਾਂ-ਸੀਮਾਵਾਂ: ਮੁੱਲ ਵਿਸ਼ਲੇਸ਼ਣ ਲਈ 7-140 ਅਵਧੀਆਂ।
ਮੁੱਲ ਕਿਸਮਾਂ: ਵੱਖ-ਵੱਖ ਮੁੱਲ ਕਿਸਮਾਂ ਦਾ ਸਮਰਥਨ।
ਔਸਤਾਂ: ਤਿੰਨ ਔਸਤਾਂ ਦੀ ਗਣਨਾ (Avg1: ਖੋਲ੍ਹਣ, Avg2: ਬੰਦ, Avg3: ਮੱਧਮਾਨ)।
ਵਿਜ਼ੂਅਲਸ: ਅਨੁਕੂਲਿਤ ਰੰਗ, ਔਸਤਾਂ ਵਿਖਾਉਣ/ਲੁਕਾਉਣ, ਅਤੇ ਵਿਕਲਪਿਕ ਲੇਬਲ।
ਰਣਨੀਤੀ ਲਾਜਿਕ: Avg1 < Avg2 ਹੋਵੇ ਤਾਂ ਖਰੀਦੋ; Avg1 > Avg2 ਹੋਵੇ ਤਾਂ ਵਿਕਰੀ, ਤਾਰੀਖ ਰੇਂਜ ਅੰਦਰ।
ਚੇਤਾਵਨੀਆਂ: ਖਰੀਦੋ ("ਖਰੀਦੋ ਐਂਟਰੀ!") ਅਤੇ ਵਿਕਰੀ ("ਵਿਕਰੀ ਐਂਟਰੀ!") ਚੇਤਾਵਨੀਆਂ।
ਵਰਤੋਂਕਾਰ-ਅਨੁਕੂਲ, ਟੂਲਟਿੱਪਸ, ਸਮੂਹਬੱਧ ਸੈਟਿੰਗਾਂ, ਅਤੇ ਗਲਤੀ ਜਾਂਚ (ਜਿਵੇਂ ਅੰਤਮ ਤਾਰੀਖ ਸ਼ੁਰੂ ਤੋਂ ਬਾਅਦ) ਨਾਲ।
Disclaimer
The "Punjabi Trader / Simple Trading Logics🎯" Pine Script® is for educational purposes only, not financial advice. Trading carries risks, including potential capital loss. Performance is not guaranteed, and past results don’t predict future outcomes. Users should research, consult a financial advisor, and test in a demo account before live trading. The author, Dshergill, is not liable for any losses. Use at your own risk.
"ਪੰਜਾਬੀ ਟਰੇਡਰ / ਸਧਾਰਨ ਵਪਾਰਕ ਲਾਜਿਕ🎯" ਪਾਈਨ ਸਕ੍ਰਿਪਟ® ਸਿਰਫ਼ ਸਿੱਖਿਆ ਲਈ ਹੈ, ਵਿੱਤੀ ਸਲਾਹ ਨਹੀਂ। ਵਪਾਰ ਵਿੱਚ ਜੋਖਮ ਹੈ, ਜਿਸ ਵਿੱਚ ਪੂੰਜੀ ਦਾ ਨੁਕਸਾਨ ਸ਼ਾਮਲ ਹੈ। ਕਾਰਗੁਜ਼ਾਰੀ ਦੀ ਗਾਰੰਟੀ ਨਹੀਂ, ਅਤੇ ਪਿਛਲੇ ਨਤੀਜੇ ਭਵਿੱਖ ਦੀ ਭਵਿੱਖਬਾਣੀ ਨਹੀਂ ਕਰਦੇ। ਖੋਜ ਕਰੋ, ਵਿੱਤੀ ਸਲਾਹਕਾਰ ਨਾਲ ਸਲਾਹ ਲਓ, ਅਤੇ ਲਾਈਵ ਵਪਾਰ ਤੋਂ ਪਹਿਲਾਂ ਡੈਮੋ ਵਿੱਚ ਜਾਂਚੋ। ਲੇਖਕ, Dshergill, ਕਿਸੇ ਨੁਕਸਾਨ ਲਈ ਜ਼ਿੰਮੇਵਾਰ ਨਹੀਂ। ਆਪਣੇ ਜੋਖਮ 'ਤੇ ਵਰਤੋ।
Nota Keluaran
**Punjabi Trader / Simple Trading Logics (PTL)** This strategy trades average price levels across multiple timeframes. It also plots gamma candles to visualize normalized price action.
**What It Does**:
- Averages open and close prices from 20 timeframes .
- Trades long when the open average is below the close average, or short when above, within a set date range.
- Plots gamma candles to show price relative to recent highs and lows.
**How to Use**:
- **Date Range**: Set start and end dates for trading.
- **Brick Size**: Choose a size (e.g., 4, 8, or 12).
- **Price Types**: Select open or close prices for averages.
- **Gamma Candles**: Set the lookback period (20–50 for short-term, 50–100 for swing trading) and colors.
- **Plots**: Show/hide average lines and gamma candles; adjust colors and offsets.
- Works well for volatile assets (e.g., crypto, forex) on 1-minute to 1-hour charts.
**Notes**:
- Gamma candles are for visualization only, not used in trading decisions.
- Inputs use Punjabi and English for accessibility.
- Backtest within the date range before trading.
Nota Keluaran
Reduced total local scopes to well below the 550 limit, ensuring the script compiles.No change in functionality: same timeframe groups, "All Groups" timeframes, and chart behavior.
Improved maintainability with concise, array-based logic. Thanks with Regads Najoomi ji
Nota Keluaran
This Pine Script strategy leverages Renko charts and multi-timeframe price analysis to generate trading signals based on averaged price levels, complemented by gamma candle visualization for trend confirmation. Designed for versatility, it suits various trading styles, from scalping to swing trading, across different asset classes.**How It Works**:
- **Renko Charts**: The strategy uses Renko charts (Traditional or ATR-based) with a user-defined brick size to filter market noise and focus on significant price movements.
- **Multi-Timeframe Analysis**: It fetches two price types (e.g., Open and Close) across 20 user-selected timeframes (e.g., 1–20 minutes, 2–40 minutes, etc.), calculating their averages (`Avg1`, `Avg2`) and a combined mean (`Avg3`). These averages provide a smoothed view of price trends across multiple horizons.
- **Trading Logic**: Buy signals trigger when `Avg1` (e.g., Open average) falls below `Avg2` (e.g., Close average), indicating potential bullish momentum. Sell signals occur when `Avg1` exceeds `Avg2`, suggesting bearish pressure. Trades are executed within a user-defined date range.
- **Gamma Candles**: A supplementary feature plots pseudo-candles based on a normalized price metric (gamma), calculated over a lookback period (default 100 bars). Gamma normalizes the price source (e.g., Close) within the high-low range, helping traders visualize trend strength and reversals.
- **Visuals and Alerts**: The strategy plots `Avg1`, `Avg2`, and `Avg3` with customizable colors and offsets, labels key levels, and supports alerts for buy/sell signals, enhancing real-time decision-making.
**How to Use**:
- **Inputs**:
- **Date Range**: Set the start and end dates to define the trading period.
- **Timeframe Group**: Select a group of timeframes (e.g., 1–20 minutes for scalping, 12–240 minutes for swing trading).
- **Price Types**: Choose two price metrics (e.g., Open, Close) for averaging.
- **Brick Size**: Adjust the Renko brick size (e.g., 0.8 for volatile assets, 3 for stable ones).
- **Chart Style**: Select Traditional or ATR-based Renko charts.
- **Plot Settings**: Toggle and customize the display of `Avg1`, `Avg2`, `Avg3`, and gamma candles.
- **ABG Length**: Set the lookback period for gamma candles (e.g., 20–50 for short-term, 100–200 for long-term).
- **Interpretation**:
- Monitor `Avg1` vs. `Avg2` crossovers for buy/sell signals, confirmed by gamma candle trends (bullish blue or bearish gray).
- Use plotted averages and labels to identify support/resistance or trend continuation.
- Set alerts to receive notifications for trade entries.
- **Tips**:
- For scalping, use smaller timeframes (e.g., 1–20 minutes) and a shorter ABG length (e.g., 20).
- For swing trading, opt for larger timeframes (e.g., 12–240 minutes) and a brick size suited to the asset’s volatility.
- Test the strategy on historical data to optimize brick size and timeframe settings.
This strategy combines Renko-based price filtering with multi-timeframe averaging and gamma candle analysis, offering traders a robust tool for trend-following and reversal strategies.
Nota Keluaran
updateSkrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.