Exit Strategy is important than Entry Strategy!Exit Strategy is important than Entry Strategy!
Simple strategy get large profit!
"entry"に関するスクリプトを検索
LongSetups with Entry Signals and Trailing Stop(HA)High probable Long Setups for any time frame and asset.
75+ win rate
Trailing stop always used as exit point
To trade only with the trand - enable MAs in the Inputs tab
x - means Entry signal is active and waiting for long validation
B - on a closed bar is entry signal for long
C - on a developing bar is exit long signal
Green line - long validation line. must close above to go long
Pink line - trailing stop
On Long Entry alert - use Once Per Bar Close option.
On Long Exit alert (Trailing stop triggered) - use Once Per Bar option to trigger sooner and protect your capital.
Always do your own analysis and make trades on your own risk. Find a confluence point where everything aligns and make your own decision. Don't enter a trade because the indicator tells you so. You are free to make a copy of the script and change it to your own needs for your own personal use.
RSI/MFI - MTF - Entry signals/Trend colored bars - JD@version=2
This indicator is designed to give early entry signals as well as to follow trend moves, according to different settings.
The indicator shows a histogram of the RSI ro MFI in relation to an ema of the RSI or MFI.
The histogram is then smoothed to give early reversal/entry signals.
The actual RSI/MFI line with oversold/overbought indication can be displayed or omitted, as preferred.
in addition to the RSI/MFI line or as an alternative to it, the background colour can be set to change folowing the RSI/MFI signals.
The timeframe can be chosen. Higher timeframes (eg. 3h) tend to give less false signals.
version 5.
added support for custom Multiple Time Frame selection.
added option for choice of RSI or MFI as base indicator.
added option for price bar coloring according to the indicator. (deselecting "borders" in the "style" tab is recommended)
price bar coloring can be adjusted for different strategies:
1. following the slope of the histogram (for faster entry/exit signals)
2. according to positive or negative histogram (for longer moves)
3. according to pos. or neg. RSI/MFI (for longer term trend holds)
4. uptrend: biased towards faster buy signals and slower sell signals to stay in the uptrend
5. downtrend: biased towards faster sell signals and slower buy signals to stay in the downtrend
A longer timeframe (eg. 3x) is recommended for following trend moves.
try different strategies to see what works better for RSI or MFI.
JD.
Revolution Entry IndicatorSimple entry indicator where the entry is decided by the relative strength of each individual candle.
RSI-MTF-Histo-EntryThis indicator gives a histogram of RSI in relation to an ema of the RSI.
The histogram is then smoothed to reduce false signals.
The actualiteit RSI line with overbought/overvols signals can be added or omitted as preferred.
The background can be color coded if the RSI is above or below 50.
Version 2. Added support for MTF. Longer timesframes (1h-3h) tend to give better entry results.
As an example the indicator was added two times, one for the current timeframe and one for a longer timeframe.
MULTIPLE TIME-FRAME STRATEGY(TREND, MOMENTUM, ENTRY) Hey everyone, this is one strategy that I have found profitable over time. It is a multiple time frame strategy that utilizes 3 time-frames. Highest time-frame is the trend, medium time-frame is the momentum and short time-frame is the entry point.
Long Term:
- If closed candle is above entry then we are looking for longs, otherwise we are looking for shorts
Medium Term:
- If Stoch SmoothK is above or below SmoothK and the momentum matches long term trend then we look for entries.
Short Term:
- If a moving average crossover(long)/crossunder(short) occurs then place a trade in the direction of the trend.
Close Trade:
- Trade is closed when the Medium term SmoothK Crosses under/above SmoothD.
You can mess with the settings to get the best Profit Factor / Percent Profit that matches your plan.
Best of luck!
T3 Entry and ExitI made this indicator to give clear entry and exit signals plus give signals when I should add onto my trades with no repainting!! The bottom indicator is set to 34 (the default settings). This gives me my entries and exits as shown by the green and red arrow. I use a 14 period setting for my signals to add onto my trade. If I am in a long trade as shown in the chart above and the 14 period T3EE has a fast line cross under the slow line and then a cross back over and I have not had my signal to close trade yet on the 34 period T3EE I will add to my long position. I cut the size of they order in half with each addition to my position. So if I entered with 2 lots I would add 1 lot with my first signal to add (shown by orange arrow) and then .5 lots with the second signal to add to my position and so on until it is time to close the position. If you day trade avoid entering positions between 4pm est and 9pm est. and the larger the ranges and the more trendy the market the better. Good Luck!!!
If you have any questions let me know :)
Price Action + Support/Resistance with LabelsEntry Conditions:
Long Entry (BUY): Based on the bullish engulfing pattern and price being above the resistance level.
Short Entry (SELL): For demonstration, the short entry condition is set as price being below the support level and a bullish candle in the previous bar. You can modify this logic for your own use case.
Stop Loss and Take Profit:
Stoploss is plotted at the calculated stop loss level.
Target is plotted at the calculated take profit level.
Labels:
For long trades, labels are added with "BUY", "STOPLOSS", and "TARGET".
For short trades (if enabled), labels are added with "SELL", "STOPLOSS", and "TARGET".
Labels are placed using label.new at specific locations on the chart (above or below bars).
Alert Conditions:
Alerts are created for both long and short entry signals so you can get notified when the entry conditions are met.
How it works:
BUY label will appear below the bar when a long entry condition is met.
SELL label will appear above the bar when a short entry condition is met.
STOPLOSS and TARGET labels will appear at their respective levels when an entry signal is triggered.
The labels will appear on the chart to give you a clear visual cue of the entry, stop loss, and take profit levels.
How to Use:
Copy the script into your Pine Editor on TradingView and apply it to your chart.
Observe the labels that show up on the chart:
"BUY" will appear below the bar when long conditions are met.
"SELL" will appear above the bar when short conditions are met (if using short logic).
"STOPLOSS" will be plotted at the stop loss level.
"TARGET" will be plotted at the take profit level.
Optional Customization:
You can modify the short entry condition based on your preferred method.
You can adjust the length for the support/resistance calculation, the stopLossRR, and other parameters to fine-tune the strategy for Nifty 50 or any other asset.
Let me know if you have any further questions or need additional modifications!
MACD + RSI + EMA + BB + ATR Day Trading StrategyEntry Conditions and Signals
The strategy implements a multi-layered filtering approach to entry conditions, requiring alignment across technical indicators, timeframes, and market conditions .
Long Entry Requirements
Trend Filter: Fast EMA (9) must be above Slow EMA (21), price must be above Fast EMA, and higher timeframe must confirm uptrend
MACD Signal: MACD line crosses above signal line, indicating increasing bullish momentum
RSI Condition: RSI below 70 (not overbought) but above 40 (showing momentum)
Volume & Volatility: Current volume exceeds 1.2x 20-period average and ATR shows sufficient market movement
Time Filter: Trading occurs during optimal hours (9:30-11:30 AM ET) when market volatility is typically highest
Exit Strategies
The strategy employs multiple exit mechanisms to adapt to changing market conditions and protect profits :
Stop Loss Management
Initial Stop: Placed at 2.0x ATR from entry price, adapting to current market volatility
Trailing Stop: 1.5x ATR trailing stop that moves up (for longs) or down (for shorts) as price moves favorably
Time-Based Exits: All positions closed by end of trading day (4:00 PM ET) to avoid overnight risk
Best Practices for Implementation
Settings
Chart Setup: 5-minute timeframe for execution with 15-minute chart for trend confirmation
Session Times: Focus on 9:30-11:30 AM ET trading for highest volatility and opportunity
Perfect OrderEntry Point
How to Entry
Perfect Order Entry
SMA5,13,21 & EMA75,90,200
Please enjoy your entry
ENTRY CONFIRMATION V2An indicator from candle man. Helps determine whether supply and demand zone are truly supply or demand.
Entry Percent: EssamThis Pine Script code is designed to perform the task of computing and showcasing the profit percentage, profit value, and the duration for which a specific asset is held, all in real-time. The script effectively leverages the built-in resources to provide a seamless and robust experience, as it presents the calculated figures in an easily readable format on the chart, without causing any lag or disruptions to the chart.
MA_Script- Entry Point : base on MA20, MA50, MA100, MA200.
- Exit Point : base on stop loss, MA and trailing stop.
sa-strategy with HTF-TSLEntry- based on HA close above HMA confirmation done with ST and HTF ATR
Exit- based on close below ATR which works as trailing SL
[MV] %B with SMA + Volume Based Colored Bars
Entry Signal when %B Crosses with SMA and this is more meaningful if it supports colored bars.
Black Bar when prices go down and volume is bigger than 150% of its average, that indicates us price action is supported by a strong bearish volume
Blue Bar when prices go up and volume bigger than 150% of its average, that indicates us price action is supported by a strong bullish volume
VBC author @KIVANCfr3762
FX Sniper: T3-CCI Strategy - With 100 IndicatorsEntry signal when moving above -100, sell signal when going below 100
Amazing Crossover SystemEntry Rules
BUY when the 5 EMA crosses above the 10 EMA from underneath and the RSI crosses above the 50.0 mark from the bottom.
SELL when the 5 EMA crosses below the 10 EMA from the top and the RSI crosses below the 50.0 mark from the top.
Make sure that the RSI did cross 50.0 from the top or bottom and not just ranging tightly around the level.
How to setup Alert:
1) Add the Amazing Crossover System to your chart via Indicators
2) Find your currency pair
3) Set the timeframe on the chart to 1 hour
4) Press 'Alt + A' (create alert shortcut)
5) Set the following criteria for the alert:
Condition = 'Amazing Crossover System', Plot, ' BUY Signal'
The rest of the alert can be customized to your preferences
5) Repeat steps 1 - 4, but set the Condition = 'Amazing Crossover System', Plot, ' SELL Signal'
Universal ORB Strategy v2 # Universal ORB **v2** — Pine v6 Strategy
Opening Range Breakout strategy with a compact, real-time HUD, risk-managed exits, and guardrails to avoid late entries.
---
## Table of Contents
- (#what-it-does)
- (#quick-start)
- (#recommended-timeframes--sessions)
- (#inputs-reference)
- (#how-trades-trigger-logic-flow)
- (#risk--exits-r-multiples)
- (#hud-guide)
- (#plots--labels)
- (#backtesting-tips)
- (#live-trading-tips)
- (#troubleshooting)
- (#example-presets)
- (#user-journey-example)
- (#install--run)
- (#changelog)
- (#disclaimer)
---
## What It Does
- Builds an **Opening Range (OR)** from the **first _N_ minutes** after session open.
- Goes **long** on breaks **above** OR high; **short** on breaks **below** OR low.
- Optional **filters**:
- **Minimum OR width** (skip tiny, choppy ranges).
- **Volume filter** (current volume must exceed SMA).
- **Entry guard** (only allow entries ≤ _X_ bars after the initial break).
- **Risk-managed exits**:
- Stop based on **ATR × multiplier**.
- Two profit targets (**TP1**, **TP2**) at configurable **R multiples** (50/50 split).
---
## Quick Start
1. **Add the script** to a chart in TradingView (see (#install--run)).
2. In **Settings → Inputs**:
- Set **Session** (e.g., `0930-1600` for US equities; a daily boundary for crypto).
- Set **First N Minutes** (common: **5**, **15**, **30**).
- Optionally enable **Volume Filter** and set a **Min OR Width**.
3. Pick a timeframe (1m–15m typical).
4. After the first N minutes, the OR locks. Breakouts that pass filters/guard will **auto-enter** with TP/SL attached.
5. Review results in **Strategy Tester**. Tweak inputs to fit your market.
---
## Recommended Timeframes & Sessions
| Market | Session Example | First N Minutes | Chart Timeframe | Notes |
|-------------|-------------------|----------------:|----------------:|------|
| US Equities | `0930-1600` | 5–30 | **1m–5m** | 5–15m OR is common; 1–3m chart for precision. |
| Futures | RTH or chosen day | 5–30 | 1m–5m | Use exchange RTH if you trade regular hours only. |
| Crypto | `0000-2359` (or preferred daily reset) | 15–60 | **3m–15m** | 24/7—pick a consistent daily open to define OR. |
**Heuristics**
- Shorter **N** → more trades, more noise.
- Longer **N** → fewer trades, higher average quality.
- Increase **Min OR Width** for very volatile symbols.
---
## Inputs Reference
### Opening Range
- **Session** (`0930-1600` by default): Trading window that defines each session/day.
- **First N Minutes**: Minutes after session open used to build the OR high/low.
### Filters
- **Min OR Width (points)**: Minimum acceptable range height; `0` disables.
- **Enable Volume Filter**: Requires `volume > SMA(volume, len)`.
- **Volume SMA Length**: Period for volume SMA.
### Risk / Targets
- **ATR Length**: ATR period for stop calculation.
- **ATR ×**: Stop distance multiplier (`stop = ATR × multiplier`).
- **TP1 = R Multiple**: First target measured in R (risk units).
- **TP2 = R Multiple**: Second target measured in R.
### Entry Guard
- **Max Bars After Break**: Reject entries that occur more than _X_ bars after the initial break.
### Visuals
- **Plot OR High/Low**: Draw the OR lines (forming vs locked).
- **Show Break Labels**: “LONG/SHORT” markers at entries.
---
## How Trades Trigger (Logic Flow)
1. **Build OR** during the first _N_ minutes of the session (track highest high & lowest low).
2. When _N_ minutes pass, **OR locks**.
3. **Detect breakouts**:
- **Up-break** when `close` crosses **above** OR high.
- **Down-break** when `close` crosses **below** OR low.
4. **Check filters**:
- **Min OR Width** (if set) must pass.
- **Volume Filter** (if enabled) must pass.
- **Entry Guard** must pass (bars since initial break ≤ limit).
5. **Place entry** (long/short) with attached **stop** (ATR-based) and **two targets** (TP1, TP2).
6. **Exit logic**: TP1 and TP2 each close **50%** of the position; stop exits the remainder.
---
## Risk & Exits (R Multiples)
- **R** = stop distance (entry price to stop).
- Example (long): ATR-based stop is **100** points below entry ⇒ **1R = 100**.
- **TP1 @ 1R** = entry + 100
- **TP2 @ 2R** = entry + 200
- Default split: **50%** size to TP1, **50%** to TP2.
Tune via **ATR Length**, **ATR ×**, and **TP1/TP2** R settings.
---
## HUD Guide
Compact table in the **top-right** with real-time updates on the live bar.
| Row | Meaning |
|------------|---------|
| **Universal ORB v2 / Filters + Guard** | Header |
| **OR Mode** | “First N Min” |
| **OR Hi / OR Lo** | Current OR levels (forming, then locked) |
| **Width** | OR High − OR Low |
| **Break** | Direction of the **last** break: Up / Down / None |
| **Setup** | Playbook hint: Await Break / Await Retest Long / Await Retest Short |
| **Position** | Above Range / Below Range / In Range |
| **Min OR** | PASS / FAIL |
| **VolFilt** | ON (PASS) / ON (FAIL) / OFF |
| **Stop/TP** | Current stop and TP levels (contextual) |
| **Guard** | “≤X | now:Y” bars since initial break |
---
## Plots & Labels
- **OR High/Low**
- Translucent while forming; solid after locking.
- **Entry Labels**
- “LONG” plotted above bar on up-break entries; “SHORT” below bar on down-break entries.
---
## Backtesting Tips
- Use **1m–5m** charts for intraday ORB on equities/futures; **3m–15m** for crypto.
- Keep the **Session** aligned with the instrument (RTH vs 24h).
- Experiment with:
- **First N Minutes**: 5 / 15 / 30
- **ATR ×**: 1.0–2.0
- **Min OR Width**: symbol-specific
- **Volume Filter**: often helpful in chop
- Evaluate **Net Profit**, **Max Drawdown**, **Win Rate**, and **Trade Count**—avoid over-filtering to zero trades.
---
## Live Trading Tips
- Account for **spread & slippage**; avoid targets unrealistically close to entry.
- If you find yourself chasing, **tighten Entry Guard**.
- If you’re getting chopped, **increase N** and/or **Min OR Width**, and consider enabling **Volume Filter**.
- Many traders prefer **“first valid break only”** per session—consider that as a personal rule.
---
## Troubleshooting
- **No trades:**
- OR might still be forming.
- Filters may be blocking (Min Width, Volume, Guard).
- Session may not match the instrument/time.
- **Too many trades:**
- Increase **First N Minutes** or **Min OR Width**; enable **Volume Filter**.
- **Labels/lines missing:**
- Ensure **Visuals** toggles are on in Settings.
---
## Example Presets
**Equities (active, early breakout)**
- Session: `0930-1600`
- First N Minutes: **5–15**
- Timeframe: **1m–3m**
- Min OR Width: start around **0.2–0.5%** of price (symbol-dependent)
- Volume Filter: **ON**, Length **20**
- Entry Guard: **≤ 3 bars**
**Futures (RTH breakout)**
- Session: Exchange RTH
- First N Minutes: **15–30**
- Timeframe: **1m–5m**
- Volume Filter: ON
- ATR ×: **1.5**
- TP1/TP2: **1R / 2R**
**Crypto (daily OR)**
- Session: `0000-2359` (or chosen reset)
- First N Minutes: **30–60**
- Timeframe: **3m–15m**
- Min OR Width: ON (tune per pair)
- Volume Filter: optional (exchange-dependent)
---
## User Journey Example
**Persona:** Sam, intraday trader on US equities, likes momentum out of the open.
1. **Add to Chart**
Sam opens the AAPL 1-minute chart, pastes the script into TradingView Pine Editor, and hits **Add to chart**.
2. **Configure**
- Session: `0930-1600`
- First N Minutes: `15`
- Min OR Width: `0.4` (about ~0.25–0.5% of typical AAPL price)
- Volume Filter: **ON**, Length `20`
- Entry Guard: `3` bars
- ATR ×: `1.5`, TP1 `1R`, TP2 `2R`
3. **Observe the Open**
From 9:30 to 9:45, the HUD shows **OR Hi/Lo** forming. After 9:45, the range locks and OR lines turn solid.
4. **First Breakout**
Price pops above **OR High** at ~9:47. The HUD shows **Break: Up**. Volume passes; Min Width passes; within 3 bars of the break. Strategy enters **LONG** with ATR stop and two targets.
5. **Trade Management**
The HUD line **Stop/TP** displays current SL and both TPs. Sam watches TP1 fill quickly; TP2 trails behind and eventually fills on extension. If price reverses, the ATR stop is there to cap the loss.
6. **Review & Iterate**
After the close, Sam checks **Strategy Tester** results. The day looks solid, but on a different symbol the range was too tight, so Sam increases **Min OR Width** to avoid similar chop tomorrow.
---
## Install / Run
1. Open **TradingView → Pine Editor**.
2. Paste the **Universal ORB v2 (Pine v6)** code.
3. Click **Add to chart**.
4. Open **Settings** to configure inputs per your market/timeframe.
> The strategy is written for **Pine Script v6**.
---
## Changelog
- **v2**
- Consolidated docs and naming.
- Compact, real-time HUD with clear status rows.
- ORB logic with Min Width, Volume filter, and Entry guard.
- ATR-based stop and dual TP exits (R-based).
---
## Disclaimer
This script is for educational purposes only and **not financial advice**. Markets involve risk. Test thoroughly in a simulator before using on live capital.
News Volatility Bracketing StrategyThis is a news-volatility bracketing strategy. Five seconds before a scheduled release, the strategy brackets price with a buy-stop above and a sell-stop below (OCO), then converts the untouched side into nothing while the filled side runs with a 1:1 TP/SL set the same distance from entry. Distances are configurable in USD or %, so it scales to the instrument and can run on 1-second data (or higher TF with bar-magnifier). The edge it’s trying to capture is the immediate, one-directional burst and liquidity vacuum that often follows market-moving news—entering on momentum rather than predicting direction. Primary risks are slippage/spread widening and whipsaws right after the print, which can trigger an entry then snap back to the stop.
Big Candle Identifier with RSI Divergence and Advanced Stops1. Strategy Objective
The main goal of this strategy is to:
Identify significant price momentum (big candles).
Enter trades at opportune moments based on market signals (candlestick patterns and RSI divergence).
Limit initial risk through a fixed stop loss.
Maximize profits by using a trailing stop that activates only after the trade moves a specified distance in the profitable direction.
2. Components of the Strategy
A. Big Candle Identification
The strategy identifies big candles as indicators of strong momentum.
A big candle is defined as:
The body (absolute difference between close and open) of the current candle (body0) is larger than the bodies of the last five candles.
The candle is:
Bullish Big Candle: If close > open.
Bearish Big Candle: If open > close.
Purpose: Big candles signal potential continuation or reversal of trends, serving as the primary entry trigger.
B. RSI Divergence
Relative Strength Index (RSI): A momentum oscillator used to detect overbought/oversold conditions and divergence.
Fast RSI: A 5-period RSI, which is more sensitive to short-term price movements.
Slow RSI: A 14-period RSI, which smoothens fluctuations over a longer timeframe.
Divergence: The difference between the fast and slow RSIs.
Positive divergence (divergence > 0): Bullish momentum.
Negative divergence (divergence < 0): Bearish momentum.
Visualization: The divergence is plotted on the chart, helping traders confirm momentum shifts.
C. Stop Loss
Initial Stop Loss:
When entering a trade, an immediate stop loss of 200 points is applied.
This stop loss ensures the maximum risk is capped at a predefined level.
Implementation:
Long Trades: Stop loss is set below the entry price at low - 200 points.
Short Trades: Stop loss is set above the entry price at high + 200 points.
Purpose:
Prevents significant losses if the price moves against the trade immediately after entry.
D. Trailing Stop
The trailing stop is a dynamic risk management tool that adjusts with price movements to lock in profits. Here’s how it works:
Activation Condition:
The trailing stop only starts trailing when the trade moves 200 ticks (profit) in the right direction:
Long Position: close - entry_price >= 200 ticks.
Short Position: entry_price - close >= 200 ticks.
Trailing Logic:
Once activated, the trailing stop:
For Long Positions: Trails behind the price by 150 ticks (trail_stop = close - 150 ticks).
For Short Positions: Trails above the price by 150 ticks (trail_stop = close + 150 ticks).
Exit Condition:
The trade exits automatically if the price touches the trailing stop level.
Purpose:
Ensures profits are locked in as the trade progresses while still allowing room for price fluctuations.
E. Trade Entry Logic
Long Entry:
Triggered when a bullish big candle is identified.
Stop loss is set at low - 200 points.
Short Entry:
Triggered when a bearish big candle is identified.
Stop loss is set at high + 200 points.
F. Trade Exit Logic
Trailing Stop: Automatically exits the trade if the price touches the trailing stop level.
Fixed Stop Loss: Exits the trade if the price hits the predefined stop loss level.
G. 21 EMA
The strategy includes a 21-period Exponential Moving Average (EMA), which acts as a trend filter.
EMA helps visualize the overall market direction:
Price above EMA: Indicates an uptrend.
Price below EMA: Indicates a downtrend.
H. Visualization
Big Candle Identification:
The open and close prices of big candles are plotted for easy reference.
Trailing Stop:
Plotted on the chart to visualize its progression during the trade.
Green Line: Indicates the trailing stop for long positions.
Red Line: Indicates the trailing stop for short positions.
RSI Divergence:
Positive divergence is shown in green.
Negative divergence is shown in red.
3. Key Parameters
trail_start_ticks: The number of ticks required before the trailing stop activates (default: 200 ticks).
trail_distance_ticks: The distance between the trailing stop and price once the trailing stop starts (default: 150 ticks).
initial_stop_loss_points: The fixed stop loss in points applied at entry (default: 200 points).
tick_size: Automatically calculates the minimum tick size for the trading instrument.
4. Workflow of the Strategy
Step 1: Entry Signal
The strategy identifies a big candle (bullish or bearish).
If conditions are met, a trade is entered with a fixed stop loss.
Step 2: Initial Risk Management
The trade starts with an initial stop loss of 200 points.
Step 3: Trailing Stop Activation
If the trade moves 200 ticks in the profitable direction:
The trailing stop is activated and follows the price at a distance of 150 ticks.
Step 4: Exit the Trade
The trade is exited if:
The price hits the trailing stop.
The price hits the initial stop loss.
5. Advantages of the Strategy
Risk Management:
The fixed stop loss ensures that losses are capped.
The trailing stop locks in profits after the trade becomes profitable.
Momentum-Based Entries:
The strategy uses big candles as entry triggers, which often indicate strong price momentum.
Divergence Confirmation:
RSI divergence helps validate momentum and avoid false signals.
Dynamic Profit Protection:
The trailing stop adjusts dynamically, allowing the trade to capture larger moves while protecting gains.
6. Ideal Market Conditions
This strategy performs best in:
Trending Markets:
Big candles and momentum signals are more effective in capturing directional moves.
High Volatility:
Larger price swings improve the probability of reaching the trailing stop activation level (200 ticks).
Arena TP Manager//@version=5
indicator("Arena TP Manager", overlay=true, max_labels_count=500)
// === INPUTS ===
entryPrice = input.float(0.0, "Entry Price", step=0.1)
stopLossPerc = input.float(5.0, "Stop Loss %", step=0.1)
tp1Perc = input.float(10.0, "TP1 %", step=0.1)
tp2Perc = input.float(20.0, "TP2 %", step=0.1)
tp3Perc = input.float(30.0, "TP3 %", step=0.1)
// === CALCULATIONS ===
stopLoss = entryPrice * (1 - stopLossPerc/100)
tp1 = entryPrice * (1 + tp1Perc/100)
tp2 = entryPrice * (1 + tp2Perc/100)
tp3 = entryPrice * (1 + tp3Perc/100)
// === PLOTTING ===
plot(entryPrice > 0 ? entryPrice : na, title="Entry", color=color.yellow, linewidth=2, style=plot.style_linebr)
plot(entryPrice > 0 ? stopLoss : na, title="Stop Loss", color=color.red, linewidth=2, style=plot.style_linebr)
plot(entryPrice > 0 ? tp1 : na, title="TP1", color=color.green, linewidth=2, style=plot.style_linebr)
plot(entryPrice > 0 ? tp2 : na, title="TP2", color=color.green, linewidth=2, style=plot.style_linebr)
plot(entryPrice > 0 ? tp3 : na, title="TP3", color=color.green, linewidth=2, style=plot.style_linebr)
// === LABELS ===
if (entryPrice > 0)
label.new(bar_index, entryPrice, "ENTRY: " + str.tostring(entryPrice), style=label.style_label_up, color=color.yellow, textcolor=color.black)
label.new(bar_index, stopLoss, "SL: " + str.tostring(stopLoss), style=label.style_label_down, color=color.red, textcolor=color.white)
label.new(bar_index, tp1, "TP1: " + str.tostring(tp1), style=label.style_label_up, color=color.green, textcolor=color.white)
label.new(bar_index, tp2, "TP2: " + str.tostring(tp2), style=label.style_label_up, color=color.green, textcolor=color.white)
label.new(bar_index, tp3, "TP3: " + str.tostring(tp3), style=label.style_label_up, color=color.green, textcolor=color.white)
Nef33 Forex & Crypto Trading Signals PRO
1. Understanding the Indicator's Context
The indicator generates signals based on confluence (trend, volume, key zones, etc.), but it does not include predefined SL or TP levels. To establish them, we must:
Use dynamic or static support/resistance levels already present in the script.
Incorporate volatility (such as ATR) to adjust the levels based on market conditions.
Define a risk/reward ratio (e.g., 1:2).
2. Options for Determining SL and TP
Below, I provide several ideas based on the tools available in the script:
Stop Loss (SL)
The SL should protect you from adverse movements. You can base it on:
ATR (Volatility): Use the smoothed ATR (atr_smooth) multiplied by a factor (e.g., 1.5 or 2) to set a dynamic SL.
Buy: SL = Entry Price - (atr_smooth * atr_mult).
Sell: SL = Entry Price + (atr_smooth * atr_mult).
Key Zones: Place the SL below a support (for buys) or above a resistance (for sells), using Order Blocks, Fair Value Gaps, or Liquidity Zones.
Buy: SL below the nearest ob_lows or fvg_lows.
Sell: SL above the nearest ob_highs or fvg_highs.
VWAP: Use the daily VWAP (vwap_day) as a critical level.
Buy: SL below vwap_day.
Sell: SL above vwap_day.
Take Profit (TP)
The TP should maximize profits. You can base it on:
Risk/Reward Ratio: Multiply the SL distance by a factor (e.g., 2 or 3).
Buy: TP = Entry Price + (SL Distance * 2).
Sell: TP = Entry Price - (SL Distance * 2).
Key Zones: Target the next resistance (for buys) or support (for sells).
Buy: TP at the next ob_highs, fvg_highs, or liq_zone_high.
Sell: TP at the next ob_lows, fvg_lows, or liq_zone_low.
Ichimoku: Use the cloud levels (Senkou Span A/B) as targets.
Buy: TP at senkou_span_a or senkou_span_b (whichever is higher).
Sell: TP at senkou_span_a or senkou_span_b (whichever is lower).
3. Practical Implementation
Since the script does not automatically draw SL/TP, you can:
Calculate them manually: Observe the chart and use the levels mentioned.
Modify the code: Add SL/TP as labels (label.new) at the moment of the signal.
Here’s an example of how to modify the code to display SL and TP based on ATR with a 1:2 risk/reward ratio:
Modified Code (Signals Section)
Find the lines where the signals (trade_buy and trade_sell) are generated and add the following:
pinescript
// Calculate SL and TP based on ATR
atr_sl_mult = 1.5 // Multiplier for SL
atr_tp_mult = 3.0 // Multiplier for TP (1:2 ratio)
sl_distance = atr_smooth * atr_sl_mult
tp_distance = atr_smooth * atr_tp_mult
if trade_buy
entry_price = close
sl_price = entry_price - sl_distance
tp_price = entry_price + tp_distance
label.new(bar_index, low, "Buy: " + str.tostring(math.round(bull_conditions, 1)), color=color.green, textcolor=color.white, style=label.style_label_up, size=size.tiny)
label.new(bar_index, sl_price, "SL: " + str.tostring(math.round(sl_price, 2)), color=color.red, textcolor=color.white, style=label.style_label_down, size=size.tiny)
label.new(bar_index, tp_price, "TP: " + str.tostring(math.round(tp_price, 2)), color=color.blue, textcolor=color.white, style=label.style_label_up, size=size.tiny)
if trade_sell
entry_price = close
sl_price = entry_price + sl_distance
tp_price = entry_price - tp_distance
label.new(bar_index, high, "Sell: " + str.tostring(math.round(bear_conditions, 1)), color=color.red, textcolor=color.white, style=label.style_label_down, size=size.tiny)
label.new(bar_index, sl_price, "SL: " + str.tostring(math.round(sl_price, 2)), color=color.red, textcolor=color.white, style=label.style_label_up, size=size.tiny)
label.new(bar_index, tp_price, "TP: " + str.tostring(math.round(tp_price, 2)), color=color.blue, textcolor=color.white, style=label.style_label_down, size=size.tiny)
Code Explanation
SL: Calculated by subtracting/adding sl_distance to the entry price (close) depending on whether it’s a buy or sell.
TP: Calculated with a double distance (tp_distance) for a 1:2 risk/reward ratio.
Visualization: Labels are added to the chart to display SL (red) and TP (blue).
4. Practical Strategy Without Modifying the Code
If you don’t want to modify the script, follow these steps manually:
Entry: Take the trade_buy or trade_sell signal.
SL: Check the smoothed ATR (atr_smooth) on the chart or calculate a fixed level (e.g., 1.5 times the ATR). Also, review nearby key zones (OB, FVG, VWAP).
TP: Define a target based on the next key zone or multiply the SL distance by 2 or 3.
Example:
Buy at 100, ATR = 2.
SL = 100 - (2 * 1.5) = 97.
TP = 100 + (2 * 3) = 106.
5. Recommendations
Test in Demo: Apply this logic in a demo account to adjust the multipliers (atr_sl_mult, atr_tp_mult) based on the market (forex or crypto).
Combine with Zones: If the ATR-based SL is too wide, use the nearest OB or FVG as a reference.
Risk/Reward Ratio: Adjust the TP based on your tolerance (1:1, 1:2, 1:3)