Trade Manager (Open Source Version)Hello my young padawans looking for the FORCE to get richer on your next trade
I got pinged at least three times today asking where the hell is the indicator of the day. You asked, I delivered :)
Here's your free open-source Trade Manager Version. My associates might kill me for sharing that one... anyway this is a real GIFT.
I won't share such quality indicators too often for FREE so hope you'll appreciate its value. It can really help with your day to day trading (on top of making your charts looking more awesome)
This is an even better version compared to my previous Trade Manager Trade-Manager . It's basically a standalone version, meaning you'll have to update with 2 lines your own indicator and follow my educational post from yesterday (pasted it below also) to learn how to do it
Please read this educational post I published for you before proceeding further : How-to-connect-your-indicator-with-the-Trade-Manager
From here you normally connected the data source of your own indicator to the Trade Manager. If not, here's a reminder of the article mentionned above
Step 1 - Update your indicator
For the screenshot you see above, I used this indicator : Two-MM-Cross-MACD/ . "But sir are you really advertising your other indicators here ??" ... hmmm.... YES but I gave them for free so ... stop complaining my friend :)
Somewhere in the code you'll have a LONG and a SHORT condition. If not, please go back to study trading for noobs (I'm kidding !!!)
So it should look to something similar
nUP = ma_crossover and macd_crossover
nDN = ma_crossunder and macd_crossunder
What you will need to add at the very end of your script is a Signal plot that will be captured by the Trade Manager. This will give us :
// Signal plot to be used as external
// if crossover, sends 1, otherwise sends -1
Signal = (nUP) ? 1 : (nDN) ? -1 : na
plot(Signal, title="Signal")
The Trade Manager engines expects to receive 1 for a bullishg signal and -1 for bearish .
Step 2 - Add the Trade Manager to your chart and select the right Data Source
I feel the questions coming so I prefer to anticipate :) When you add the Trade Manager to your chart, nothing will be displayed. THIS IS NORMAL because you'll have to select the Data Source to be "Signal"
Remember our Signal variable from the Two MM Cross from before, now we'll capture it and.....drumb rolll...... that's from that moment that your life became even more AWESOME
The Engine will capture the last signal from the MM cross or any indicator actually and will update the Stop Loss, Take Profit levels based on the parameters you set on the Trade Manager
It should work with any indicator as long as you're providing a plot Signal with values 1 and -1 . In any case, you can change the Trade Manager you'll find a better logic for your trading
Now let's cover the different parameters of the tool
It should be straightforward but better to explain everything here
+Label lines : if unchecked, no SL/TPs/... will be displayed
+Show Stop Loss Signal : Will display the stop loss label. You have the choice between three options :
By default, the Stop Loss is set to NONE. You'll have to select a different option to enable the Stop Loss for real
++Percentage : Will set the SL at a percent distance from the price
++Fixed : SL fixed at a static price
++Trailing % : Trailing stop loss based on percentage level
The following is a KEY feature and I got asked for it many times those past two days. I got annoyed of getting the same request so I just did it
++Trailing TP: Will move the Stop Loss if the take profit levels are hit
Example: if TP1 is hit, SL will be moved to breakeven. If TP2 is hit, SL will be moved from TP1 to TP2
+Take Profit 1,2,3 : Visually define the three Take Profit levels. Those are percentage levels .
Meaning if you set TP1 = 2, it will set the TP1 level 2% away from the entry signal
Please note that once a Take profit level is reached, it will magically disappear. This is to be expected
I'll share in the future a way more complete version with invalidation, stop loss/take profits based on indicator, take profit based on supports/resistances, ...
I believe is such a great tool because can be connected to any indicator. I confess that I tried it only with a few... if you find any that's not working with the Trade manager, please let me know and I'll have a look
PS
I want to give a HUUUUUUUGE shoutout to the PineCoders community who helped me finishing it
Wishing you all the best and a pleasant experience with my work
David
Search in scripts for "tp"
No Nonsense NNFX VP Strategy for Back Testing Indicators| jhAfter putting the whole system together, sat down to benchmark the various confirmation indicators, shrink it down to backtest individual confirmation indicators.
Results for 24 periods way better than 10, then again it's only one pair. :)
More details below.
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Designed per No Nonsense Forex VP rules
//For testing your individual indicators before the full system
//Originated from causecelebre
//Tried to put in as much VP rules as possible
///////////////////////////////////////////////////
//Rules Implemented:
///////////////////////////////////////////////////
// - SL 1.5 x ATR
// - TP 1 x ATR
//
// - Entry conditions
//// - Entry from 1 x confirmation
// - Exit conditions
//// - Exit on confirmation flip
///////////////////////////////////////////////////
//Trades entries
///////////////////////////////////////////////////
// - First entry L1 or S1 with standard SL and TP
///////////////////////////////////////////////////
//Included Indicators and settings
///////////////////////////////////////////////////
// - Confirmtion = SSL 10
///////////////////////////////////////////////////
//Credits
// Strategy causecelebre www.tradingview.com
// SSL Channel ErwinBeckers www.tradingview.com
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Change log
//First release. Testing of indicators
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
No Nonsense NNFX VP Strategy for Back Testing | jhMy first script, be kind :)
Most of the rules are implemented:
- Money management
- ATR, Baseline, Confirmation, Volume, Exit
More details below.
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Designed per No Nonsense Forex VP rules
//Made to be as modular as possible, so we can swap the indicators in and out.
//Originated from causecelebre
//Tried to put in as much VP rules as possible
///////////////////////////////////////////////////
//Rules Implemented:
///////////////////////////////////////////////////
// - SL 1.5 x ATR
// - TP 1 x ATR
//
// - Entry conditions
//// - Entry within 1 candles of baseline + 1 x confirmation + volume
//// - Entry only if baseline is < 1 x ATR
// - Exit conditions
//// - Exit on exit indicator or when baseline or confirmation flip
///////////////////////////////////////////////////
//Trades entries
///////////////////////////////////////////////////
// - First entry L1 or S1 with standard SL and TP
// - Second entry L2 or S2 with standard SL and exit upon the exit conditions
///////////////////////////////////////////////////
//Included Indicators and settings
///////////////////////////////////////////////////
// - Baseline = HMA 20
// - Confirmtion = SSL 10
// - Volume = TDFI 4
// - Exit = RVI 4
///////////////////////////////////////////////////
//Credits
// Strategy causecelebre
// TDFI causecelebre
// SSL Channel ErwinBeckers
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Adaptive Zero Lag EMA [STUDY]A user has asked for the Study/Indicator version of this Strategy .
If you encounter the error "loop....>100ms" simply toggle the eye icon to hide and unhide the indicator
The following is simply quoted from my previous post for your convenience: (obviously there won't be risk, Stop Loss, or Take profit parameters!)
OPERATING PRINCIPLE
The strategy is based on Ehlers idea that any indicator can be turned into a signal-producing trade system through smoothing and other filtering processes.
In fact, I'm using his Zero Lag EMA ( ZLEMA ) as a baseline indicator as well as some code snippets he has made public (1). God bless open source!
Next, I've provided the option to use an Instantaneous Frequency Measurement (IFM) method, which will adaptively choose the best period for the ZLEMA (2)
I've written other studies that use the differential calculus approximations for IFM, so it was only natural to include them in this strategy.
The primary two are Cosine IFM (3) and In-phase Quadrature IFM (4). You can also find an indicator with both plotted and the ability to average them together, as one IFM prefers long periods and the other short. (5)
BEFORE WE BEGIN
1. This strategy only runs on "normal" FX pairs ( EURUSD , GBPJPY , AUDUSD ...) and will fail on Metals or Commodities.
Cryptos are largely untested.
2. Please run it on these time frames: M15 to D.
Anything outside this range will likely fail.
HOW TO USE AND SUCCEED
1. If the Default settings don't produce good results right off the bat, then lower gain limit to 1 or 2 and threshold to 0.01.
2. Test each setting under adaptive method. If you want to leave it Off, then I'd recommend using some kind of IFM (see my links below) to
discover the most efficient period to use.
3. Once you have the best adaptive method chosen, begin incrementing gain limit until you find a nice balance between profit factor ( PF ) and drawdown.
4. Now, begin incrementing threshold. The goal is to have PF above 2 and a drawdown as low as possible.
5. Finally, change the source! Typically, close is the best option, but I have run into cases where high
yielded the highest returns and win rate.
6. Sit back, relax, and tweak the risk until you're happy with the return and drawdown amounts.
ADVANCED
You may need to adjust take profit (TP) points and stop loss (SL) points to create the best entry possible. Don't be greedy! You'll likely have poor
results if the TP is set to 300 and SL is 50.
If you are trading a pair that has a long Dominant Cycle Period, then you may increase Max Period to allow the IFM
to accept longer periods. Any period above the Max Period will be rejected. This may increase lag time!
Cheers and good luck trading!
-DasanC
(1)www.mesasoftware.com
(2)www.jamesgoulding.com
(3) Cosine IFM
(4) I-Q IFM
(5) Averaging IFM
IFM stands for Instantaneous frequency measurement
Adaptive Zero Lag EMA v2This is my most successful strategy to date! Please enjoy and join the Open Source movement by sharing your code and ideas online!
OPERATING PRINCIPLE
The strategy is based on Ehlers idea that any indicator can be turned into a signal-producing trade system through smoothing and other filtering processes.
In fact, I'm using his Zero Lag EMA (ZLEMA) as a baseline indicator as well as some code snippets he has made public (1). God bless open source!
Next, I've provided the option to use an Instantaneous Frequency Measurement (IFM) method, which will adaptively choose the best period for the ZLEMA (2)
I've written other studies that use the differential calculus approximations for IFM, so it was only natural to include them in this strategy.
The primary two are Cosine IFM (3) and In-phase Quadrature IFM (4). You can also find an indicator with both plotted and the ability to average them together, as one IFM prefers long periods and the other short. (5)
BEFORE WE BEGIN
1. This strategy only runs on "normal" FX pairs (EURUSD, GBPJPY, AUDUSD ...) and will fail on Metals or Commodities.
Cryptos are largely untested.
2. Please run it on these time frames: M15 to D.
Anything outside this range will likely fail.
HOW TO USE AND SUCCEED
1. If the Default settings don't produce good results right off the bat, then lower gain limit to 1 or 2 and threshold to 0.01.
2. Test each setting under adaptive method . If you want to leave it Off , then I'd recommend using some kind of IFM (see my links below) to
discover the most efficient period to use.
3. Once you have the best adaptive method chosen, begin incrementing gain limit until you find a nice balance between profit factor (PF) and drawdown.
4. Now, begin incrementing threshold . The goal is to have PF above 2 and a drawdown as low as possible.
5. Finally, change the source ! Typically, close is the best option, but I have run into cases where high
yielded the highest returns and win rate.
6. Sit back, relax, and tweak the risk until you're happy with the return and drawdown amounts.
ADVANCED
You may need to adjust take profit (TP) points and stop loss (SL) points to create the best entry possible. Don't be greedy! You'll likely have poor
results if the TP is set to 300 and SL is 50.
If you are trading a pair that has a long Dominant Cycle Period , then you may increase Max Period to allow the IFM
to accept longer periods. Any period above the Max Period will be rejected. This may increase lag time!
Cheers and good luck trading!
-DasanC
PS - This code doesn't repaint or have future-leak, which was present in Pinescript v2.
PPS - Believe me! These returns are typical! Sometimes you must push aside the "if it's too good to be true..." mindset that society has ingrained in you.
Do you really believe the most successful pass up opportunities before investigating them? ;)
(1) Ehlers & Ric Zero Lag EMA
(2) Measuring Cycles by Ehlers
(3) Cosine IFM
(4) Inphase Quadrature IFM
(5) Averaging IFM
MA cross strategy VtsThe simple Moving average cross strategy is here implemented.
I guess there are multitudes of similar scripts around.
I post this one since I was asked by some friends, and I'll let it free to use for anybody.
Here you can choose the year where to start backtesting, the source, the type of MA, the SL and TP multiplicators of ATR, for which you can also choose the averaging period.
Feel free to modify this script. I would be grateful if you could preserve the first lines of comments including my user names.
The MA cross strategies can be very effective, especially when used on the daily TF.
Try for example the combo EMA15-EMA30 SL=1.5ATR TP=1ATR on EURCHF daily to get an impressive 83% win ratio.
Or EMA20-EMA81 on the GBPCHF to get an 87%.
In those cases where EMA does not perform well, try to set a less lagging MA, like the Hull MA.
I hope you like this script so that you could push the like button multiple (odd) times and you start following me.
I've got a bunch of other interesting scripts to share.
Comments and suggestions are welcome.
Forex Master v4.0 (EUR/USD Mean-Reversion Algorithm)DESCRIPTION
Forex Master v4.0 is a mean-reversion algorithm currently optimized for trading the EUR/USD pair on the 5M chart interval. All indicator inputs use the period's closing price and all trades are executed at the open of the period following the period where the trade signal was generated.
There are 3 main components that make up Forex Master v4.0:
I. Trend Filter
The algorithm uses a version of the ADX indicator as a trend filter to trade only in certain time periods where price is more likely to be range-bound (i.e., mean-reverting). This indicator is composed of a Fast ADX and a Slow ADX, both using the same look-back period of 50. However, the Fast ADX is smoothed with a 6-period EMA and the Slow ADX is smoothed with a 12-period EMA. When the Fast ADX is above the Slow ADX, the algorithm does not trade because this indicates that price is likelier to trend, which is bad for a mean-reversion system. Conversely, when the Fast ADX is below the Slow ADX, price is likelier to be ranging so this is the only time when the algorithm is allowed to trade.
II. Bollinger Bands
When allowed to trade by the Trend Filter, the algorithm uses the Bollinger Bands indicator to enter long and short positions. The Bolliger Bands indicator has a look-back period of 20 and a standard deviation of 1.5 for both upper and lower bands. When price crosses over the lower band, a Long Signal is generated and a long position is entered. When price crosses under the upper band, a Short Signal is generated and a short position is entered.
III. Money Management
Rule 1 - Each trade will use a limit order for a fixed quantity of 50,000 contracts (0.50 lot). The only exception is Rule
Rule 2 - Order pyramiding is enabled and up to 10 consecutive orders of the same signal can be executed (for example: 14 consecutive Long Signals are generated over 8 hours and the algorithm sends in 10 different buy orders at various prices for a total of 350,000 contracts).
Rule 3 - Every order will include a bracket with both TP and SL set at 50 pips (note: the algorithm only closes the current open position and does not enter the opposite trade once a TP or SL has been hit).
Rule 4 - When a new opposite trade signal is generated, the algorithm sends in a larger order to close the current open position as well as open a new one (for example: 14 consecutive Long Signals are generated over 8 hours and the algorithm sends in 10 different buy orders at various prices for a total of 350,000 contracts. A Short Signal is generated shortly after the 14th Long Signal. The algorithm then sends in a sell order for 400,000 contracts to close the 350,000 contracts long position and open a new short position of 50,000 contracts).
HeikenAshi[1]This is the alert script so you can automate this strategy using AutoView:
Make sure to use
crossing down value 0.9 once per bar (on condition) for this.
For the alert Message if you're using AutoView:
Long GBPUSD
c=order b=short
c=position b=short l=200 t=market
b=long q=0.01 l=200 t=market tp=60 sl=60
Short GBPUSD
c=order b=long
c=position b=long l=200 t=market
b=short q=0.01 l=200 t=market tp=60 sl=60
Percent Drop - For XIVUseful for Rangebound stocks.
I am using it with XIV , start accumulating day after circle appears.
Have TP of 20% upside
Average it if TP not hit on next flash
Hosoda’s CloudsMany investors aim to develop trading systems with a high win rate, mistakenly associating it with substantial profits. In reality, high returns are typically achieved through greater exposure to market trends, which inevitably lowers the win rate due to increased risk and more volatile conditions.
The system I present, called “Hosoda’s Clouds” in honor of Goichi Hosoda , the creator of the Ichimoku Kinko Hyo indicator, is likely one of the first profitable systems many traders will encounter. Designed to capture trends, it performs best in markets with clear directional movements and is less suitable for range-bound markets like Forex, which often exhibit lateral price action.
This system is not recommended for low timeframes, such as minute charts, due to the random and emotionally driven nature of price movements in those periods. For a deeper exploration of this topic, I recommend reading my article “Timeframe is Everything”, which discusses the critical importance of selecting the appropriate timeframe.
I suggest testing and applying the “Hosoda’s Clouds” strategy on assets with a strong trending nature and a proven track record of performance. Ideal markets include Tesla (1-hour, 4-hour, and daily), BTC/USDT (daily), SPY (daily), and XAU/USD (daily), as these have consistently shown clear directional trends over time.
Commissions and Configuration
Commissions can be adjusted in the system’s settings to suit individual needs. For evaluating the effectiveness of “Hosoda’s Clouds,” I’ve used a standard commission of $1 per order as a baseline, though this can be modified in the code to accommodate different brokers or preferences.
The margin per trade is set to $1,000 by default, but users are encouraged to experiment with different margin settings in the configuration to match their trading style.
Rules of the “Hosoda’s Clouds” System (Bullish Strategy)
This strategy is designed to capture trending movements in bullish markets using the Ichimoku Kinko Hyo indicator. The rules are as follows:
Long Entry: A long position is triggered when the Tenkan-sen crosses above the Kijun-sen below the Ichimoku cloud, identifying potential reversals or bounces in a bearish context.
Stop Loss (SL): Placed at the low of the candle 12 bars prior to the entry candle. This setting has proven optimal in my tests, but it can be adjusted in the code based on risk tolerance.
Take Profit (TP): The position is closed when the Tenkan-sen crosses below the bottom of the Ichimoku cloud (the minimum of Senkou Span A and Senkou Span B).
Notes on the Code
margin_long=0: Ideal for strategies requiring a fixed position size, particularly useful for manual entries or testing with a constant capital allocation.
margin_long=100: Recommended for high-frequency systems where positions are closed quickly, simulating gradual growth based on realized profits and reflecting real-world broker constraints.
System Performance
The following performance metrics account for $1 per order commissions and were tested on the specified assets and timeframes:
Tesla (H1)
Trades: 148
Win Rate: 29.05%
Period: Jan 2, 2014 – Jan 6, 2020 (+172%)
Simple Annual Growth Rate: +34.3%
Trades: 130
Win Rate: 30.77%
Period: Jan 2, 2020 – Sep 24, 2025 (+858.90%)
Simple Annual Growth Rate: +150.7%
Tesla (H4)
Trades: 102
Win Rate: 32.35%
Period: Jun 29, 2010 – Sep 24, 2025 (+11,356.36%)
Simple Annual Growth Rate: +758.5%
Tesla (Daily)
Trades: 56
Win Rate: 35.71%
Period: Jun 29, 2010 – Sep 24, 2025 (+3,166.64%)
Simple Annual Growth Rate: +211.5%
BTC/USDT (Daily)
Trades: 44
Win Rate: 31.82%
Period: Sep 30, 2017 – Sep 24, 2025 (+2,592.23%)
Simple Annual Growth Rate: +324.8%
SPY (Daily)
Trades: 81
Win Rate: 37.04%
Period: Jan 23, 1993 – Sep 24, 2025 (+476.90%)
Simple Annual Growth Rate: +14.3%
XAU/USD (Daily)
Trades: 216
Win Rate: 32.87%
Period: Jan 6, 1833 – Sep 24, 2025 (+5,241.73%)
Simple Annual Growth Rate: +27.1%
SPX (Daily)
Trades: 217
Win Rate: 38.25%
Period: Feb 1, 1871 – Sep 24, 2025 (+16,791.02%)
Simple Annual Growth Rate: +108.1%
Conclusion
With the “ Hosoda’s Clouds ” strategy, I aim to showcase the potential of technical analysis to generate consistent profits in trending markets, challenging recent doubts about its effectiveness. My goal is for this system to serve as both a practical tool for traders and a source of inspiration for the trading community I deeply respect. I hope it encourages the creation of new strategies, fosters creativity in technical analysis, and empowers traders to approach the markets with confidence and discipline.
Foresight Cone (HoltxF1xVWAP) [KedArc Quant]Description:
This is a time-series forecasting indicator that estimates the next bar (F1) and projects a path a few bars ahead. It also draws a confidence cone based on how accurate the recent forecasts have been. You can optionally color the projection only when price agrees with VWAP.
Why it’s different
* One clear model: Everything comes from Holt’s trend-aware forecasting method—no mix of unrelated indicators.
* Transparent visuals: You see the next-bar estimate (F1), the forward projection, and a cone that widens or narrows based on recent forecast error.
* Context, not signals: The VWAP option only changes colors. It doesn’t add trade rules.
* No look-ahead: Accuracy is measured using the forecast made on the previous bar versus the current bar.
Inputs (what they mean)
* Source: Price series to forecast (default: Close).
* Preset: Quick profiles for fast, smooth, or momentum markets (see below).
* Alpha (Level): How fast the model reacts to new prices. Higher = faster, twitchier.
* Beta (Trend): How fast the model updates the slope. Higher = faster pivots, more flips in chop.
* Horizon: How many bars ahead to project. Bigger = wider cone.
* Residual Window: How many bars to judge recent accuracy. Bigger = steadier cone.
* Confidence Z: How wide the cone should be (typical setting ≈ “95% style” width).
* Show Bands / Draw Forward Path: Turn the cone and forward lines on/off.
* Color only when aligned with VWAP: Highlights projections only when price agrees with the trend side of VWAP.
* Colors / Show Panel: Styling plus a small panel with RMSE, MAPE, and trend slope.
Presets (when to pick which)
* Scalp / Fast (1-min): Very responsive; best for quick moves. More twitch in chop.
* Smooth Intraday (1–5 min): Calmer and steadier; a good default most days.
* Momentum / Breakout: Quicker slope tracking during strong pushes; may over-react in ranges.
* Custom: Set your own values if you know exactly what you want.
What is F1 here?
F1 is the model’s next-bar fair value. Crosses of price versus F1 can hint at short-term momentum shifts or mean-reversion, especially when viewed with VWAP or the cone.
How this helps
* Gives a baseline path of where price may drift and a cone that shows normal wiggle room.
* Helps you tell routine noise (inside cone) from information (edges or breaks outside the cone).
* Keeps you aware of short-term bias via the trend slope and F1.
How to use (step by step)
1. Add to chart → choose a Preset (start with Smooth Intraday).
2. Set Horizon around 8–15 bars for intraday.
3. (Optional) Turn on VWAP alignment to color only when price agrees with the trend side of VWAP.
4. Watch where price sits relative to the cone and F1:
* Inside = normal noise.
* At edges = stretched.
* Outside = possible regime change.
5. Check the panel: if RMSE/MAPE spike, expect a wider cone; consider a smoother preset or a higher timeframe.
6. Tweak Alpha/Beta only if needed: faster for momentum, slower for chop.
7. Combine with your own plan for entries, exits, and risk.
Accuracy Panel — what it tells you
Preset & Horizon: Shows which preset you’re using and how many bars ahead the projection goes. Longer horizons mean more uncertainty.
RMSE (error in price units): A “typical miss” measured in the chart’s currency (e.g., ₹).
Lower = tighter fit and a usually narrower cone. Rising = conditions getting noisier; the cone will widen.
MAPE (error in %): The same idea as RMSE but in percent.
Good for comparing different symbols or timeframes. Sudden spikes often hint at a regime change.
Slope T: The model’s short-term trend reading.
Positive = gentle up-bias; negative = gentle down-bias; near zero = mostly flat/drifty.
How to read it at a glance
Calm & directional: RMSE/MAPE steady or falling + Slope T positive (or negative) → trends tend to respect the cone’s mid/upper (or mid/lower) area.
Choppy/uncertain: RMSE/MAPE climbing or jumping → expect more whipsaw; rely more on the cone edges and higher-TF context.
Flat tape: Slope T near zero → mean-revert behavior is common; treat cone edges as stretch zones rather than breakout zones.
Warm-up & tweaks
Warm-up: Right after adding the indicator, the panel may be blank for a short time while it gathers enough bars.
Too twitchy? Switch to Smooth Intraday or increase the Residual Window.
Too slow? Use Scalp/Fast or Momentum/Breakout to react quicker.
Timeframe tips
* 1–3 min: Scalp/Fast or Momentum/Breakout; horizon \~8–12.
* 5–15 min: Smooth Intraday; horizon \~12–15.
* 30–60 min+: Consider a larger residual window for a steadier cone.
FAQ
Q: Is this a strategy or an indicator?
A: It’s an indicator only. It does not place orders, TP/SL, or run backtests.
Q: Does it repaint?
A: The next-bar estimate (F1) and the cone are calculated using only information available at that time. The forward path is a projection drawn on the last bar and will naturally update as new bars arrive. Historical bars aren’t revised with future data.
Q: What is F1?
A: F1 is the indicator’s best guess for the next bar.
Price crossing above/below F1 can hint at short-term momentum shifts or mean-reversion.
Q: What do “Alpha” and “Beta” do?
A: Alpha controls how fast the indicator reacts to new prices
(higher = faster, twitchier). Beta controls how fast the slope updates (higher = quicker pivots, more flips in chop).
Q: Why does the cone width change?
A: It reflects recent forecast accuracy. When the market gets noisy, the cone widens. When the tape is calm, it narrows.
Q: What does the Accuracy Panel tell me?
A:
* Preset & Horizon you’re using.
* RMSE: typical forecast miss in price units.
* MAPE: typical forecast miss in percent.
* Slope T: short-term trend reading (up, down, or flat).
If RMSE/MAPE rise, expect a wider cone and more whipsaw.
Q: The panel shows “…” or looks empty. Why?
A: It needs a short warm-up to gather enough bars. This is normal after you add the indicator or change settings/timeframes.
Q: Which timeframe is best?
A:
* 1–3 min: Scalp/Fast or Momentum/Breakout, horizon \~8–12.
* 5–15 min: Smooth Intraday, horizon \~12–15.
Higher timeframes work too; consider a larger residual window for steadier cones.
Q: Which preset should I start with?
A: Start with Smooth Intraday. If the market is trending hard, try Momentum/Breakout.
For very quick tapes, use Scalp/Fast. Switch back if things get choppy.
Q: What does the VWAP option do?
A: It only changes colors (highlights when price agrees with the trend side of VWAP).
It does not add or remove signals.
Q: Are there alerts?
A: Yes—alerts for price crossing F1 (up/down). Use “Once per bar close” to reduce noise on fast charts.
Q: Can I use this on stocks, futures, crypto, or FX?
A: Yes. It works on any symbol/timeframe. You may want to adjust Horizon and the Residual Window based on volatility.
Q: Can I use it with Heikin Ashi or other non-standard bars?
A: You can, but remember you’re forecasting the synthetic series of those bars. For pure price behavior, use regular candles.
Q: The cone feels too wide/too narrow. What do I change?
A:
* Too wide: lower Alpha/Beta a bit or increase the Residual Window.
* Too narrow (misses moves): raise Alpha/Beta slightly or try Momentum/Breakout.
Q: Why do results change when I switch timeframe or symbol?
A: Different noise levels and trends. The accuracy stats reset per chart, so the cone adapts to each context.
Q: Any limits or gotchas?
A: Extremely large Horizon may hit TradingView’s line-object limits; reduce Horizon or turn
off extra visuals if needed. Big gaps or news spikes will widen errors—expect the cone to react.
Q: Can this predict exact future prices?
A: No. It provides a baseline path and context. Always combine with your own rules and risk management.
Glossary
* TS (Time Series): Data over time (prices).
* Holt’s Method: A forecasting approach that tracks a current level and a trend to predict the next bars.
* F1: The indicator’s best guess for the next bar.
* F(h): The projected value h bars ahead.
* VWAP: Volume-Weighted Average Price—used here for optional color alignment.
* RMSE: Typical forecast miss in price units (how far off, on average).
* MAPE: Typical forecast miss in percent (scale-free, easy to compare).
Notes & limitations
* The panel needs a short warm-up; stats may be blank at first.
* The cone reflects recent conditions; sudden volatility changes will widen it.
* This is a tool for context. It does not place trades and does not promise results.
⚠️ Disclaimer
This script is provided for educational purposes only.
Past performance does not guarantee future results.
Trading involves risk, and users should exercise caution and use proper risk management when applying this strategy.
BRN Advanced DCA Bot V 1.0 Of course. Here is the step-by-step configuration guide written in English.
1. Entry Trigger (QQE)
This section controls the signal that initiates a new DCA round.
RSI Period (QQE): Controls the period of the RSI used in the indicator. Lower values make it faster and more sensitive (more signals); higher values make it slower (fewer signals).
RSI Smoothing (SF): A smoothing factor. Increasing this value filters out more noise, resulting in more confirmed but later signals.
QQE Factor: The multiplier that creates the indicator's bands. You should only change this if you have advanced knowledge of the QQE indicator.
Recommendation: Start with the default values and adjust the RSI Period and Smoothing to find the signal frequency you desire.
2. Trend Filter (Supertrend)
This section defines the main trend to guide the trades.
Use Trend Filter?: If checked, the strategy will only open orders (including DCA orders) if they are in the direction of the Supertrend. This is an important safety filter.
ATR Period & ATR Multiplier: These two parameters define the Supertrend's sensitivity.
Higher Period/Multiplier: Makes the Supertrend less sensitive, ideal for following long-term trends.
Lower Period/Multiplier: Makes it more sensitive to price changes, ideal for smaller timeframes.
Supertrend Timeframe (MTF): Allows you to use a Supertrend from a higher timeframe (e.g., 4h) to filter signals on a lower timeframe (e.g., 15m). Leave it blank to use the current chart's timeframe.
Close DCA on Trend Reversal?: If enabled, it will immediately close a DCA round if the Supertrend flips against your position. An excellent risk management tool.
TRADE SETUP
Here you define the financial management and the DCA structure.
Base Order Value ($): The dollar value of your first order.
DCA Order Value ($): The base value for the subsequent orders (the DCA orders).
Step between DCAs (%): The percentage distance between each DCA order, calculated from the initial entry price. E.g., 1.0 means DCA orders will be placed at -1%, -2%, -3%, etc., from the initial price.
Max Orders in Round: The total number of orders allowed (Base Order + DCA Orders). If the value is 5, it means 1 base order and 4 DCA orders.
DCA Value Multiplier: Increases the value of each subsequent DCA order (known as Martingale). A value of 2.0 means each new order will be double the value of the previous one. Use with extreme caution, as it exponentially increases risk.
3. Backtest & Execution
Settings for testing the strategy.
Test Start/End Date: Defines the time period that the backtest will analyze.
Cooldown between Rounds (bars): Sets a number of "waiting" candles after a round closes before the strategy can open a new one. This helps prevent immediate re-entries in choppy markets.
4. Direction & Activation
Controls the overall direction of the trades.
Strategy Direction:
Buy (Long): The strategy will only execute buy trades.
Sell (Short): The strategy will only execute sell trades.
Automatic: The strategy uses the Supertrend to decide whether to look for buy or sell signals. This is the main setting for automation.
5. Take Profit & Stop Loss
Defines your profit targets and your loss limits.
Take Profit Mode:
Fixed: Closes the position when it reaches a fixed percentage profit target.
Trailing: The profit target moves along with the price, helping to capture more gains in a strong trend.
Take Profit (%) on AVERAGE price: The desired profit percentage, calculated from the average price of all your open orders.
Trailing TP Callback (%): Used only in "Trailing" mode. It's the percentage the price can pull back from its peak before the order is closed.
Round Stop-Loss (%): The maximum percentage loss you are willing to accept for the entire round. This is your primary safety net.
SL Based on: Defines how the Stop Loss is calculated.
Initial Price: The SL is fixed based on the first entry. This is safer.
Average Price: The SL moves as new DCA orders are added. This is riskier.
Final Recommendation: Always start by configuring the strategy in Backtest mode over a relevant period. There is no "perfect" setting; it must be optimized for each specific asset and timeframe.
Katz Impact Wave 🚀Overview of the Katz Impact Wave 🚀
The Katz Impact Wave is a momentum oscillator designed to visualize the battle between buyers and sellers. Instead of combining bullish and bearish pressure into a single line, it separates them into two distinct "Impact Waves."
Its primary goal is to generate clear trade signals by identifying when one side gains control, but only when the market has enough volatility to be considered "moving." This built-in filter helps to avoid signals during flat or choppy market conditions.
Indicator Components: Lines & Plots
Impact Waves & Fill
Green Wave (Total Up Impulses): This line represents the cumulative buying pressure. When this line is rising, it indicates that bulls are getting stronger.
Red Wave (Total Down Impulses): This line represents the cumulative selling pressure. When this line is rising, it indicates that bears are getting stronger.
Colored Fill: The shaded area between the two waves provides an at-a-glance view of who is in control.
Lime Fill: Bulls are dominant (Green Wave is above the Red Wave).
Red Fill: Bears are dominant (Red Wave is above the Green Wave).
Background Color
The background color provides crucial context about the market state according to the indicator's logic.
Green Background: The market is in a bullish state (Green Wave is dominant) AND the Rate of Change (ROC) filter confirms the market is actively moving.
Red Background: The market is in a bearish state (Red Wave is dominant) AND the ROC filter confirms the market is actively moving.
Gray Background: The market is considered "not moving" or is in a low-volatility chop. Signals that occur when the background is gray should be viewed with extreme caution or ignored.
Symbols & Pivot Lines
▲ Blue Triangle (Up): This is your long entry signal. It appears on the bar where the Green Wave crosses above the Red Wave while the market is moving.
▼ Orange Triangle (Down): This is your short entry signal. It appears on the bar where the Red Wave crosses above the Green Wave while the market is moving.
Pivot Lines (Solid Green/Red/White Lines): These lines mark confirmed peaks of exhaustion in momentum, not price.
Green Pivot Line: Marks a peak in the Green Wave, signaling buying momentum exhaustion. This can be a warning that the uptrend is losing steam.
Red Pivot Line: Marks a peak in the Red Wave, signaling selling momentum exhaustion. This can be a warning that the downtrend is losing steam.
▼ Yellow Triangle (Compression): This rare signal appears when buying and selling exhaustion pivots happen at the same level. It signifies a point of extreme indecision or equilibrium that often occurs before a major price expansion.
Trading Rules & Strategy
This indicator provides entry signals but does not provide explicit Take Profit or Stop Loss levels. You must use your own risk management rules.
Long Trade Rules
Entry Signal: Wait for a blue ▲ triangle to appear at the top of the indicator panel.
Confirmation: Ensure the background color is green, confirming the market is in a bullish, moving state.
Action: Enter a long (buy) trade at the open of the next candle after the signal appears.
Short Trade Rules
Entry Signal: Wait for an orange ▼ triangle to appear at the bottom of the indicator panel.
Confirmation: Ensure the background color is red, confirming the market is in a bearish, moving state.
Action: Enter a short (sell) trade at the open of the next candle after the signal appears.
Take Profit (TP) & Stop Loss (SL) Ideas
You must develop and test your own exit strategy. Here are some common approaches:
Stop Loss:
Place a stop loss below the most recent significant swing low on the price chart for a long trade, or above the recent swing high for a short trade.
Use an ATR (Average True Range) based stop, such as 2x the ATR value below your entry for a long, to account for market volatility.
Take Profit:
Opposite Signal: The simplest exit is to close your trade when the opposite signal appears (e.g., close a long trade when a short signal ▼ appears).
Momentum Exhaustion: For a long trade, consider taking partial or full profit when a green Pivot Line appears, signaling that buying momentum is peaking.
Fixed Risk/Reward: Use a predetermined risk/reward ratio (e.g., 1:1.5 or 1:2).
Disclaimer
This indicator is a tool for analysis, not a financial advisor or a guaranteed profit system. All trading and investment activities involve substantial risk. You should not risk more than you are prepared to lose. Past performance is not an indication of future results. You are solely responsible for your own trading decisions, risk management, and for backtesting this or any other tool before using it in a live trading environment. This indicator is for educational purposes only.
Katz Exploding PowerBand FilterUnderstanding the Katz Exploding PowerBand Filter (EPBF) v2.4
1. Indicator Overview
The Katz Exploding PowerBand Filter (EPBF) is an advanced technical indicator designed to identify moments of expanding bullish or bearish momentum, often referred to as "power." It operates as a standalone oscillator in a separate pane below the main price chart.
Its primary goal is to measure underlying market strength by calculating custom "Bull" and "Bear" power components. These components are then filtered through a versatile moving average and a dual signal line system to generate clear entry and exit signals. This indicator is not a simple momentum oscillator; it uses a unique calculation based on exponential envelopes of both price and squared price to derive its values.
2. On-Chart Lines and Components
The indicator pane consists of five main lines:
Bullish Component (Thick Green/Blue/Yellow/Gray Line): This is the core of the indicator. It represents the calculated bullish "power" or momentum in the market.
Bright Green: Indicates a strong, active long signal condition.
Blue: Shows the bull component is above the MA filter, but the filter itself is still pointing down—a potential sign of a reversal or weakening downtrend.
Yellow: A warning sign that bullish power is weakening and has fallen below the primary signal lines.
Gray: Represents neutral or insignificant bullish power.
Bearish Component (Thick Red/Purple/Yellow/Gray Line): This line represents the calculated bearish "power" or downward momentum.
Bright Red: Indicates a strong, active short signal condition.
Purple: Shows the bear component is above the MA filter, but the filter itself is still pointing down—a sign of potential trend continuation.
Yellow: A warning sign that bearish power is weakening.
Gray: Represents neutral or insignificant bearish power.
MA Filter (Purple Line): This is the main filter, calculated using the moving average type and length you select in the settings (e.g., HullMA, EMA). The Bull and Bear components are compared against this line to determine the underlying trend bias.
Signal Line 1 (Orange Line): A fast Exponential Moving Average (EMA) of the stronger power component. It acts as the first level of dynamic support or resistance for the power lines.
Signal Line 2 (Lime/Gray Line): A slower EMA that acts as a confirmation filter.
Lime Green: The line turns lime when it is rising and the faster Signal Line 1 is above it, indicating a confirmed bullish trend in momentum.
Gray: Indicates a neutral or bearish momentum trend.
3. On-Chart Symbols and Their Meanings
Various characters are plotted at the bottom of the indicator pane to provide clear, actionable signals.
L (Pre-Long Signal): The first sign of a potential long entry. It appears when the Bullish Component rises and crosses above both signal lines for the first time.
S (Pre-Short Signal): The first sign of a potential short entry. It appears when the Bearish Component rises and crosses above both signal lines for the first time.
▲ (Post-Long Signal): A stronger confirmation for a long entry. It appears with the 'L' signal only if the momentum trend is also confirmed bullish (i.e., the slower Signal Line 2 is lime green).
▼ (Post-Short Signal): A stronger confirmation for a short entry. It appears with the 'S' signal only if the momentum trend is confirmed bullish.
Exit / Take-Profit Symbols:
These symbols appear when a power component crosses below a line, suggesting that momentum is fading and it may be time to take profit.
⚠️ (Exit Signal 1): The Bull/Bear component has crossed below the main MA Filter. This is the first and most sensitive take-profit signal.
☣️ (Exit Signal 2): The Bull/Bear component has crossed below the faster Signal Line 1. This is a moderate take-profit signal.
🚼 (Exit Signal 3): The Bull/Bear component has crossed below the slower Signal Line 2. This is the slowest take-profit signal, suggesting the trend is more definitively exhausted.
4. Trading Strategy and Rules
Long Entry Rules:
Initial Signal: Wait for an L to appear at the bottom of the indicator. This confirms that bullish power is expanding.
Confirmation (Recommended): For a higher-probability trade, wait for a green ▲ symbol to appear. This confirms the underlying momentum trend aligns with the signal.
Entry: Enter a long (buy) position on the opening of the next candle after the signal appears.
Short Entry Rules:
Initial Signal: Wait for an S to appear at the bottom of the indicator. This confirms that bearish power is expanding.
Confirmation (Recommended): For a higher-probability trade, wait for a maroon ▼ symbol to appear. This confirms the underlying momentum trend aligns with the signal.
Entry: Enter a short (sell) position on the opening of the next candle after the signal appears.
Take Profit (TP) Rules:
The indicator provides three levels of take-profit signals. You can choose to exit your entire position or scale out at each level.
For a long trade, exit when you see ⚠️, ☣️, or 🚼 appear below the Bullish Component.
For a short trade, exit when you see ⚠️, ☣️, or 🚼 appear below the Bearish Component.
Stop Loss (SL) Rules:
The indicator does not provide an explicit stop loss. You must use your own risk management rules. Common methods include:
Swing High/Low: For a long position, place your stop loss below the most recent significant swing low on the price chart. For a short position, place it above the most recent swing high.
ATR-Based: Use an Average True Range (ATR) indicator to set a volatility-based stop loss.
Fixed Percentage: Risk a fixed percentage (e.g., 1-2%) of your account on the trade.
5. Disclaimer
This indicator is a tool for technical analysis and should not be considered financial advice. All trading involves significant risk, and past performance is not indicative of future results. The signals generated by this indicator are probabilistic and can result in losing trades. Always use proper risk management, such as setting a stop loss, and never risk more than you are willing to lose. It is recommended to backtest this indicator and use it in conjunction with other forms of analysis before trading with real capital. The indicator should only be used for educational purposes.
Long-only Swing/Scalp (anchored exits + TP harness) Traders PostThis is the Traders Post friendly drag and drop version of the swing/ scalp strategy for the algo traders out there. Let me know your thoughts, constructive criticism is always welcome.
Katz Calypso Indicator (Refactored)Overview
The Katz Calypso Indicator is a comprehensive momentum oscillator designed to identify potential entry and exit points in the market. At its core, it uses the True Strength Index (TSI) to gauge the strength and direction of a trend. To enhance signal accuracy and reduce false positives, the indicator integrates several optional filters, including the Waddah Attar Explosion, an EMA filter, and an ATR filter. It also provides an optional RVGI-based exit signal system.
This tool is designed to provide a clear, visual representation of market momentum, with customizable filters to adapt to various trading styles and market conditions.
How to Use the Indicator
The indicator is displayed in a separate pane below the main price chart.
TSI Line (Blue): This is the main oscillator line. Its position relative to the zero line indicates the overall trend bias (above 0 is bullish, below is bearish).
Signal Line (Red): A moving average of the TSI line. Crossovers between the TSI and Signal Line are the primary triggers for trade signals.
Zero Line: The centerline of the oscillator. A cross of the Zero Line can indicate a significant shift in momentum.
Overbought/Oversold Levels: These user-defined levels (defaulting to 65 and -65) help identify potential exhaustion points in a trend, which can be used for taking profits.
On-Chart Signals: The indicator plots shapes directly on the chart to make signals easy to spot:
Green Triangles (Up): Indicate long entry or continuation signals.
Red Triangles (Down): Indicate short entry or continuation signals.
Yellow Triangles: Suggest taking profits.
Maroon/Lime Triangles: Indicate an exit based on a signal cross (like RVGI or the Zero Line).
Trading Rules
Long Trade Rules
Entry: A long trade is signaled when ALL of the following conditions are met:
The blue TSI Line crosses above the red Signal Line.
The blue TSI Line is above the 0 Zero Line.
All enabled filters (Waddah Attar, EMA, ATR) confirm bullish conditions.
A green triangle labeled "Long" will appear below the price.
Exit (Take Profit): A take-profit signal for a long trade is generated when either of these occurs:
The TSI Line crosses below the Overbought level.
The TSI Line crosses back below the Signal Line while still above zero.
A yellow triangle labeled "TPL" (Take Profit Long) will appear above the price.
Exit (Stop/Reverse): A signal to exit a long trade is generated when either of these occurs:
The TSI Line crosses below the 0 Zero Line.
The RVGI Exit filter is enabled and generates a bearish crossover signal.
A maroon triangle labeled "Exit Long" will appear above the price.
Short Trade Rules
Entry: A short trade is signaled when ALL of the following conditions are met:
The blue TSI Line crosses below the red Signal Line.
The blue TSI Line is below the 0 Zero Line.
All enabled filters (Waddah Attar, EMA, ATR) confirm bearish conditions.
A red triangle labeled "Short" will appear above the price.
Exit (Take Profit): A take-profit signal for a short trade is generated when either of these occurs:
The TSI Line crosses above the Oversold level.
The TSI Line crosses back above the Signal Line while still below zero.
A yellow triangle labeled "TPS" (Take Profit Short) will appear below the price.
Exit (Stop/Reverse): A signal to exit a short trade is generated when either of these occurs:
The TSI Line crosses above the 0 Zero Line.
The RVGI Exit filter is enabled and generates a bullish crossover signal.
A lime green triangle labeled "Exit Short" will appear below the price.
Optional Filters
You can enable or disable these filters in the indicator's settings to fine-tune its sensitivity.
Waddah Attar Explosion Filter: This filter measures trend strength and volatility. When enabled, it ensures that entries are only taken during periods of strong, confirmed momentum, helping to avoid sideways or choppy markets.
EMA Price Filter: A classic trend filter. When enabled, it will only allow long entries if the price is above the specified Exponential Moving Average and short entries only if the price is below it.
ATR Filter: This acts as a volatility-based filter to prevent chasing a move. It helps ensure that you are not entering a long trade when the price has already moved too far above its EMA, or vice-versa for a short trade.
RVGI Exit Filter: The Relative Vigor Index (RVGI) is used here exclusively as an exit signal. When enabled, a crossover of the RVGI and its signal line can provide an earlier exit signal before the TSI crosses the zero line, potentially locking in profits sooner.
Disclaimer: This indicator is provided for educational and informational purposes only. It is not financial advice. Trading carries a high level of risk, and you can lose more than your initial investment. You should use this indicator at your own risk and discretion. Always conduct your own research and consider your risk tolerance before making any trading decisions.
维加斯双通道策略Vegas Channel Comprehensive Strategy Description
Strategy Overview
A comprehensive trading strategy based on the Vegas Dual Channel indicator, supporting dynamic position sizing and fund management. The strategy employs a multi-signal fusion mechanism including classic price crossover signals, breakout signals, and retest signals, combined with trend filtering, RSI+MACD filtering, and volume filtering to ensure signal reliability.
Core Features
Dynamic Position Sizing: Continue adding positions on same-direction signals, close all positions on opposite signals
Smart Take Profit/Stop Loss: ATR-based dynamic TP/SL, updated with each new signal
Fund Management: Supports dynamic total amount management for compound growth
Time Filtering: Configurable trading time ranges
Risk Control: Maximum order limit to prevent over-leveraging
Leverage Usage Instructions
Important: This strategy does not use TradingView's margin functionality
Setup Method
Total Amount = Actual Funds × Leverage Multiplier
Example: Have 100U actual funds, want to use 10x leverage → Set total amount to 100 × 10 = 1000U
Trading Amount Calculation
Each trade percentage is calculated based on leveraged amount
Example: Set 10% → Actually trade 100U margin × 10x leverage = 1000U trading amount
Maximum Orders Configuration
Must be used in conjunction with leveraged amount
Example: 1000U total amount, 10% per trade, maximum 10 orders = maximum use of 1000U
Note: Do not exceed 100% of total amount to avoid over-leveraging
Parameter Configuration Recommendations
Leverage Configuration Examples
Actual funds 100U, 5x leverage, total amount setting 500U, 10% per trade, 50U per trade, recommended maximum orders 10
Actual funds 100U, 10x leverage, total amount setting 1000U, 10% per trade, 100U per trade, recommended maximum orders 10
Actual funds 100U, 20x leverage, total amount setting 2000U, 5% per trade, 100U per trade, recommended maximum orders 20
Risk Control
Conservative: 5-10x leverage, 10% per trade, maximum 5-8 orders
Aggressive: 10-20x leverage, 5-10% per trade, maximum 10-15 orders
Extreme: 20x+ leverage, 2-5% per trade, maximum 20+ orders
Strategy Advantages
Signal Reliability: Multiple filtering mechanisms reduce false signals
Capital Efficiency: Dynamic fund management for compound growth
Risk Controllable: Maximum order limits prevent liquidation
Flexible Configuration: Supports various leverage and fund allocation schemes
Time Control: Configurable trading hours to avoid high-risk periods
Usage Notes
Ensure total amount is set correctly (actual funds × leverage multiplier)
Maximum orders should not exceed the range allowed by total funds
Recommend starting with conservative configuration and gradually adjusting parameters
Regularly monitor strategy performance and adjust parameters timely
维加斯通道综合策略说明
策略概述
基于维加斯双通道指标的综合交易策略,支持动态加仓和资金管理。策略采用多信号融合机制,包括经典价穿信号、突破信号和回踩信号,结合趋势过滤、RSI+MACD过滤和成交量过滤,确保信号的可靠性。
核心功能
动态加仓:同向信号继续加仓,反向信号全部平仓
智能止盈止损:基于ATR的动态止盈止损,每次新信号更新
资金管理:支持动态总金额管理,实现复利增长
时间过滤:可设置交易时间范围
风险控制:最大订单数限制,防止过度加仓
杠杆使用说明
重要:本策略不使用TradingView的保证金功能
设置方法
总资金 = 实际资金 × 杠杆倍数
示例:实际有100U,想使用10倍杠杆 → 总资金设置为 100 × 10 = 1000U
交易金额计算
每笔交易百分比基于杠杆后的金额计算
示例:设置10% → 实际交易 100U保证金 × 10倍杠杆 = 1000U交易金额
最大订单数配置
必须配合杠杆后的金额使用
示例:1000U总资金,10%单笔,最大10单 = 最多使用1000U
注意:不要超过总资金的100%,避免过度杠杆
参数配置建议
杠杆配置示例
实际资金100U,5倍杠杆,总资金设置500U,单笔百分比10%,单笔金额50U,建议最大订单数10单
实际资金100U,10倍杠杆,总资金设置1000U,单笔百分比10%,单笔金额100U,建议最大订单数10单
实际资金100U,20倍杠杆,总资金设置2000U,单笔百分比5%,单笔金额100U,建议最大订单数20单
风险控制
保守型:5-10倍杠杆,10%单笔,最大5-8单
激进型:10-20倍杠杆,5-10%单笔,最大10-15单
极限型:20倍以上杠杆,2-5%单笔,最大20单以上
策略优势
信号可靠性:多重过滤机制,减少假信号
资金效率:动态资金管理,实现复利增长
风险可控:最大订单数限制,防止爆仓
灵活配置:支持多种杠杆和资金配置方案
时间控制:可设置交易时间,避开高风险时段
使用注意事项
确保总资金设置正确(实际资金×杠杆倍数)
最大订单数不要超过总资金允许的范围
建议从保守配置开始,逐步调整参数
定期监控策略表现,及时调整参数
SL + TP Dynamics - By M.LolasStop Loss e Take Profit dinâmicos para operações semiautomatizadas.
By M.Lolas
Salim ALHammadi-Telegram @salimalhammadiAuto Trading its show entry price and tp price and sl i hope every one like it
SLG's EMA+MACD Signal Trading Strategy M15Trading Concept Overview
This strategy combines trend-following and momentum confirmation to identify high-probability entries in both long and short directions. It uses EMA-based trend filtering and MACD signal analysis, while managing risk dynamically using ATR-based stop loss and take profit.
1. Trend Identification
The strategy calculates a Trend EMA (emaTrend) with a user-defined period (emaTrendLen) to determine the overall market direction:
Bullish Trend: Price closes above the Trend EMA → only long trades are considered.
Bearish Trend: Price closes below the Trend EMA → only short trades are considered.
This ensures trades are aligned with the larger trend, avoiding counter-trend signals.
2. Momentum Signal with MACD
MACD Calculation:
fastEMA - slowEMA generates the MACD line.
Signal line is an EMA of the MACD line.
delta = MACD - Signal measures the momentum difference.
Entry Logic:
Long Signal: delta crosses above zero AND the price is above the Trend EMA.
Short Signal: delta crosses below zero AND the price is below the Trend EMA.
This ensures that entries occur only when momentum is aligned with the overall trend.
3. Dynamic Risk Management (ATR-based SL/TP)
Uses Average True Range (ATR) to dynamically set stop loss and take profit:
Long Trade:
Stop Loss = Close - ATR * atrSLMult
Take Profit = Close + ATR * atrTPMult
Short Trade:
Stop Loss = Close + ATR * atrSLMult
Take Profit = Close - ATR * atrTPMult
This allows the strategy to adapt to market volatility, protecting capital in choppy conditions and scaling profit targets in trending markets.
4. Visual and Alert Features
Plots:
Trend EMA for visual trend guidance.
MACD delta to observe momentum.
Long/Short signals as small triangles directly on the chart.
Alerts:
Generates notifications for long and short signals to trigger timely trades.
5. Core Trading Philosophy
Trend-Following Bias: Only trade in the direction of the trend EMA.
Momentum Confirmation: Enter trades when the MACD delta confirms the move.
Volatility-Adjusted Risk: Use ATR to dynamically scale stops and targets.
Disclaimer / Risk Notice
Trading financial markets involves significant risk and may not be suitable for all investors. Past performance is not indicative of future results.
Market conditions can change rapidly and unpredictably, and no strategy can guarantee profits. Always use proper risk management and position sizing.
This strategy is for educational and informational purposes only. Users are responsible for their own trading decisions.
Expected Value Monte CarloI created this indicator after noticing that there was no Expected Value indicator here on TradingView.
The EVMC provides statistical Expected Value to what might happen in the future regarding the asset you are analyzing.
It uses 2 quantitative methods:
Historical Backtest to ground your analysis in long-term, factual data.
Monte Carlo Simulation to project a cone of probable future outcomes based on recent market behavior.
This gives you a data-driven edge to quantify risk, and make more informed trading decisions.
The indicator includes:
Dual analysis: Combines historical probability with forward-looking simulation.
Quantified projections: Provides the Expected Value ($ and %), Win Rate, and Sharpe Ratio for both methods.
Asset-aware: Automatically adjusts its calculations for Stocks (252 trading days) and Crypto (365 days) for mathematical accuracy.
The projection cone shows the mean expected path and the +/- 1 standard deviation range of outcomes.
No repainting
Calculation:
1. Historical Expected Value:
This is a systematic backtest over thousands of bars. It calculates the return Rᵢ for N past trades (buy-and-hold). The Historical EV is the simple average of these returns, giving a baseline performance measure.
Historical EV % = (Σ Rᵢ) / N
2. Monte Carlo Projection:
This projection uses the Geometric Brownian Motion (GBM) model to simulate thousands of future price paths based on the market's recent behavior.
It first measures the drift (μ), or recent trend, and volatility (σ), or recent risk, from the Projection Lookback period. It then projects a final return for each simulation using the core GBM formula:
Projected Return = exp( (μ - σ²/2)T + σ√T * Z ) - 1
(Where T is the time horizon and Z is a random variable for the simulation.)
The purple line on the chart is the average of all simulated outcomes (the Monte Carlo EV). The cone represents one standard deviation of those outcomes.
The dashed lines represent one standard deviation (+/- 1σ) from the average, forming a cone of probable outcomes. Roughly 68% of the simulated paths ended within this cone.
This projection answers the question: "If the recent trend and volatility continue, where is the price most likely to go?"
Here's how to read the indicator
Expected Value ($/%): Is my average trade profitable?
Win Rate: How often can I expect to be right?
Sharpe Ratio: Am I being adequately compensated for the risk I'm taking?
User Guide
Max trade duration (bars): This is your analysis timeframe. Are you interested in the probable outcome over the next month (21 bars), quarter (63 bars), or year (252 bars)?
Position size ($): Set this to your typical trade size to see the Expected Value in real dollar terms.
Projection lookback (bars): This is the most important input for the Monte Carlo model. A short lookback (e.g., 50) makes the projection highly sensitive to recent momentum. Use this to identify potential recency bias. A long lookback (e.g., 252) provides a more stable, long-term projection of trend and volatility.
Historical Lookback (bars): For the historical backtest, more data is always better. Use the maximum that your TradingView plan allows for the most statistically significant results.
Use TP/SL for Historical EV: Check this box to see how the historical performance would have changed if you had used a simple Take Profit and Stop Loss, rather than just holding for the full duration.
I hope you find this indicator useful and please let me know if you have any suggestions. 😊
Trendline Breakout Strategy [KedArc Quant] Description
A single, rule-based system that builds two trendlines from confirmed swing pivots and trades their breakouts, with optional retest, trend-regime gates (EMA / HTF EMA), and ATR-based risk. All parts serve one decision flow: structure → breakout → gated entry → managed risk.
What it does (for traders)
Draws Up line (teal) through the last two Higher Lows and Down line (red) through the last two Lower Highs, then extends them forward.
Long when price breaks above red; Short when price breaks below teal.
Optional Retest entry: after a break, wait for a pullback toward the broken line within an ATR-scaled buffer.
Uses ATR stop and R-multiple target so risk is consistent across symbols/timeframes.
Labels HL1/HL2/LH1/LH2 so non-coders can verify which pivots built each line.
Why these components are combined
Pure breakout systems on trendlines suffer from three practical issues:
False breaks in chop → solved by trend-regime gates (EMA / HTF EMA) that only allow trades aligned with the prevailing trend.
Uneven volatility across markets/timeframes → solved by ATR-based stop/target, normalizing distance so R-multiples are comparable.
First break whipsaws near wedge apices → mitigated by the optional retest rule that demands a pullback/hold before entry.
These modules are not separate indicators with their own signals. They are support roles inside one method.
The pivot engine defines structure, the breakout detector defines signal, the regime gates decide if we’re allowed to take that signal, and the ATR module sizes risk.
Together they make the trendline breakout usable, testable, and explainable.
How it works (mechanism; each component explained)
1) Pivot engine (structure, non-repainting)
Swings are confirmed with ta.pivotlow/high(L, R). A pivot only exists after R bars (no look-ahead), so once plotted, the line built from those pivots will not repaint.
2) Trendline builder (geometry)
Teal line updates when two consecutive pivot lows satisfy HL2.price > HL1.price (and HL2 occurs after HL1).
Red line updates when two consecutive pivot highs satisfy LH2.price < LH1.price.
Lines are extended right and their current value is read every bar via line.get_price().
3) Breakout detector (signal)
On every bar, compute:
crossover(close, redLine) ⇒ Long breakout
crossunder(close, tealLine) ⇒ Short breakdown
4) Regime gates (trend filters, not separate signals)
EMA gate: allow longs only if close > EMA(len), shorts only if close < EMA(len).
HTF EMA gate (optional): same rule on a higher timeframe to avoid fighting the larger trend.
These do not create entries; they simply permit or block the breakout signal.
5) Retest module (optional confirmation)
After a breakout, record the line price. A valid retest occurs if price pulls back within an ATR-scaled buffer toward that broken line and then closes back in the breakout direction.
This reduces first-tick fakeouts.
6) Risk module (position exit)
Initial stop = ATR(len) × atrMult from entry.
Target = tpR × (ATR × atrMult) (e.g., 2R).
This keeps results consistent across instruments/timeframes.
Entries & exits
Long entry
Base: close breaks above red and passes EMA/HTF gates.
Retest (if enabled): after the break, price pulls back near the broken red line (within the ATR buffer) and holds; then enter.
Short entry
Mirror logic with teal (break below & gates), optionally with a retest.
Exit
strategy.exit places ATR stop & R-multiple target automatically.
Optional “flip”: close if the opposite base signal triggers.
How to use it (step-by-step)
Timeframe: 1–15m for intraday, 1–4h for swing.
Start defaults: Pivot L/R = 5, EMA len = 200, ATR len = 14, ATR mult = 2, TP = 2R, Retest = ON.
Tune sensitivity:
Faster lines (more trades): set L/R = 3–4.
Fewer counter-trend trades: enable HTF EMA (e.g., 60-min or Daily).
Visual audit: labels HL1/HL2 & LH1/LH2 show which pivots built each line—verify by eye.
Alerts: use Long breakout, Short breakdown, and Retest alerts to automate.
Originality (why it merits publication)
Trades the visualization: many “auto-trendline” tools only draw lines; this one turns them into testable, alertable rules.
Integrated design: each component has a defined role in the same pipeline—no unrelated indicators bolted together.
Transparent & non-repainting: pivot confirmation removes look-ahead; labels let non-coders understand the setup that produced each signal.
Notes & limitations
Lines update only after pivot confirmation; that lag is intentional to avoid repainting.
Breakouts near an apex can whipsaw; prefer Retest and/or HTF gate in choppy regimes.
Backtests are idealized; forward-test and size risk appropriately.
⚠️ Disclaimer
This script is provided for educational purposes only.
Past performance does not guarantee future results.
Trading involves risk, and users should exercise caution and use proper risk management when applying this strategy.