TF7 Option vs Index Change RatioOverview
This indicator helps traders visualise the strength and direction of an option's price movement compared to its underlying index (NIFTY or SENSEX).
It calculates a Change Ratio, which is the percentage move in the option compared to the index movement during the same bar. This is especially useful for intraday traders looking for signs of momentum, divergence, or unusual strength/weakness in option pricing.
How It Works
The ratio is calculated as:
(Option LTP − Option Open) / (Index Close − Index Open)
The value is capped between −10 and +10 to filter out extreme or invalid spikes.
The ratio is displayed as a color-coded column chart:
🟩 Green bars: Option is moving in the same direction as the index.
🟥 Red bars: Option is underperforming or moving opposite to the index.
A compact table shows the last 5 bars of:
Option price change (with +/− sign)
Index price change
Calculated ratio (also color-coded)
You can toggle the table visibility in the settings.
Inputs & Features
Select underlying index: NIFTY or SENSEX
Toggle the data table display
Clean formatting with signed values and conditional color highlights
⚠️ Disclaimer
This is a visual analysis tool, not a buy/sell signal. Always validate with your trading strategy and risk management
#OptionsTrading, #NIFTY, #SENSEX, #ChangeRatio, #IndexAnalysis, #Momentum, #Divergence, #Intraday
Indicatori e strategie
ATOMO SNRAUTO plot 1 hour support to resistencce and resistance to support levels as break out line with red levels for shorts and yellow level for long
designed to mark htf snr structure while we executed entries on a 5 mins time frame
Q2A_CandlestickPatterns# Q2A Candlestick Patterns Library
A comprehensive Pine Script v6 library for detecting 44 candlestick patterns with trend detection and property calculations.
## 📋 Overview
The **Q2A_CandlestickPatterns** library provides a complete toolkit for identifying traditional Japanese candlestick patterns in TradingView. It includes both reversal and continuation patterns, organized by the number of candles required (1, 2, 3, and 5 candles).
### Key Features
- ✅ **44 Pattern Detection Functions** - Comprehensive coverage of major candlestick patterns
- ✅ **Organized by Candle Count** - Easy navigation (1, 2, 3, and 5 candle patterns)
- ✅ **Bullish/Bearish/Neutral Classification** - Clear signal categorization
- ✅ **Detailed Pattern Descriptions** - Each pattern returns name, type, and explanation
- ✅ **Property Calculation Helper** - Core function for analyzing candle characteristics
- ✅ **Clean Q2A Code Style** - Professional, maintainable, and well-documented
## 🚀 Quick Start
### Installation
```pinescript
import Quant2Alpha/Q2A_CandlestickPatterns/1 as candlePatterns
```
### Basic Usage Example
```pinescript
//@version=6
indicator("Candlestick Pattern Detector", overlay=true)
import Quant2Alpha/Q2A_CandlestickPatterns/1 as cp
// Calculate candle properties
= cp.calculateCandleProperties(open, close, high, low, ta.ema(close - open, 14), 5.0, 10.0, 10.0)
// Define trend
upTrend = close > ta.sma(close, 50)
downTrend = close < ta.sma(close, 50)
// Detect patterns
= cp.detectHammerBullish(smallBody, body, bodyLo, hl2, dnShadow, 2.0, hasUpShadow, downTrend)
= cp.detectShootingStarBearish(smallBody, body, bodyHi, hl2, upShadow, 2.0, hasDnShadow, upTrend)
// Visualize
if hammerDetected
label.new(bar_index, low, hammerName, style=label.style_label_up, color=color.green, textcolor=color.white, size=size.small, tooltip=hammerDesc)
if shootingStarDetected
label.new(bar_index, high, shootingStarName, style=label.style_label_down, color=color.red, textcolor=color.white, size=size.small, tooltip=shootingStarDesc)
```
## 📚 Library Structure
### Core Function
#### `calculateCandleProperties()`
Calculates essential candlestick properties for pattern detection.
**Parameters:**
- `p_open`, `p_close`, `p_high`, `p_low` - OHLC prices
- `bodyAvg` - Average body size (e.g., EMA of body sizes)
- `shadowPercent` - Minimum shadow size as % of body (typically 5.0)
- `shadowEqualsPercent` - Tolerance for equal shadows (typically 10.0)
- `dojiBodyPercent` - Max body size as % of range for doji (typically 10.0)
**Returns:** 17 properties including body dimensions, shadows, and candle characteristics
## 📊 Available Patterns
### Single Candle Patterns (13 patterns)
#### Bullish (5)
| Pattern | Function | Description |
| --------------------- | -------------------------------- | ----------------------------------------------------------- |
| **Hammer** | `detectHammerBullish()` | Small body at top, long lower shadow, forms in downtrend |
| **Inverted Hammer** | `detectInvertedHammerBullish()` | Small body at bottom, long upper shadow, forms in downtrend |
| **Marubozu White** | `detectMarubozuWhiteBullish()` | Long green body with little to no shadows |
| **Long Lower Shadow** | `detectLongLowerShadowBullish()` | Lower shadow is 75%+ of total range |
| **Dragonfly Doji** | `detectDragonflyDojiBullish()` | Doji with long lower shadow, no upper shadow |
#### Bearish (5)
| Pattern | Function | Description |
| --------------------- | -------------------------------- | --------------------------------------------------------- |
| **Hanging Man** | `detectHangingManBearish()` | Small body at top, long lower shadow, forms in uptrend |
| **Shooting Star** | `detectShootingStarBearish()` | Small body at bottom, long upper shadow, forms in uptrend |
| **Marubozu Black** | `detectMarubozuBlackBearish()` | Long red body with little to no shadows |
| **Long Upper Shadow** | `detectLongUpperShadowBearish()` | Upper shadow is 75%+ of total range |
| **Gravestone Doji** | `detectGravestoneDojiBearish()` | Doji with long upper shadow, no lower shadow |
#### Neutral (3)
| Pattern | Function | Description |
| ---------------------- | -------------------------- | --------------------------------------------- |
| **Doji** | `detectDoji()` | Open equals close, indicates indecision |
| **Spinning Top White** | `detectSpinningTopWhite()` | Small green body with long shadows both sides |
| **Spinning Top Black** | `detectSpinningTopBlack()` | Small red body with long shadows both sides |
### Two Candle Patterns (15 patterns)
#### Bullish (7)
| Pattern | Function | Description |
| ------------------------ | ------------------------------ | ------------------------------------------------------ |
| **Rising Window** | `detectRisingWindowBullish()` | Gap up between two candles in uptrend |
| **Tweezer Bottom** | `detectTweezerBottomBullish()` | Two candles with identical lows in downtrend |
| **Piercing** | `detectPiercingBullish()` | Green candle closes above midpoint of prior red candle |
| **Doji Star Bullish** | `detectDojiStarBullish()` | Doji gaps down after red candle in downtrend |
| **Engulfing Bullish** | `detectEngulfingBullish()` | Large green candle engulfs prior small red candle |
| **Harami Bullish** | `detectHaramiBullish()` | Small green candle contained in prior large red candle |
| **Harami Cross Bullish** | `detectHaramiCrossBullish()` | Doji contained in prior large red candle |
#### Bearish (8)
| Pattern | Function | Description |
| ------------------------ | ------------------------------- | ------------------------------------------------------ |
| **On Neck** | `detectOnNeckBearish()` | Small green closes near prior red candle's low |
| **Falling Window** | `detectFallingWindowBearish()` | Gap down between two candles in downtrend |
| **Tweezer Top** | `detectTweezerTopBearish()` | Two candles with identical highs in uptrend |
| **Dark Cloud Cover** | `detectDarkCloudCoverBearish()` | Red candle closes below midpoint of prior green candle |
| **Doji Star Bearish** | `detectDojiStarBearish()` | Doji gaps up after green candle in uptrend |
| **Engulfing Bearish** | `detectEngulfingBearish()` | Large red candle engulfs prior small green candle |
| **Harami Bearish** | `detectHaramiBearish()` | Small red candle contained in prior large green candle |
| **Harami Cross Bearish** | `detectHaramiCrossBearish()` | Doji contained in prior large green candle |
### Three Candle Patterns (14 patterns)
#### Bullish (7)
| Pattern | Function | Description |
| -------------------------- | ----------------------------------- | ------------------------------------------------ |
| **Upside Tasuki Gap** | `detectUpsideTasukiGapBullish()` | Three candles with gap that fails to close |
| **Morning Doji Star** | `detectMorningDojiStarBullish()` | Red, gapped doji, green - stronger morning star |
| **Morning Star** | `detectMorningStarBullish()` | Red, small middle, green - classic reversal |
| **Three White Soldiers** | `detectThreeWhiteSoldiersBullish()` | Three consecutive long green candles |
| **Abandoned Baby Bullish** | `detectAbandonedBabyBullish()` | Doji gaps away from both surrounding candles |
| **Tri-Star Bullish** | `detectTriStarBullish()` | Three dojis with gaps between them |
| **Kicking Bullish** | `detectKickingBullish()` | Black marubozu followed by gapped white marubozu |
#### Bearish (7)
| Pattern | Function | Description |
| -------------------------- | ---------------------------------- | ------------------------------------------------ |
| **Downside Tasuki Gap** | `detectDownsideTasukiGapBearish()` | Three candles with gap that fails to close |
| **Evening Doji Star** | `detectEveningDojiStarBearish()` | Green, gapped doji, red - stronger evening star |
| **Evening Star** | `detectEveningStarBearish()` | Green, small middle, red - classic reversal |
| **Three Black Crows** | `detectThreeBlackCrowsBearish()` | Three consecutive long red candles |
| **Abandoned Baby Bearish** | `detectAbandonedBabyBearish()` | Doji gaps away from both surrounding candles |
| **Tri-Star Bearish** | `detectTriStarBearish()` | Three dojis with gaps between them |
| **Kicking Bearish** | `detectKickingBearish()` | White marubozu followed by gapped black marubozu |
### Five Candle Patterns (2 patterns)
#### Bullish (1)
| Pattern | Function | Description |
| ------------------------ | ----------------------------------- | ----------------------------------------------------- |
| **Rising Three Methods** | `detectRisingThreeMethodsBullish()` | Long green, three small reds inside range, long green |
#### Bearish (1)
| Pattern | Function | Description |
| ------------------------- | ------------------------------------ | --------------------------------------------------- |
| **Falling Three Methods** | `detectFallingThreeMethodsBearish()` | Long red, three small greens inside range, long red |
## 💡 Advanced Usage Examples
### Multi-Pattern Strategy
```pinescript
//@version=6
strategy("Multi-Pattern Strategy", overlay=true)
import Quant2Alpha/Q2A_CandlestickPatterns/1 as cp
// Setup
bodyAvg = ta.ema(math.abs(close - open), 14)
= cp.calculateCandleProperties(open, close, high, low, bodyAvg, 5.0, 10.0, 10.0)
// Trends
sma50 = ta.sma(close, 50)
sma200 = ta.sma(close, 200)
upTrend = close > sma50 and sma50 > sma200
downTrend = close < sma50 and sma50 < sma200
// Detect bullish patterns
= cp.detectHammerBullish(smallBody, body, bodyLo, hl2, dnShadow, 2.0, hasUpShadow, downTrend)
= cp.detectEngulfingBullish(downTrend, whiteBody, longBody, blackBody, smallBody, close, open)
= cp.detectMorningStarBullish(longBody, smallBody, downTrend, blackBody, whiteBody, bodyHi, bodyLo, bodyMiddle)
// Detect bearish patterns
= cp.detectShootingStarBearish(smallBody, body, bodyHi, hl2, upShadow, 2.0, hasDnShadow, upTrend)
= cp.detectDarkCloudCoverBearish(upTrend, whiteBody, longBody, blackBody, open, high, close, bodyMiddle)
= cp.detectEveningStarBearish(longBody, smallBody, upTrend, whiteBody, blackBody, bodyLo, bodyHi, bodyMiddle)
// Entry signals
bullishSignal = hammer or engulfing or morningStar
bearishSignal = shootingStar or darkCloud or eveningStar
// Execute trades
if bullishSignal and strategy.position_size == 0
strategy.entry("Long", strategy.long)
if bearishSignal and strategy.position_size > 0
strategy.close("Long")
```
### Pattern Scanner Indicator
```pinescript
//@version=6
indicator("Pattern Scanner", overlay=true)
import Quant2Alpha/Q2A_CandlestickPatterns/1 as cp
// Configuration
showBullish = input.bool(true, "Show Bullish Patterns")
showBearish = input.bool(true, "Show Bearish Patterns")
showNeutral = input.bool(false, "Show Neutral Patterns")
// Calculate properties
bodyAvg = ta.ema(math.abs(close - open), 14)
= cp.calculateCandleProperties(open, close, high, low, bodyAvg, 5.0, 10.0, 10.0)
// Trends
upTrend = close > ta.sma(close, 50)
downTrend = close < ta.sma(close, 50)
// Scan for all patterns and display
// (Add pattern detection and visualization logic here)
```
## 🔧 Configuration Best Practices
### Recommended Parameter Values
| Parameter | Typical Value | Description |
| ---------------------- | ----------------------------- | ------------------------------- |
| `bodyAvg` | `ta.ema(abs(close-open), 14)` | 14-period EMA of body size |
| `shadowPercent` | `5.0` | 5% of body for shadow detection |
| `shadowEqualsPercent` | `10.0` | 10% tolerance for equal shadows |
| `dojiBodyPercent` | `10.0` | Body ≤10% of range = doji |
| `factor` (hammer/star) | `2.0` | Shadow should be 2x body size |
### Trend Definition
```pinescript
// Simple SMA crossover
upTrend = close > ta.sma(close, 50)
downTrend = close < ta.sma(close, 50)
// Double SMA confirmation
upTrend = close > ta.sma(close, 50) and ta.sma(close, 50) > ta.sma(close, 200)
downTrend = close < ta.sma(close, 50) and ta.sma(close, 50) < ta.sma(close, 200)
// EMA trend
upTrend = close > ta.ema(close, 20)
downTrend = close < ta.ema(close, 20)
```
## 📖 Function Return Format
All pattern detection functions return a tuple with 4 elements:
```pinescript
```
- **detected** (bool) - `true` if pattern is found, `false` otherwise
- **name** (string) - Pattern name (e.g., "Hammer", "Shooting Star")
- **type** (string) - "Bullish", "Bearish", or "Neutral"
- **description** (string) - Detailed explanation of the pattern
### Example
```pinescript
= cp.detectHammerBullish(...)
if isHammer
log.info("Pattern: " + patternName) // "Hammer"
log.info("Type: " + patternType) // "Bullish"
log.info("Info: " + patternInfo) // Full description
```
## 🎯 Pattern Reliability
### High Reliability (Strong Signals)
- Engulfing patterns (Bullish/Bearish)
- Morning/Evening Star formations
- Three White Soldiers / Three Black Crows
- Hammer / Shooting Star (with confirmation)
### Medium Reliability (Use with Confirmation)
- Harami patterns
- Piercing / Dark Cloud Cover
- Tweezer Top/Bottom
- Doji Star patterns
### Context-Dependent (Require Trend Analysis)
- Window patterns (gaps)
- Kicking patterns
- Tasuki Gap patterns
- Three Methods patterns
## 📝 Notes
- **Trend Context is Critical**: Most reversal patterns require proper trend identification for accuracy
- **Confirmation Recommended**: Wait for next candle confirmation before taking action
- **Volume Matters**: Consider volume alongside patterns (not included in this library)
- **Multiple Timeframes**: Check patterns across multiple timeframes for stronger signals
- **Risk Management**: Always use stop losses regardless of pattern strength
## 🔗 Integration with Other Indicators
This library works well with:
- Moving averages (trend confirmation)
- RSI/Stochastic (overbought/oversold)
- Volume indicators (confirmation)
- Support/Resistance levels (context)
- ATR (position sizing)
## 📄 License
This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
## 👤 Author
© Quant2Alpha
## 🆘 Support
For issues, questions, or contributions, please refer to the QUANT2ALPHA documentation or community channels.
---
**Version:** 1.0
**Pine Script Version:** 6
**Last Updated:** 2025
Combined EMA (5, 9, 21)Updated script to add up and down arrows when EMAS cross. Prints a green down arrow when the 5 ema crosses below the 9 Ema and a black down arrow when the 5 crosses below the 21. It also prints a red up arrow when the 9 crosses above the 5 and when the 5 crosses above the 21
MACD Cross Long/Short Alert📌 MACD Cross Long/Short Alert — Indicator Description
📌 MACD 上/下穿信号线提醒指标说明
🇺🇸 English Description
This indicator provides clean and actionable MACD cross alerts, designed for traders who need quick “long/short” signals based on MACD line and Signal line interactions.
Key Features
Standard MACD Calculation
Uses customizable Fast EMA, Slow EMA, and Signal EMA.
Cross-Based Trading Signals
Bullish Cross (MACD crossover Signal) → Long setup
Bearish Cross (MACD crossunder Signal) → Short setup
Chart Markers
Triangles plotted directly on the chart for fast visual recognition.
Built-in Alerts
Automatically triggers alerts when MACD crosses above/below the signal line.
Works with any timeframe and any asset.
Use Cases
Intraday trend reversal detection
Momentum confirmation
Breakout retest validation
Simple auto-trading signal for strategies/robots
Quick scalp entries on 5m/10m/30m
This MACD tool is ideal for traders who need a fast, reliable long/short trigger without unnecessary complexity.
🇨🇳 中文说明
本指标提供 MACD 上穿/下穿信号线的即时做多/做空提醒,适用于所有周期与品种,是一个简洁、实用的趋势转折信号工具。
主要功能
标准 MACD 计算
快线 EMA、慢线 EMA、Signal EMA 均可自定义。
交叉交易信号
上穿 Signal → 多头信号(做多)
下穿 Signal → 空头信号(做空)
图表标记
图中自动绘制上/下三角形,方便肉眼快速发现信号。
内置警报提醒
自动推送 MACD 上下穿事件,可用于:
APP 推送
邮件提醒
自动化策略触发
日内做单提醒
适用场景
日内反转捕捉(5m / 10m / 30m)
动量确认
趋势切换点识别
回踩/突破后的方向确认
自动交易机器人信号源
Multi Timeframe Trend IndicatorDiscreet visual display across 4 timeframes (adjustable). If you trade on a 5-minute timeframe, for example, you have an all-in-one visual display across the 4 higher timeframes (e.g., m15, m30, h1 and h4) for better decision-making.
Weekly Inside Bar Zoneweekly inside bar on lower timeframe charts creates zones for breakout and failures
Sectors Comparison with Auto LabelsThis indicator creates a label which updates with the chart value.
2 MACD VISUEL — 4H / 1H / 15M + CONFIRMATION 5M//@version=6
indicator("MTF MACD VISUEL — 4H / 1H / 15M + CONFIRMATION 5M", overlay=true, max_labels_count=500)
// ─────────────────────────────
// Fonction MACD Histogram
// ─────────────────────────────
f_macd(src) =>
fast = ta.ema(src, 12)
slow = ta.ema(src, 26)
macd = fast - slow
signal = ta.ema(macd, 9)
hist = macd - signal
hist
// ─────────────────────────────
// MTF MACD HISTOGRAM
// ─────────────────────────────
h4 = request.security(syminfo.tickerid, "240", f_macd(close))
h1 = request.security(syminfo.tickerid, "60", f_macd(close))
h15 = request.security(syminfo.tickerid, "15", f_macd(close))
h5 = request.security(syminfo.tickerid, "5", f_macd(close))
// Signes
s4 = h4 > 0 ? 1 : h4 < 0 ? -1 : 0
s1 = h1 > 0 ? 1 : h1 < 0 ? -1 : 0
s15 = h15 > 0 ? 1 : h15 < 0 ? -1 : 0
s5 = h5 > 0 ? 1 : h5 < 0 ? -1 : 0
// Conditions
three_same = (s4 == s1) and (s1 == s15) and (s4 != 0)
five_same = three_same and (s5 == s4)
// BUY / SELL logiques
isBUY = five_same and s4 == 1
isSELL = five_same and s4 == -1
// ─────────────────────────────
// DASHBOARD VISUEL (en haut du graphique)
// ─────────────────────────────
var table dash = table.new(position.top_right, 4, 2, border_color=color.black)
table.cell(dash, 0, 0, "4H", bgcolor = s4 == 1 ? color.green : s4 == -1 ? color.red : color.gray)
table.cell(dash, 1, 0, "1H", bgcolor = s1 == 1 ? color.green : s1 == -1 ? color.red : color.gray)
table.cell(dash, 2, 0, "15M", bgcolor = s15 == 1 ? color.green : s15 == -1 ? color.red : color.gray)
table.cell(dash, 3, 0, "5M", bgcolor = s5 == 1 ? color.green : s5 == -1 ? color.red : color.gray)
table.cell(dash, 0, 1, s4 == 1 ? "↑" : s4 == -1 ? "↓" : "·", bgcolor=color.new(color.black, 0), text_color=color.white)
table.cell(dash, 1, 1, s1 == 1 ? "↑" : s1 == -1 ? "↓" : "·", bgcolor=color.new(color.black, 0), text_color=color.white)
table.cell(dash, 2, 1, s15 == 1 ? "↑" : s15 == -1 ? "↓" : "·", bgcolor=color.new(color.black, 0), text_color=color.white)
table.cell(dash, 3, 1, s5 == 1 ? "↑" : s5 == -1 ? "↓" : "·", bgcolor=color.new(color.black, 0), text_color=color.white)
// ─────────────────────────────
// SIGNES VISUELS SUR LE GRAPHIQUE
// ─────────────────────────────
plotshape(isBUY, title="BUY", style=shape.triangleup, location=location.belowbar, color=color.green, size=size.large, text="BUY")
plotshape(isSELL, title="SELL", style=shape.triangledown, location=location.abovebar, color=color.red, size=size.large, text="SELL")
// Histogramme du MACD 5M en couleur tendance
plot(h5, title="MACD Hist 5M", color = h5 >= 0 ? color.green : color.red, style=plot.style_columns)
// ─────────────────────────────
// Alerte Webhook (message constant OBLIGATOIRE)
// ─────────────────────────────
alertcondition(isBUY, title="Signal BUY Confirmé", message="MTF_MACD_BUY")
alertcondition(isSELL, title="Signal SELL Confirmé", message="MTF_MACD_SELL")
Algoticks.in: MA Crossover Strategy (Sample)MA Crossover Strategy - User Guide
Overview
This is a Moving Average Crossover strategy that generates trading signals when a fast MA crosses a slow MA. It integrates with Algoticks.in API for automated trading on Delta Exchange.
Strategy Logic
Long Signal: When Fast MA crosses above Slow MA
Short Signal: When Fast MA crosses below Slow MA
Automatically closes opposite positions before entering new ones
Quick Setup
1. Add to TradingView
Open TradingView and go to the chart
Click "Pine Editor" at the bottom
Paste the script code
Click "Add to Chart"
2. Configure Strategy Parameters
Strategy Settings
Fast MA Length (default: 9): Shorter moving average period
Slow MA Length (default: 21): Longer moving average period
MA Type : Choose SMA (Simple) or EMA (Exponential)
General API Settings
Paper Trading : Enable for testing without real money
Signal Type : Choose "Trading Signal" (default) for tracking
Exchange : DELTA (Delta Exchange)
Segment :
futures - Perpetual contracts
options - Call/Put options
spot - Spot trading
Order Settings: Basic
Quantity : Number of contracts (e.g., 1, 0.5, 2)
Validity :
GTC - Good Till Cancelled
IOC - Immediate or Cancel
FOK - Fill or Kill
DAY - Day order
Product : cross_margin or isolated_margin
Order Settings: Entry Type
Choose how orders are executed:
Market Order : Immediate fill at best price
Limit Order : Fill at specified price or better
Stop Market : Triggers at stop price, then market order
Stop Limit : Triggers at stop price, then limit order
Entry Prices (for Limit/Stop orders)
Limit Price:
Price : The value to use
Type : Last Price / Mark Price / Index Price
Mode :
Absolute - Exact price (e.g., 65000)
Relative - Offset from entry price
% Checkbox : If checked, relative uses percentage; if unchecked, uses points
Example:
Absolute: 65000 → Order at exactly 65000
Relative 1% (checked): Entry ± 1% of entry price
Relative 100 (unchecked): Entry ± 100 points
Trigger Price: Same logic as Limit Price, used for Stop orders
Exit / Bracket Prices (SL/TP)
Stop Loss (SL):
Type : Price type to monitor (Mark Price recommended)
Mode : Absolute or Relative
% : Percentage or points
SL : Stop loss value (e.g., 2 for 2%)
Trig : Optional trigger price (creates Stop-Limit SL)
Take Profit (TP): Same structure as SL
Example:
Long entry at 65000, SL = 2% → Exit at 63700 (65000 - 2%)
Short entry at 65000, TP = 3% → Exit at 63050 (65000 - 3%)
3. Options Trading Setup (Only if Segment = Options)
Strike Selection Method
User Defined Mode:
Manually specify exact strike and option type
Best for: Trading specific levels
Required fields:
Strike Price : e.g., "65000"
Option Type : Call or Put
Dynamic Mode:
System calculates strike based on ATM price
Best for: Automated strategies
Required fields:
Algo Type : Options Buying or Selling
Strike Offset : 0 (ATM), +1 (above ATM), -1 (below ATM)
Strike Interval : Gap between strikes (e.g., BTC: 500, ETH: 50)
Expiry Date Formats:
T+0 - Today
T+1 - Tomorrow
current week - This Friday
next week - Next Friday
current month - Last Friday of month
131125 - Specific date (13 Nov 2025)
4. Create Alert for Automation
Right-click on chart → "Add Alert"
Condition : Select your strategy name
Alert Actions : Webhook URL
Webhook URL : Your Algoticks.in API endpoint
Message : Leave as {{strategy.order.alert_message}} (contains JSON)
Click "Create"
The alert will automatically send JSON payloads to your API when signals occur.
Example Configurations
Simple Futures Trading
Strategy: Fast MA = 9, Slow MA = 21, SMA
Segment: futures
Order Type: market_order
Quantity: 1
SL: 2% (Relative)
TP: 4% (Relative)
Options Buying (Dynamic)
Segment: options
Strike Selection: Dynamic
Algo Type: Options Buying Algo
Strike Offset: 0 (ATM)
Strike Interval: 500 (for BTC)
Expiry: current week
Order Type: market_order
Conservative Spot Trading
Segment: spot
Order Type: limit_order
Limit Price: 0.5% (Relative)
Quantity: 0.1
No SL/TP (manual management)
Important Notes
Paper Trading First : Always test with paper trading enabled before live trading
Order Tags : Automatically generated for tracking (max 18 chars)
Position Management : Strategy closes opposite positions automatically
Signal Confirmation : Uses barstate.isconfirmed to prevent repainting
JSON Payload : All settings are converted to JSON and sent via webhook
Troubleshooting
No signals : Check if MAs are crossing on your timeframe
Orders not executing : Verify webhook URL and API credentials
Wrong strikes : Double-check Strike Interval for your asset
SL/TP not working : Ensure values are non-zero and mode is correct
Support
For API setup and connector configuration, see CONNECTOR_SETUP_GUIDE.md or visit Algoticks.in documentation.
MyLibrary with listLibrary "MyLibrary"
fun(x)
- This has a dot
1. This has a number
Parameters:
x (float) : TODO:
- This has a dot
1. This has a number
1MTF MACD Alignement XAUUSD - Webhook v6//@version=6
indicator("MTF MACD Alignement XAUUSD - Webhook v6", overlay=false)
// ===== Paramètres utilisateur =====
fast_len = input.int(12, "Fast Length")
slow_len = input.int(26, "Slow Length")
signal_len = input.int(9, "Signal Length")
repl_secret = input.string(title="Webhook secret (doit matcher WEBHOOK_SECRET)", defval="Covid-19@2020")
// ===== Fonction MACD histogramme =====
f_macd_hist(src) =>
macd = ta.ema(src, fast_len) - ta.ema(src, slow_len)
signal = ta.ema(macd, signal_len)
hist = macd - signal
hist
// ===== Récupération multi-timeframe =====
hist4h = request.security(syminfo.tickerid, "240", f_macd_hist(close), lookahead=barmerge.lookahead_off)
hist1h = request.security(syminfo.tickerid, "60", f_macd_hist(close), lookahead=barmerge.lookahead_off)
hist15m = request.security(syminfo.tickerid, "15", f_macd_hist(close), lookahead=barmerge.lookahead_off)
hist5m = request.security(syminfo.tickerid, "5", f_macd_hist(close), lookahead=barmerge.lookahead_off)
// ===== Signes de MACD =====
s4 = hist4h > 0 ? 1 : (hist4h < 0 ? -1 : 0)
s1 = hist1h > 0 ? 1 : (hist1h < 0 ? -1 : 0)
s15 = hist15m > 0 ? 1 : (hist15m < 0 ? -1 : 0)
s5 = hist5m > 0 ? 1 : (hist5m < 0 ? -1 : 0)
// ===== Vérification alignement TF supérieurs =====
three_same = (s4 != 0) and (s4 == s1) and (s1 == s15)
// ===== Confirmation 5M =====
five_in_same = three_same and (s5 == s4)
// ===== Préparation du JSON pour webhook =====
signal_type = s4 == 1 ? "BUY" : (s4 == -1 ? "SELL" : "NEUTRAL")
alert_json = '{"secret":"'+repl_secret+'","symbol":"'+syminfo.ticker+'","signal":"'+signal_type+'","time":"'+str.tostring(time, "yyyy-MM-dd HH:mm:ss")+'","aligned": }'
// ===== Alertcondition compilable =====
// v6 n’accepte pas message dynamique, donc on met un message fixe
alertcondition(five_in_same and ta.change(five_in_same), title="MACD Align + 5M confirm", message="MACD alignement détecté")
// ===== Affichage optionnel des histogrammes =====
plot(hist4h, title="hist 4H", color=color.new(color.green, 0), linewidth=1)
plot(hist1h, title="hist 1H", color=color.new(color.blue, 0), linewidth=1)
plot(hist15m, title="hist 15M", color=color.new(color.orange, 0), linewidth=1)
plot(hist5m, title="hist 5M", color=color.new(color.purple, 0), linewidth=1)
Trillotron 5000 Checklist AssistantTrillotron 5000’s Checklist Assistant is a complete multi-factor trading confirmation system designed to help traders avoid low-quality entries and only take high-probability setups.
The indicator evaluates market structure, multi-timeframe EMA alignment, volume, ATR, key levels, and candle confirmation to determine whether a chart meets the full criteria for a CALL (bullish) or PUT (bearish) setup.
When all conditions align, the indicator highlights the chart with a colored background (green for CALL, red for PUT) and prints a clear signal label on the bar. This tool helps reinforce discipline, reduce impulsive trades, and support consistent decision-making across all timeframes.
Moving Averages (all Types) MTF colored! by Moin-TradingEnglish 🇬🇧
Title: Moving Averages (all Types) MTF colored!
Short Description:
By Moin-Trading. A customizable Moving Average Ribbon that automatically colors the lines green if the closing price is above the MA, and red if the price is below it. Based on the classic "MA Ribbon" indicator.
Description:
This indicator, provided by Moin-Trading, is based on the structure of the popular "Moving Average Ribbon" (MA Ribbon) indicator, but enhances it with powerful dynamic color coding and full MA type flexibility.
It offers a visually intuitive tool for market analysis. It plots four individually adjustable moving averages (MAs) on your chart and applies dynamic color coding based on current price action.
Key Features:
Dynamic Coloring: Each MA line automatically turns green if the current close price is greater than or equal to the MA (bullish sentiment), and red if the price is below it (bearish sentiment). This allows for a quick visual assessment of the trend relative to multiple timeframes.
Four Customizable MAs: Track up to four different moving averages simultaneously (defaulting to 20, 50, 100, 200 periods).
MA Type Flexibility: The indicator supports all MA types (SMA, EMA, RMA, WMA, VWMA), with EMA set as the default.
MTF (Multi-Timeframe): The timeframe = "" setting allows you to run the indicator on any desired timeframe to view higher-timeframe MAs on your current chart.
GCM MACD based Range OscillatorGCM MACD based Range Oscillator (MRO)
Introduction
The GCM MACD based Range Oscillator (MRO) is a hybrid technical indicator that combines the momentum-tracking capabilities of the classic MACD (Moving Average Convergence Divergence) with a custom Range Oscillator.
The core problem this script solves is normalization. Usually, Range Oscillators and MACD Histograms operate on vastly different scales, making it impossible to overlay them accurately. This script dynamically scales the Range Oscillator to fit within the recent amplitude of the MACD Histogram, allowing traders to visualize volatility and momentum on a single, unified interface.
How It Works (The Math)
1. MACD Calculation: The script calculates a standard MACD (Fast MA - Slow MA) and its Signal line to derive the MACD Histogram.
2. Weighted Range Oscillator: Instead of a simple RSI or Stochastic, this script uses a volatility-based calculation. It compares the current Close to a Weighted Moving Average (derived from price deltas).
3. Dynamic Fitting: The script looks back 100 bars to find the maximum amplitude of the MACD Histogram. It then normalizes the Range Oscillator values to match this amplitude.
4. Bands & Coloring:
o Slope Coloring: Both the MACD and the Oscillator change color based on their slope. Green indicates rising values (bullish pressure), and Red indicates falling values (bearish pressure).
o Fixed Bands: Horizontal bands are placed at +0.75 and -0.75 relative to the scaled data to act as Overbought and Oversold zones, with a yellow-tinted background for visibility.
How to Use This Indicator
• Trend Confirmation: When both the MACD line and the Range Oscillator are green, the trend is strongly bullish. When both are red, the trend is bearish.
• Contraction & Expansion: The yellow zone (between -0.75 and +0.75) represents the "equilibrium" or ranging area. Breakouts above the Upper Band (+0.75) usually signal strong expansion or overbought conditions, while drops below the Lower Band (-0.75) signal oversold conditions.
• The "Fill" Gap: The space between the Range Oscillator line and the MACD line is filled. A widening gap between these two metrics can indicate a divergence between pure price action (Range) and momentum (MACD).
• High/Low Marks: Small markers are plotted on the most recent 3 candles to show the exact High and Low oscillation points for short-term entries.
Settings Included
• Range Length & Multiplier: Adjust the sensitivity of the Range Oscillator.
• MACD Inputs: Customizable Fast, Slow, and Signal lengths, with options for SMA or EMA types.
• Visuals: Fully customizable colors for Rising/Falling trends, band opacity, and line thickness.
How this follows House Rules
1. Originality:
o Rule: You cannot simply upload a generic MACD.
o Compliance: This is not a standard MACD. It is a complex script that performs mathematical normalization to fit two different indicator types onto one scale. The "Dynamic Fitting" logic makes it unique.
2. Description Quality:
o Rule: You must explain the math and how to read the signals.
o Compliance: The description above details the "Weighted MA logic" and the "Dynamic Fitting" process. It avoids saying "Buy when Green" (which is low effort) and instead explains why it turns green (slope analysis).
3. Visuals:
o Rule: Plots must be clear and not cluttered.
o Compliance: The script uses overlay=false (separate pane). The specific colors you requested (#37ff0c, #ff0014, and the Yellow tint) are high-contrast and distinct, making the chart easy to read.
4. No "Holy Grail" Claims:
o Rule: Do not promise guaranteed profits.
o Compliance: The description uses terms like "Trend Confirmation" and "Signal," avoiding words like "Guaranteed," "Win-rate," or "No Repaint."
Diganta ATR LevelsThis Script Plots the ATR levels based on the following logic
1. The Open price of 9.15 is considered.
2. Then based on the Open Price the ATR levels are plotted.
3. The ATR length is 180
4. ATR multiplier is 1 ( extended by 25% on both sides)
🚀 Enhanced BUY & SELL Pullback ScannerThis script help to find the scan the script. this sis dor testing



















