SuperIchi StrategyTRADE CONDITIONS
Long entry:
Tenkan-Sen is above Kijun-Sen (blue line above red line)
Price closes above both Tenkan-Sen and Kijun-Sen (price closes above both blue and red lines)
Tenkan-Sen and Kijun-Sen is above Senkou Span (both blue and red lines are above cloud)
Senkou Span is green (cloud is green)
Price pulled back and closed below both Tenkan-Sen and Kijun-Sen within last X (configurable in settings) candles (price pulled back below blue and red lines)
Short entry:
Tenkan-Sen is below Kijun-Sen (blue line below red line)
Price closes below both Tenkan-Sen and Kijun-Sen (price closes below both blue and red lines)
Tenkan-Sen and Kijun-Sen is below Senkou Span (both blue and red lines are below cloud)
Senkou Span is red (cloud is red)
Price pulled back and closed above both Tenkan-Sen and Kijun-Sen within last X (configurable in settings) candles (price pulled back above blue and red lines)
Risk management:
Each trade risks 2% of account (configurable in settings)
SL size determined by swing low/high of previous X candles (configurable in settings) or using the ATR override (configurable in settings) where the max of swing high/low or ATR value will be used to calculate SL
TP is calculated by Risk:Reward ratio (configurable in settings)
TIPS
Timeframe: I have found best results running on anything 5M and above
CREDITS
SuperIchi by LuxAlgo
Cari dalam skrip untuk "entry"
Boom Hunter + Hull Suite + Volatility Oscillator StrategyTRADE CONDITIONS
Long entry:
Boom Hunter (leading indicator): Trigger line crosses over Quotient 2 line (white cross over red)
Hull Suite (trend confirmation): Price closed above hull suite line and hull suite is green (represented by horizontal line at -10 in strategy pane)
Volatility Oscillator (volatility confirmation): Volatility spike trigger line is above upper band (represented by horizontal line at -30 in strategy pane)
Short entry:
Boom Hunter (leading indicator): Trigger line crosses under Quotient 2 line (white cross under red)
Hull Suite (trend confirmation): Price closed below hull suite line and hull suite is red (represented by horizontal line at -10 in strategy pane)
Volatility Oscillator (volatility confirmation): Volatility spike trigger line is below lower band (represented by horizontal line at -30 in strategy pane)
Risk management:
Each trade risks 3% of account (configurable in settings)
SL size determined by swing low/high of previous X candles (configurable in settings) or 1 ATR if swing is less than 1 ATR
TP is calculated by Risk:Reward ratio (configurable in settings)
TIPS
Timeframe: I have found good results running on BTC/USDT 5M chart
Note: To help visual identification of trade entries and exits you may wish to add the Hull Suite and Volatility Oscillator to the chart separately. It was not possible to display them in a clear way within a single panel for the strategy. Make sure you set the settings of the auxiliary indicators to match what is in the settings of this indicator if you do decide to add them.
CREDITS
Boom Hunter Pro by veryfid
Hull Suite by InSilico
Volatility Oscillator by veryfid
QQE MOD + SSL Hybrid + Waddah Attar ExplosionTRADE CONDITIONS
Long entry:
QQE Mod changes to Blue (leading indicator)
SSL Hybrid is Blue and price is above MA Channel line
Waddah Attar Explosion is Green and above Explosion line
Short entry:
QQE Mod changes to Red (leading indicator)
SSL Hybrid is Red and price is below MA Channel line
Waddah Attar Explosion is Red and above Explosion line
Risk management:
Each trade risks 2% of account (configurable in settings)
SL size determined by swing low/high of previous X candles (configurable in settings)
TP is triggered on SSL Hybrid EXIT arrow signals
TIPS
Timeframe: Personally I've found best results running this on 1H timeframe.
Note: To help visual identification of trade entries and exits you may wish to add the SSL Hybrid and Waddah Attar Explosion to the chart separately. They are being used to determine trade entry/exit within the code of this strategy but it was not possible to display them in a clear way within a single panel. Make sure you set the settings of the auxiliary indicators to match what is in the settings of this indicator if you do decide to add them.
CREDITS
QQE MOD byMihkel00
SSL Hybrid by Mihkel00
Waddah Attar Explosion by shayankm
AVG Stochastic Strategy [M30 Backtesting]1. AVG Stochastic Calculate
1.1 AVG %K is calculated by apply EMA with smooth K period on Average of Original Stochastic %k & %d
+ avg_k=ema((%k+%d)/2,smoothK)
1.2 AVG %D is calculated by apply EMA with %d period on AVG %K
+ avg_d=ema(avg_k,periodD)
2. Parameter
+ %K Length: 21
+ %K Smoothing: 3
+ %D Smoothing: 3
+ Symbol: BTC/USDT
+ Timeframe: M30
+ Pyramiding: Maximum 3 orders at the same direction.
3. Signal
3.1 Buy Signal
+ Entry: AVG %K crossover AVG %D and AVG %D < 20
+ Exit: AVG %D > 80
3.2 Sell Signal
+ Entry: AVG %K crossunder AVG %D and AVG %D > 80
+ Exit: AVG %D < 20
Smoothed Waddah ATR~~~All Credit to LAZY BEAR for posting the original Script which is an old MT4 indicator.~~~~
No this system does not repaint... if it does let me know. Either the code is wrong or you are using a repainting chart such as renko candles.
*PURPOSE*
This Is an "Enhanced or Smoothed" version of the script that captures the heiken-ashi closing price as its main calculation variable. While using normal bar or line charts. Enhancements integrate trade filters to reduce false signals.
*WHAT TYPE OF TRADING STRATEGY IS THIS?*
This is a Long Only, Trend Trading System. Is intended to be applied to Charts/Timeframes that produce sustainable trends for which ever asset you are trading.
*NOTE OF ADVICE REGARDING SETTINGS*
Settings can be tweaked but I have found that best results come with the given settings. If a chart is too choppy to trade this indicator successfully, it is advised not to change the settings but either find a different timeframe or different asset to apply this strategy to.
TLDR
Indicator measures the change of the MacD (difference between MAC D of given EMA's) and compares it to the difference between the Upper and Lower Bollinger bands. Green bar over trigger line= entry. Red bar over trigger line = close.
*SETTINGS AND INPUTS*
-MacD of HeikenAshi chart (will always be of the Heikenashi chart even when applied to different chart type)
sensitivity = input(150, title='Sensitivity') =range should be (125-175)multiplier so that MacD can be compared to BB
fastLength = input(20, title='MacD FastEMA Length')
slowLength = input(40, title='MacD SlowEMA Length')
-Bollinger Band of currently used price chart type
channelLength = input(20, title='BB Channel Length')
mult = input(1.5, title='BB Stdev Multiplier')
-14 Period RSI Trade Filter (set to 0 to Disable)
RSI14filter = input(40, title='RSI Value trade filter') =only gives entry when RSI is higher than given value
*ABSTRACT & CONCEPT*
TLDR - Indicator measures the change of the MacD (difference between MAC D of given EMA's) and compares it to the difference between the Upper and Lower Bollinger bands. Green bar over trigger line= entry. Red bar over trigger line = close.
Indicator plots -
Bars are the change in the MAC D and the indicator line is the difference in the BB.
When Bars are higher than the indicator line then it is considered a trend "Explosion"
Green Bars are Trend Explosion to the upside, Red Bars are Trend explosion to the downside.
GENERAL DETAIL-
the core calculation is measuring the change in MacD of current candle compared to the MacD of two previous candles.
This value is multiplied by the sensitivy so it can be compared to the change in Bollinger Band Width.
if the MACD change is positive then you get a green/lime bar for that value. If the MacDchange is negative you get a red/orange bar for that value.
and are determined by whether the actual change is increasing in that direction or decreasing. (bars getting taller or bars getting shorter)
Entry signal for long is A positive change in MACD difference (Green bar) that is greater than the change of the bollinger band (orange signal line) AND if the RSI value is above your filter.
Close signal or Trend Stop Warning Signal is given when a Negative MacD Difference (red bar) is greater than the change of the bollinger band (orange Line)
*CONSIDERATIONS AND THOUGHTS*
I have over 150 iterations of this indicator and this is the most consistent and best version of settings and filters I was able to generate. I built this indicator specifically for 3 charts. SPY monthly, QQQ monthly, BTC 3 Day. However this indicator works well on any long term bullish chart. (tech stocks are great) .
Trend trading systems are intended to be homerun hitting, plunge protecting indicators that allow for long legs and expanding volatility. This indicator does this as the trigger line is Dynamic with the expansion and contraction of the bollinger band.
I do not take every signal specifically not the close signals. Instead they more like warnings in ultra bullish environments.
If i had to pair this indicator with any other filter than the RSI, it would be a long term moving average i.e. the 50 week or equivalent for your chart. signals above rising moving averages means that you are trading with an upward trending market.
Hope this helps. Happy trades.
-SnarkyPuppy
Webhook Starter Kit [HullBuster]
Introduction
This is an open source strategy which provides a framework for webhook enabled projects. It is designed to work out-of-the-box on any instrument triggering on an intraday bar interval. This is a full featured script with an emphasis on actual trading at a brokerage through the TradingView alert mechanism and without requiring browser plugins.
The source code is written in a self documenting style with clearly defined sections. The sections “communicate” with each other through state variables making it easy for the strategy to evolve and improve. This is an excellent place for Pine Language beginners to start their strategy building journey. The script exhibits many Pine Language features which will certainly ad power to your script building abilities.
This script employs a basic trend follow strategy utilizing a forward pyramiding technique. Trend detection is implemented through the use of two higher time frame series. The market entry setup is a Simple Moving Average crossover. Positions exit by passing through conditional take profit logic. The script creates ten indicators including a Zscore oscillator to measure support and resistance levels. The indicator parameters are exposed through 47 strategy inputs segregated into seven sections. All of the inputs are equipped with detailed tool tips to help you get started.
To improve the transition from simulation to execution, strategy.entry and strategy.exit calls show enhanced message text with embedded keywords that are combined with the TradingView placeholders at alert time. Thereby, enabling a single JSON message to generate multiple execution events. This is genius stuff from the Pine Language development team. Really excellent work!
This document provides a sample alert message that can be applied to this script with relatively little modification. Without altering the code, the strategy inputs can alter the behavior to generate thousands of orders or simply a few dozen. It can be applied to crypto, stocks or forex instruments. A good way to look at this script is as a webhook lab that can aid in the development of your own endpoint processor, impress your co-workers and have hours of fun.
By no means is a webhook required or even necessary to benefit from this script. The setups, exits, trend detection, pyramids and DCA algorithms can be easily replaced with more sophisticated versions. The modular design of the script logic allows you to incrementally learn and advance this script into a functional trading system that you can be proud of.
Design
This is a trend following strategy that enters long above the trend line and short below. There are five trend lines that are visible by default but can be turned off in Section 7. Identified, in frequency order, as follows:
1. - EMA in the chart time frame. Intended to track price pressure. Configured in Section 3.
2. - ALMA in the higher time frame specified in Section 2 Signal Line Period.
3. - Linear Regression in the higher time frame specified in Section 2 Signal Line Period.
4. - Linear Regression in the higher time frame specified in Section 2 Signal Line Period.
5. - DEMA in the higher time frame specified in Section 2 Trend Line Period.
The Blue, Green and Orange lines are signal lines are on the same time frame. The time frame selected should be at least five times greater than the chart time frame. The Purple line represents the trend line for which prices above the line suggest a rising market and prices below a falling market. The time frame selected for the trend should be at least five times greater than the signal lines.
Three oscillators are created as follows:
1. Stochastic - In the chart time frame. Used to enter forward pyramids.
2. Stochastic - In the Trend period. Used to detect exit conditions.
3. Zscore - In the Signal period. Used to detect exit conditions.
The Stochastics are configured identically other than the time frame. The period is set in Section 2.
Two Simple Moving Averages provide the trade entry conditions in the form of a crossover. Crossing up is a long entry and down is a short. This is in fact the same setup you get when you select a basic strategy from the Pine editor. The crossovers are configured in Section 3. You can see where the crosses are occurring by enabling Show Entry Regions in Section 7.
The script has the capacity for pyramids and DCA. Forward pyramids are enabled by setting the Pyramid properties tab with a non zero value. In this case add on trades will enter the market on dips above the position open price. This process will continue until the trade exits. Downward pyramids are available in Crypto and Range mode only. In this case add on trades are placed below the entry price in the drawdown space until the stop is hit. To enable downward pyramids set the Pyramid Minimum Span In Section 1 to a non zero value.
This implementation of Dollar Cost Averaging (DCA) triggers off consecutive losses. Each loss in a run increments a sequence number. The position size is increased as a multiple of this sequence. When the position eventually closes at a profit the sequence is reset. DCA is enabled by setting the Maximum DCA Increments In Section 1 to a non zero value.
It should be noted that the pyramid and DCA features are implemented using a rudimentary design and as such do not perform with the precision of my invite only scripts. They are intended as a feature to stress test your webhook endpoint. As is, you will need to buttress the logic for it to be part of an automated trading system. It is for this reason that I did not apply a Martingale algorithm to this pyramid implementation. But, hey, it’s an open source script so there is plenty of room for learning and your own experimentation.
How does it work
The overall behavior of the script is governed by the Trading Mode selection in Section 1. It is the very first input so you should think about what behavior you intend for this strategy at the onset of the configuration. As previously discussed, this script is designed to be a trend follower. The trend being defined as where the purple line is predominately heading. In BiDir mode, SMA crossovers above the purple line will open long positions and crosses below the line will open short. If pyramiding is enabled add on trades will accumulate on dips above the entry price. The value applied to the Minimum Profit input in Section 1 establishes the threshold for a profitable exit. This is not a hard number exit. The conditional exit logic must be satisfied in order to permit the trade to close. This is where the effort put into the indicator calibration is realized. There are four ways the trade can exit at a profit:
1. Natural exit. When the blue line crosses the green line the trade will close. For a long position the blue line must cross under the green line (downward). For a short the blue must cross over the green (upward).
2. Alma / Linear Regression event. The distance the blue line is from the green and the relative speed the cross is experiencing determines this event. The activation thresholds are set in Section 6 and relies on the period and length set in Section 2. A long position will exit on an upward thrust which exceeds the activation threshold. A short will exit on a downward thrust.
3. Exponential event. The distance the yellow line is from the blue and the relative speed the cross is experiencing determines this event. The activation thresholds are set in Section 3 and relies on the period and length set in the same section.
4. Stochastic event. The purple line stochastic is used to measure overbought and over sold levels with regard to position exits. Signal line positions combined with a reading over 80 signals a long profit exit. Similarly, readings below 20 signal a short profit exit.
Another, optional, way to exit a position is by Bale Out. You can enable this feature in Section 1. This is a handy way to reduce the risk when carrying a large pyramid stack. Instead of waiting for the entire position to recover we exit early (bale out) as soon as the profit value has doubled.
There are lots of ways to implement a bale out but the method I used here provides a succinct example. Feel free to improve on it if you like. To see where the Bale Outs occur, enable Show Bale Outs in Section 7. Red labels are rendered below each exit point on the chart.
There are seven selectable Trading Modes available from the drop down in Section 1:
1. Long - Uses the strategy.risk.allow_entry_in to execute long only trades. You will still see shorts on the chart.
2. Short - Uses the strategy.risk.allow_entry_in to execute short only trades. You will still see long trades on the chart.
3. BiDir - This mode is for margin trading with a stop. If a long position was initiated above the trend line and the price has now fallen below the trend, the position will be reversed after the stop is hit. Forward pyramiding is available in this mode if you set the Pyramiding value in the Properties tab. DCA can also be activated.
4. Flip Flop - This is a bidirectional trading mode that automatically reverses on a trend line crossover. This is distinctively different from BiDir since you will get a reversal even without a stop which is advantageous in non-margin trading.
5. Crypto - This mode is for crypto trading where you are buying the coins outright. In this case you likely want to accumulate coins on a crash. Especially, when all the news outlets are talking about the end of Bitcoin and you see nice deep valleys on the chart. Certainly, under these conditions, the market will be well below the purple line. No margin so you can’t go short. Downward pyramids are enabled for Crypto mode when two conditions are met. First the Pyramiding value in the Properties tab must be non zero. Second the Pyramid Minimum Span in Section 1 must be non zero.
6. Range - This is a counter trend trading mode. Longs are entered below the purple trend line and shorts above. Useful when you want to test your webhook in a market where the trend line is bisecting the signal line series. Remember that this strategy is a trend follower. It’s going to get chopped out in a range bound market. By turning on the Range mode you will at least see profitable trades while stuck in the range. However, when the market eventually picks a direction, this mode will sustain losses. This range trading mode is a rudimentary implementation that will need a lot of improvement if you want to create a reliable switch hitter (trend/range combo).
7. No Trade. Useful when setting up the trend lines and the entry and exit is not important.
Once in the trade, long or short, the script tests the exit condition on every bar. If not a profitable exit then it checks if a pyramid is required. As mentioned earlier, the entry setups are quite primitive. Although they can easily be replaced by more sophisticated algorithms, what I really wanted to show is the diminished role of the position entry in the overall life of the trade. Professional traders spend much more time on the management of the trade beyond the market entry. While your trade entry is important, you can get in almost anywhere and still land a profitable exit.
If DCA is enabled, the size of the position will increase in response to consecutive losses. The number of times the position can increase is limited by the number set in Maximum DCA Increments of Section 1. Once the position breaks the losing streak the trade size will return the default quantity set in the Properties tab. It should be noted that the Initial Capital amount set in the Properties tab does not affect the simulation in the same way as a real account. In reality, running out of money will certainly halt trading. In fact, your account would be frozen long before the last penny was committed to a trade. On the other hand, TradingView will keep running the simulation until the current bar even if your funds have been technically depleted.
Entry and exit use the strategy.entry and strategy.exit calls respectfully. The alert_message parameter has special keywords that the endpoint expects to properly calculate position size and message sequence. The alert message will embed these keywords in the JSON object through the {{strategy.order.alert_message}} placeholder. You should use whatever keywords are expected from the endpoint you intend to webhook in to.
Webhook Integration
The TradingView alerts dialog provides a way to connect your script to an external system which could actually execute your trade. This is a fantastic feature that enables you to separate the data feed and technical analysis from the execution and reporting systems. Using this feature it is possible to create a fully automated trading system entirely on the cloud. Of course, there is some work to get it all going in a reliable fashion. Being a strategy type script place holders such as {{strategy.position_size}} can be embedded in the alert message text. There are more than 10 variables which can write internal script values into the message for delivery to the specified endpoint.
Entry and exit use the strategy.entry and strategy.exit calls respectfully. The alert_message parameter has special keywords that my endpoint expects to properly calculate position size and message sequence. The alert message will embed these keywords in the JSON object through the {{strategy.order.alert_message}} placeholder. You should use whatever keywords are expected from the endpoint you intend to webhook in to.
Here is an excerpt of the fields I use in my webhook signal:
"broker_id": "kraken",
"account_id": "XXX XXXX XXXX XXXX",
"symbol_id": "XMRUSD",
"action": "{{strategy.order.action}}",
"strategy": "{{strategy.order.id}}",
"lots": "{{strategy.order.contracts}}",
"price": "{{strategy.order.price}}",
"comment": "{{strategy.order.alert_message}}",
"timestamp": "{{time}}"
Though TradingView does a great job in dispatching your alert this feature does come with a few idiosyncrasies. Namely, a single transaction call in your script may cause multiple transmissions to the endpoint. If you are using placeholders each message describes part of the transaction sequence. A good example is closing a pyramid stack. Although the script makes a single strategy.close() call, the endpoint actually receives a close message for each pyramid trade. The broker, on the other hand, only requires a single close. The incongruity of this situation is exacerbated by the possibility of messages being received out of sequence. Depending on the type of order designated in the message, a close or a reversal. This could have a disastrous effect on your live account. This broker simulator has no idea what is actually going on at your real account. Its just doing the job of running the simulation and sending out the computed results. If your TradingView simulation falls out of alignment with the actual trading account lots of really bad things could happen. Like your script thinks your are currently long but the account is actually short. Reversals from this point forward will always be wrong with no one the wiser. Human intervention will be required to restore congruence. But how does anyone find out this is occurring? In closed systems engineering this is known as entropy. In practice your webhook logic should be robust enough to detect these conditions. Be generous with the placeholder usage and give the webhook code plenty of information to compare states. Both issuer and receiver. Don’t blindly commit incoming signals without verifying system integrity.
Setup
The following steps provide a very brief set of instructions that will get you started on your first configuration. After you’ve gone through the process a couple of times, you won’t need these anymore. It’s really a simple script after all. I have several example configurations that I used to create the performance charts shown. I can share them with you if you like. Of course, if you’ve modified the code then these steps are probably obsolete.
There are 47 inputs divided into seven sections. For the most part, the configuration process is designed to flow from top to bottom. Handy, tool tips are available on every field to help get you through the initial setup.
Step 1. Input the Base Currency and Order Size in the Properties tab. Set the Pyramiding value to zero.
Step 2. Select the Trading Mode you intend to test with from the drop down in Section 1. I usually select No Trade until I’ve setup all of the trend lines, profit and stop levels.
Step 3. Put in your Minimum Profit and Stop Loss in the first section. This is in pips or currency basis points (chart right side scale). Remember that the profit is taken as a conditional exit not a fixed limit. The actual profit taken will almost always be greater than the amount specified. The stop loss, on the other hand, is indeed a hard number which is executed by the TradingView broker simulator when the threshold is breached.
Step 4. Apply the appropriate value to the Tick Scalar field in Section 1. This value is used to remove the pipette from the price. You can enable the Summary Report in Section 7 to see the TradingView minimum tick size of the current chart.
Step 5. Apply the appropriate Price Normalizer value in Section 1. This value is used to normalize the instrument price for differential calculations. Basically, we want to increase the magnitude to significant digits to make the numbers more meaningful in comparisons. Though I have used many normalization techniques, I have always found this method to provide a simple and lightweight solution for less demanding applications. Most of the time the default value will be sufficient. The Tick Scalar and Price Normalizer value work together within a single calculation so changing either will affect all delta result values.
Step 6. Turn on the trend line plots in Section 7. Then configure Section 2. Try to get the plots to show you what’s really happening not what you want to happen. The most important is the purple trend line. Select an interval and length that seem to identify where prices tend to go during non-consolidation periods. Remember that a natural exit is when the blue crosses the green line.
Step 7. Enable Show Event Regions in Section 7. Then adjust Section 6. Blue background fills are spikes and red fills are plunging prices. These measurements should be hard to come by so you should see relatively few fills on the chart if you’ve set this up as intended. Section 6 includes the Zscore oscillator the state of which combines with the signal lines to detect statistically significant price movement. The Zscore is a zero based calculation with positive and negative magnitude readings. You want to input a reasonably large number slightly below the maximum amplitude seen on the chart. Both rise and fall inputs are entered as a positive real number. You can easily use my code to create a separate indicator if you want to see it in action. The default value is sufficient for most configurations.
Step 8. Turn off Show Event Regions and enable Show Entry Regions in Section 7. Then adjust Section 3. This section contains two parts. The entry setup crossovers and EMA events. Adjust the crossovers first. That is the Fast Cross Length and Slow Cross Length. The frequency of your trades will be shown as blue and red fills. There should be a lot. Then turn off Show Event Regions and enable Display EMA Peaks. Adjust all the fields that have the word EMA. This is actually the yellow line on the chart. The blue and red fills should show much less than the crossovers but more than event fills shown in Step 7.
Step 9. Change the Trading Mode to BiDir if you selected No Trades previously. Look on the chart and see where the trades are occurring. Make adjustments to the Minimum Profit and Stop Offset in Section 1 if necessary. Wider profits and stops reduce the trade frequency.
Step 10. Go to Section 4 and 5 and make fine tuning adjustments to the long and short side.
Example Settings
To reproduce the performance shown on the chart please use the following configuration: (Bitcoin on the Kraken exchange)
1. Select XBTUSD Kraken as the chart symbol.
2. On the properties tab set the Order Size to: 0.01 Bitcoin
3. On the properties tab set the Pyramiding to: 12
4. In Section 1: Select “Crypto” for the Trading Model
5. In Section 1: Input 2000 for the Minimum Profit
6. In Section 1: Input 0 for the Stop Offset (No Stop)
7. In Section 1: Input 10 for the Tick Scalar
8. In Section 1: Input 1000 for the Price Normalizer
9. In Section 1: Input 2000 for the Pyramid Minimum Span
10. In Section 1: Check mark the Position Bale Out
11. In Section 2: Input 60 for the Signal Line Period
12. In Section 2: Input 1440 for the Trend Line Period
13. In Section 2: Input 5 for the Fast Alma Length
14. In Section 2: Input 22 for the Fast LinReg Length
15. In Section 2: Input 100 for the Slow LinReg Length
16. In Section 2: Input 90 for the Trend Line Length
17. In Section 2: Input 14 Stochastic Length
18. In Section 3: Input 9 Fast Cross Length
19. In Section 3: Input 24 Slow Cross Length
20. In Section 3: Input 8 Fast EMA Length
21. In Section 3: Input 10 Fast EMA Rise NetChg
22. In Section 3: Input 1 Fast EMA Rise ROC
23. In Section 3: Input 10 Fast EMA Fall NetChg
24. In Section 3: Input 1 Fast EMA Fall ROC
25. In Section 4: Check mark the Long Natural Exit
26. In Section 4: Check mark the Long Signal Exit
27. In Section 4: Check mark the Long Price Event Exit
28. In Section 4: Check mark the Long Stochastic Exit
29. In Section 5: Check mark the Short Natural Exit
30. In Section 5: Check mark the Short Signal Exit
31. In Section 5: Check mark the Short Price Event Exit
32. In Section 5: Check mark the Short Stochastic Exit
33. In Section 6: Input 120 Rise Event NetChg
34. In Section 6: Input 1 Rise Event ROC
35. In Section 6: Input 5 Min Above Zero ZScore
36. In Section 6: Input 120 Fall Event NetChg
37. In Section 6: Input 1 Fall Event ROC
38. In Section 6: Input 5 Min Below Zero ZScore
In this configuration we are trading in long only mode and have enabled downward pyramiding. The purple trend line is based on the day (1440) period. The length is set at 90 days so it’s going to take a while for the trend line to alter course should this symbol decide to node dive for a prolonged amount of time. Your trades will still go long under those circumstances. Since downward accumulation is enabled, your position size will grow on the way down.
The performance example is Bitcoin so we assume the trader is buying coins outright. That being the case we don’t need a stop since we will never receive a margin call. New buy signals will be generated when the price exceeds the magnitude and speed defined by the Event Net Change and Rate of Change.
Feel free to PM me with any questions related to this script. Thank you and happy trading!
CFTC RULE 4.41
These results are based on simulated or hypothetical performance results that have certain inherent limitations. Unlike the results shown in an actual performance record, these results do not represent actual trading. Also, because these trades have not actually been executed, these results may have under-or over-compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated or hypothetical trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profits or losses similar to these being shown.
3Commas BotBjorgum 3Commas Bot
A strategy in a box to get you started today
With 3rd party API providers growing in popularity, many are turning to automating their strategies on their favorite assets. With so many options and layers of customization possible, TradingView offers a place no better for young or even experienced coders to build a platform from to meet these needs. 3Commas has offered easy access with straight forward TradingView compatibility. Before long many have their brokers hooked up and are ready to send their alerts (or perhaps they have been trying with mixed success for some time now) only they realize there might just be a little bit more to building a strategy that they are comfortable letting out of their sight to trade their money while they eat, sleep, etc. Many may have ideas for entry criteria they are excited to try, but further questions arise... "What about risk mitigation?" "How can I set stop or limit orders?" "Is there not some basic shell of a strategy that has laid some of this out for me to get me going?"
Well now there is just that. This strategy is meant for those that have begun to delve into the world of algorithmic trading providing a template that offers risk defined positions complete with stops, limit orders, and even trailing stops should one so choose to employ any of these criteria. It provides a framework that is easily manipulated (with some basic working knowledge of pine coding) to encompass ones own ideas and entry criteria, while also providing an already functioning strategy.
The default settings have a basic 1:1 risk to reward ratio, which sets a limit and a stop equal distance from the entry. The entry is a simple MA cross (up for long, down for short). There a variety of MA's to choose from and the user can define the lengths of the averages. The ratio can be adjusted from the menu along with a volatility based adder (ATR) that helps to distance a stop from support or resistance. These values are calculated off the swing low/high of the user defined lookback period. Risk is calculated from position entry to stop, and projected upwards to the limit as a function of the desired risk to reward ratio. Of note: the default settings include 0.05% commissions. Competitive commissions of the leading cryptocurrency exchanges are .1% round trip (one buy and one sell) for market orders. There is also some slippage to allow time for alerts to be sent and orders to fill giving the back test results a more accurate representation of real time conditions. Its recommended to research the going rates for your exchange and set them to default for the strategy you use or build.
To get started a user would:
1) Make a copy of the code and paste in their bot keys in the area provided under the "3Comma Keys" section
- eg. Long bot "start deal" copied from 3commas in to define "Long" etc. (code is commented)
2) Place alert on desired asset with desired settings ensuring to select "Order fills and alert() function calls"
3) Paste webhook into the webhook box and select webhook URL alerts (3rd party provided webhook)
3) Delete contents of alert message box and replace with {{strategy.order.alert_message}} and nothing else
- the codes will be sent to the webhook appropriately as the strategy enters and exits positions. Only 1 alert is needed
settings used for the display image:
1hr chart on BTCUSD
-ATR stop
-Risk adjustment 1.2
-ATR multiplier 1.3
-RnR 0.6
-MAs HEMA/SMA
-MA Length 50/100
-Order size percent of equity
-Trail trigger 60% of target
Experiment with your own settings on your crypto of choice or implement your own code!
Implementing your trailing stop (optional)
Among the options for possible settings is a trailing stop. This stop will ratchet higher once triggered as a function of the Average True Range (ATR). There is a variable level to choose where the user would like to begin trailing the stop during the trade. The level can be assigned with a decimal between 0 and 1 (eg. 0.5 = 50% of the distance between entry and the target which must be exceeded before the trail triggers to begin). This can allow for some dips to occur during the trade possibly keeping you in the trade for longer, while potentially reducing risk of drawdown over time. The default for this setting is 0 meaning unless adjusted, the trail will trigger on entry if the trailing stop exit method is selected. An example can be seen below:
Again, optional as well is the choice to implement a limit order. If one were to select a trailing stop they could choose not to set a limit, which could allow a trail to run further until hit. Drawdowns of this strategy would be foregoing locking gains at highs on target on other trades. This is a trade-off the user can decide on and test. An example of this working in favor can be observed below:
Conclusion
Although a simple strategy is implemented here, the benefits of this script allow a user a starting platform to build their strategies from with built in risk mitigation. This allows the user to sidestep some of the potential difficulties' that can arise while learning Pine and taking on the endeavor of automating their trading strategies. It is meant as an aid, a structure, and an educational piece that can be seen as a "pick-up-and-go" strategy with easy 3Commas compatibility. Additionally, this can help users become more comfortable with strategy alert messages and sending strings in the form of alerts from Pine. As well, FAQs are often littered with questions regarding "strategy.exit" calls, how to implement stops. how to properly set a trailing stop based on ATR, and more. The time this can save an individual to get started is likely of the best "take-aways" here.
Happy trading
RSI Moving Average with Signal LineDefault values:
RSI = white
RSI Prime ( RSI of RSI ) = yellow
EMA 34 = blue
EMA 55 = red
They are listed in order of reactiveness to price changes. Think of them like the Williams Alligator...
White and yellow work the fastest, with WHITE being signal and YELLOW being trigger. Great for LTF
Blue and red work the slowest, with BLUE being frequently testing RED as support/resistance. Great for HTF
Long Entry:
RSIs both > SMAS (signal)
RSI > RSI Prime (confirmation)
Long Exit:
RSI < RSI Prime (signal)
RSIs both < SMAs (confirmation)
Short Entry:
RSIs both < SMAS (signal)
RSI < RSI Prime (confirmation)
Short Exit:
RSI > RSI Prime (signal)
RSIs both > SMAS (confirmation)
Triple EMA Scalper low lag stratHi all,
This strategy is based on the Amazing scalper for majors with risk management by SoftKill21
The change is in lines 11-20 where the sma's are replaced with Triple ema's to
lower the lag.
The original author is SoftKill21. His explanation is repeated below:
Best suited for 1M time frame and majors currency pairs.
Note that I tried it at 3M time frame.
Its made of :
Ema ( exponential moving average ) , long period 25
Ema ( exponential moving average ) Predictive, long period 50,
Ema ( exponential moving average ) Predictive, long period 100
Risk management , risking % of equity per trade using stop loss and take profits levels.
Long Entry:
When the Ema 25 cross up through the 50 Ema and 100 EMA . and we are in london or new york session( very important the session, imagine if we have only american or european currencies, its best to test it)
Short Entry:
When the Ema 25 cross down through the 50 Ema and 100 EMA , and we are in london or new york session( very important the session, imagine if we have only american or european currencies, its best to test it)
Exit:
TargetPrice: 5-10 pips
Stop loss: 9-12 pips
Amazing scalper for majors with risk managementHello,
Today I am glad to bring you an amazing simple and efficient scalper strategy.
Best suited for 1M time frame and majors currency pairs.
Its made of :
Ema (exponential moving average) , long period 25
Ema(exponential moving average) Predictive, long period 50,
Ema(exponential moving average) Predictive, long period 100
Risk management , risking % of equity per trade using stop loss and take profits levels.
Long Entry:
When the Ema 25 cross up through the 50 Ema and 100 EMA. and we are in london or new york session( very important the session, imagine if we have only american or european currencies, its best to test it)
Short Entry:
When the Ema 25 cross down through the 50 Ema and 100 EMA, and we are in london or new york session( very important the session, imagine if we have only american or european currencies, its best to test it)
Exit:
TargetPrice: 5-10 pips
Stop loss: 9-12 pips
Hope you enjoy it :)
percentrank strategySrategy for percentrank
Percent rank is the percents of how many previous values was less than or equal to the current value of given series.
long entry: intersection line 1 from bottom to top
short entry: crossing line 2 from top to bottom
Стратегия для индикатора percentrank
Процентный рейтинг — это процент от количества предыдущих значений, которые были меньше или равны текущему значению данной серии.
вход в лонг: пересечение line 1 снизу вверх
вход в шорт: пересечение line 2 сверху вниз
SEPA Sell Signal IndicatorSEPA Sell Signal Indicator - Documentation
Overview
A comprehensive exit signal indicator designed to work alongside the main SEPA (Stage, EMA, Price Action) indicator. It detects entry points via SEPA base breakouts and provides intelligent sell signals to protect profits and limit losses.
Core Features
Entry Detection
Automatically detects SEPA base breakout patterns
Tracks entry price and calculates swing low reference
Monitors position status (LONG/FLAT)
5 Sell Triggers
Price < EMA50 (Technical weakness)
Protected by EMA10 system (see below)
Trend Broken (Price < EMA150 AND EMA200)
Major trend reversal signal
Not protected - always fires
EMA Cross (EMA50 < EMA150)
Death cross indicating momentum shift
Not protected - always fires
Swing Low Broken (Price < Previous Swing Low)
Hard stop loss trigger
Lookback period: 10 bars (adjustable 5-50)
Not protected - always fires
Relative Strength Negative (RS vs NIFTY500 < 0)
Stock underperforming benchmark index
Based on 21-period EMA comparison
Not protected - always fires
EMA10 Protection System (Refinement Feature)
Purpose
Prevents premature exits during healthy pullbacks in strong uptrends.
Protection Criteria (All must be true)
✅ Stock in uptrend (EMA50 > EMA150 > EMA200)
✅ Price above EMA10
✅ Price above EMA50
✅ Only protects Condition 1 (Price < EMA50)
Two-Stage Warning System
Stage 1: Yellow "CAUTION" Signal
Appears when Condition 1 triggers but protection is active
Grace period begins (default: 5 bars)
Allows time for price to recover
Stage 2: Red "SELL" Signal
Fires when ANY of these occur:
Warning timer expires (5/5 bars)
Price drops below EMA10
Price drops below EMA50
Uptrend ends
Any other sell condition (2-5) triggers
Settings
Enable EMA10 Protection: ON/OFF toggle (default: ON)
Protection Time Limit: 1-20 bars (default: 5)
Visual Elements
Chart Signals
🔴 Red Triangle (SELL): Confirmed sell signal - exit position
🟡 Yellow Circle (CAUTION): Warning - monitor closely
🟢 Green Background Tint: Currently in position
Information Tables
Top Right - Sell Conditions Table
Shows real-time status of all 5 conditions
✓ (Green) = Condition NOT met (safe)
✓ (Red) = Condition met (danger)
⚠ (Yellow) = Warning active (monitoring)
Displays EMA10 protection status (ON/OFF)
Shows warning timer (e.g., "3/5")
Bottom Right - Position Details (when in position)
Entry price
Swing low level
Relative strength value (color-coded)
Current P&L percentage
Bottom Right - Status (when flat)
Shows "NO POSITION"
Indicates waiting for "BASE BREAKOUT"
Alert System
Entry Signal: SEPA base breakout detected
Warning Alert: Caution - price below EMA50 but protected
EMA50 Break: Sell confirmed after protection expires
Trend Break: Major reversal - exit immediately
EMA Cross: Death cross - exit immediately
Swing Low Break: Hard stop - exit immediately
RS Negative: Underperformance - exit immediately
Configuration Parameters
ParameterDefaultRangeDescriptionEMA 10101-50Fast moving average for protectionEMA 50501-200Primary trend indicatorEMA 1501501-300Medium-term trendEMA 2002001-500Long-term trendSwing Low Lookback105-50Bars to find previous swing lowRS EMA215-50Period for relative strength calcBenchmarkCNX500-Index for RS comparisonProtection Time Limit51-20Max bars for warning stateTable Text Size1 (Small)0-40=Tiny, 4=HugeEMA10 ProtectionONON/OFFEnable/disable protection
Trading Workflow
Entry: Indicator detects SEPA base breakout
Monitoring: Track 5 sell conditions in real-time
Warning: Yellow CAUTION if minor weakness (Condition 1 only)
Grace Period: 5 bars to recover or confirm breakdown
Exit: Red SELL signal when conditions confirm weakness
Reset: Returns to flat, waits for next base breakout
Key Advantages
✅ Selective Protection: Only protects shallow pullbacks, not real breakdowns
✅ Time-Limited: Won't delay exits indefinitely (5-bar max)
✅ Multi-Layered: 5 independent sell conditions
✅ Visual Clarity: Color-coded signals and comprehensive tables
✅ Customizable: All parameters adjustable for your style
✅ Alert System: Never miss a critical signal
Philosophy
The indicator balances two competing goals:
Stay in winning trades during healthy pullbacks
Exit quickly when trends genuinely reverse
The refined EMA10 protection system achieves this by giving breathing room for minor dips while ensuring swift exits on confirmed weakness.
Dow Theory Cockpit1. Evolution History
The system has reached its final form through five distinct development phases:
Phase 1: Logic Development (V1–V6)
Established four core logics: BREAK and DIP (Dow Theory), SNIPER (Reversal), and PUSH (Trend continuation).
Implemented the Multi-Timeframe (MTF) panel and Market Scanner.
Phase 2: Strategy Transition (V7–V9)
Integrated backtesting features, but found the Pine Script calculation load too heavy for real-time charting.
Phase 3: Optimization & Performance (V10–V11)
Prioritized smooth real-time execution by returning to a lightweight indicator format.
Introduced the on-chart stats panel for Win Rate and P&L tracking.
Phase 4: Visual Completion (V12–V13)
High-Vis Fib: Bold orange lines highlighting the Golden Zone (38.2%/61.8%).
Visual Zones: Introduced Green and Red bands for intuitive trade tracking.
Phase 5: Smart Adjust Implementation (V14 - Current)
Barrier Avoidance: Automatically detects nearby Support/Resistance boxes and shortens the TP to secure profits before a potential reversal.
Dynamic RR Optimization: Automatically adjusts the SL in tandem with the shortened TP to maintain a healthy Risk-Reward ratio.
2. Specifications
Name: Dow Theory Cockpit
Format: Indicator
Trading Style: Scalping to Day Trading
Timeframes: 5M, 15M (Recommended), 1H
Assets: All pairs (Gold, Crypto, Forex, Indices)
3. Features
① Quad-Logic Entry Signals
🎯 SNIPER: Reversal logic targeting "Tops and Bottoms" when the market is overextended.
🌊 DIP: Trend-following logic for "Deep Pullbacks" with clean Moving Average alignment.
⚡ PUSH: Scalping logic for "Shallow Pullbacks" during high-momentum trends.
🚀 BREAK: Classic Dow Theory momentum entry on recent High/Low breakouts.
② Visual Analysis Tools
S/R BOX: Displays key price levels as shaded zones to account for market noise and wick volatility.
High-Vis Auto Fib: Automatically plots Fibonacci levels, highlighting the Golden Zone with bold lines.
③ Bulletproof Money Management
Calculated Lot Size: Displays the precise lot size based on your account balance and Risk % directly on the signal label.
TP/SL Zones: Dynamic Green and Red bands show exactly where your profit and loss targets lie.
④ Smart Adjust Function (NEW)
Logic: Automatically scans for strong S/R walls near your entry.
Normal Condition: Displays TP/SL at your default Risk-Reward ratio.
Wall Detected: Automatically pulls the TP to the edge of the barrier and tightens the SL to maintain the ratio.
Alert: A "⚠️Adj" warning appears on the label when this adjustment is active.
⑤ Integrated Info Panel
Main Panel: Trends across all timeframes, real-time Win Rate, and Period Net P&L.
Scanner: Constant monitoring of Gold/JPY/BTC and major US/JP economic data.
4. How to Use
Configuration: In the settings under , input your balance and Risk %. Set your start date in .
Entry Decision: Wait for the "★ BUY" or "★ SELL" label.
"⚠️Adj" displayed: The system has detected a nearby barrier and narrowed the TP/SL for safety. This results in a higher win rate with smaller gains.
No warning: No barriers detected. Targets the default wide Risk-Reward ratio.
Execution: Enter using the exact Lot size on the label. Set your Limit/Stop orders at the provided TP/SL prices.
Exit: The trade concludes when the price reaches the Green or Red zone. Smart Adjust ensures you exit the market before a potential bounce.
1. 大幅なアップデート履歴 (Evolution History)
このシステムは、以下の5つのフェーズを経て完成しました。
フェーズ1:ロジック構築期 (V1〜V6)
ダウ理論に基づく「BREAK」「DIP」に加え、逆張り「SNIPER」、順張り追撃「PUSH」の4つのロジックを搭載。
マルチタイムフレーム(MTF)パネル、市場監視スキャナーの実装。
フェーズ2:ストラテジー化への挑戦 (V7〜V9)
バックテスト機能を搭載したが、Pine Scriptの計算負荷増大によりチャート動作が重くなる問題が発生。
フェーズ3:軽量化と原点回帰 (V10〜V11)
**「実戦での快適さ」**を最優先し、indicator 形式へ戻して超軽量化。
期間損益や勝率を、チャート上のパネルで簡易確認できる仕様に変更。
フェーズ4:視認性の完成 (V12〜V13)
High-Vis Fib: フィボナッチの重要ライン(38.2%/61.8%)を太いオレンジ実線で強調。
Visual Zone: トレード中、チャート上に「緑(利益)/赤(損失)」の帯を表示し、直感的な判断を可能に。
フェーズ5:スマート・アジャスト実装 (V14 - Current)
障害物回避機能: エントリー方向の直近に「逆側のレジサポBOX(壁)」がある場合、TPをその手前に自動短縮し、反発による含み益消滅リスクを回避。
RR自動最適化: TPの短縮に合わせて、最低限のリスクリワード(RR)を維持するようSLも自動調整する機能を搭載。
2. 全体の仕様 (Specifications)
名称: Dow Theory Cockpit
形式: インジケーター (Indicator)
※TradingViewの「ストラテジーテスター」タブは使用しません。
推奨スタイル: スキャルピング 〜 デイトレード
推奨時間足: 5分足、15分足(推奨)、1時間足
通貨ペア: 全通貨対応(Gold, Crypto, Forex, Index)
3. 特徴と機能 (Features)
① 4つの「高期待値」エントリーロジック
相場の状況に合わせて最適なサインが点灯します。
🎯 SNIPER: 行き過ぎた相場の反転(天底)を狙う逆張り。
🌊 DIP: 移動平均線の並びが良い状態での「深い押し目」を拾う順張り。
⚡ PUSH: 強いトレンド(ADX上昇中)の「浅い押し目」で飛び乗るスキャルピング用。
🚀 BREAK: ダウ理論の基本、直近高値・安値ブレイクでのエントリー。
② 視覚的環境認識ツール
レジサポ BOX: 重要価格帯を「面(ボックス)」で表示。ヒゲのダマシを許容します。
High-Vis Auto Fib: 直近の波を検知し、38.2%/61.8%(ゴールデンゾーン)を太線で強調表示。
③ 鉄壁の資金管理 (Money Management)
推奨ロット表示: 口座資金と許容リスク(%)に基づき、適正ロット数を自動計算して表示します。
TP/SL ゾーン: エントリー中、チャート上に「利確までの緑の帯」と「損切までの赤の帯」が表示され、価格の進行度合いが一目で分かります。
④ スマート・アジャスト機能 (Smart Adjust) ★NEW
機能: エントリー時、目標地点の手前に「強力なレジサポBOX」があるかを自動検知します。
動作:
通常時: 設定通りのRR(2.5倍など)でTP/SLを表示。
壁がある時: **「壁の手前」**にTPを引き下げ、それに合わせてSLも浅く調整します。
表示: 調整が行われた場合、ラベルに 「⚠️Adj(調整済み)」 と警告が出ます。
⑤ 情報集約パネル
Main Panel: 全時間足のトレンド方向、直近の勝率、期間内の純損益を表示。
Scanner: Gold / JPY / BTC の動向と、日米経済指標を常時監視。
4. 使い方 (How to Use)
STEP 1: 初期設定
インジケーター設定の 【F. 資金管理】 を開き、口座資金 と リスク(%) を入力します。
【T. バックテスト期間】 で損益計算を開始したい日付を設定します。
STEP 2: エントリー判断
チャートに 「★ BUY」 または 「★ SELL」 のラベルが出現するのを待ちます。
ラベルの確認:
「⚠️Adj」 と出ている場合 → 「近くに壁があるため、TP/SLを狭く調整しました」という意味です。勝率は上がりますが、値幅は小さくなります。
何も出ていない場合 → 「障害物なし。通常のRRで大きく狙います」という意味です。
STEP 3: 注文 (Execution)
ラベルの数値を信頼して注文を出します。
Lot: 表示された数量を入力。
TP/SL: 表示された価格に指値・逆指値を置く。
STEP 4: 決済 (Exit)
チャート上の 「緑の帯(TP)」 か 「赤の帯(SL)」 にローソク足が到達したら決済です。
**「スマートアジャスト」により、壁の手前で利確設定されているため、「反発して戻ってくる前に逃げ切る」**ことができます。
Dow Theory Cockpit [Final Fixed V15]1. Evolution History
The system has reached its final form through five distinct development phases:
Phase 1: Logic Development (V1–V6)
Established four core logics: BREAK and DIP (Dow Theory), SNIPER (Reversal), and PUSH (Trend continuation).
Implemented the Multi-Timeframe (MTF) panel and Market Scanner.
Phase 2: Strategy Transition (V7–V9)
Integrated backtesting features, but found the Pine Script calculation load too heavy for real-time charting.
Phase 3: Optimization & Performance (V10–V11)
Prioritized smooth real-time execution by returning to a lightweight indicator format.
Introduced the on-chart stats panel for Win Rate and P&L tracking.
Phase 4: Visual Completion (V12–V13)
High-Vis Fib: Bold orange lines highlighting the Golden Zone (38.2%/61.8%).
Visual Zones: Introduced Green and Red bands for intuitive trade tracking.
Phase 5: Smart Adjust Implementation (V14 - Current)
Barrier Avoidance: Automatically detects nearby Support/Resistance boxes and shortens the TP to secure profits before a potential reversal.
Dynamic RR Optimization: Automatically adjusts the SL in tandem with the shortened TP to maintain a healthy Risk-Reward ratio.
2. Specifications
Name: Dow Theory Cockpit
Format: Indicator
Trading Style: Scalping to Day Trading
Timeframes: 5M, 15M (Recommended), 1H
Assets: All pairs (Gold, Crypto, Forex, Indices)
3. Features
① Quad-Logic Entry Signals
🎯 SNIPER: Reversal logic targeting "Tops and Bottoms" when the market is overextended.
🌊 DIP: Trend-following logic for "Deep Pullbacks" with clean Moving Average alignment.
⚡ PUSH: Scalping logic for "Shallow Pullbacks" during high-momentum trends.
🚀 BREAK: Classic Dow Theory momentum entry on recent High/Low breakouts.
② Visual Analysis Tools
S/R BOX: Displays key price levels as shaded zones to account for market noise and wick volatility.
High-Vis Auto Fib: Automatically plots Fibonacci levels, highlighting the Golden Zone with bold lines.
③ Bulletproof Money Management
Calculated Lot Size: Displays the precise lot size based on your account balance and Risk % directly on the signal label.
TP/SL Zones: Dynamic Green and Red bands show exactly where your profit and loss targets lie.
④ Smart Adjust Function (NEW)
Logic: Automatically scans for strong S/R walls near your entry.
Normal Condition: Displays TP/SL at your default Risk-Reward ratio.
Wall Detected: Automatically pulls the TP to the edge of the barrier and tightens the SL to maintain the ratio.
Alert: A "⚠️Adj" warning appears on the label when this adjustment is active.
⑤ Integrated Info Panel
Main Panel: Trends across all timeframes, real-time Win Rate, and Period Net P&L.
Scanner: Constant monitoring of Gold/JPY/BTC and major US/JP economic data.
4. How to Use
Configuration: In the settings under , input your balance and Risk %. Set your start date in .
Entry Decision: Wait for the "★ BUY" or "★ SELL" label.
"⚠️Adj" displayed: The system has detected a nearby barrier and narrowed the TP/SL for safety. This results in a higher win rate with smaller gains.
No warning: No barriers detected. Targets the default wide Risk-Reward ratio.
Execution: Enter using the exact Lot size on the label. Set your Limit/Stop orders at the provided TP/SL prices.
Exit: The trade concludes when the price reaches the Green or Red zone. Smart Adjust ensures you exit the market before a potential bounce.
1. 大幅なアップデート履歴 (Evolution History)
このシステムは、以下の5つのフェーズを経て完成しました。
フェーズ1:ロジック構築期 (V1〜V6)
ダウ理論に基づく「BREAK」「DIP」に加え、逆張り「SNIPER」、順張り追撃「PUSH」の4つのロジックを搭載。
マルチタイムフレーム(MTF)パネル、市場監視スキャナーの実装。
フェーズ2:ストラテジー化への挑戦 (V7〜V9)
バックテスト機能を搭載したが、Pine Scriptの計算負荷増大によりチャート動作が重くなる問題が発生。
フェーズ3:軽量化と原点回帰 (V10〜V11)
**「実戦での快適さ」**を最優先し、indicator 形式へ戻して超軽量化。
期間損益や勝率を、チャート上のパネルで簡易確認できる仕様に変更。
フェーズ4:視認性の完成 (V12〜V13)
High-Vis Fib: フィボナッチの重要ライン(38.2%/61.8%)を太いオレンジ実線で強調。
Visual Zone: トレード中、チャート上に「緑(利益)/赤(損失)」の帯を表示し、直感的な判断を可能に。
フェーズ5:スマート・アジャスト実装 (V14 - Current)
障害物回避機能: エントリー方向の直近に「逆側のレジサポBOX(壁)」がある場合、TPをその手前に自動短縮し、反発による含み益消滅リスクを回避。
RR自動最適化: TPの短縮に合わせて、最低限のリスクリワード(RR)を維持するようSLも自動調整する機能を搭載。
2. 全体の仕様 (Specifications)
名称: Dow Theory Cockpit
形式: インジケーター (Indicator)
※TradingViewの「ストラテジーテスター」タブは使用しません。
推奨スタイル: スキャルピング 〜 デイトレード
推奨時間足: 5分足、15分足(推奨)、1時間足
通貨ペア: 全通貨対応(Gold, Crypto, Forex, Index)
3. 特徴と機能 (Features)
① 4つの「高期待値」エントリーロジック
相場の状況に合わせて最適なサインが点灯します。
🎯 SNIPER: 行き過ぎた相場の反転(天底)を狙う逆張り。
🌊 DIP: 移動平均線の並びが良い状態での「深い押し目」を拾う順張り。
⚡ PUSH: 強いトレンド(ADX上昇中)の「浅い押し目」で飛び乗るスキャルピング用。
🚀 BREAK: ダウ理論の基本、直近高値・安値ブレイクでのエントリー。
② 視覚的環境認識ツール
レジサポ BOX: 重要価格帯を「面(ボックス)」で表示。ヒゲのダマシを許容します。
High-Vis Auto Fib: 直近の波を検知し、38.2%/61.8%(ゴールデンゾーン)を太線で強調表示。
③ 鉄壁の資金管理 (Money Management)
推奨ロット表示: 口座資金と許容リスク(%)に基づき、適正ロット数を自動計算して表示します。
TP/SL ゾーン: エントリー中、チャート上に「利確までの緑の帯」と「損切までの赤の帯」が表示され、価格の進行度合いが一目で分かります。
④ スマート・アジャスト機能 (Smart Adjust) ★NEW
機能: エントリー時、目標地点の手前に「強力なレジサポBOX」があるかを自動検知します。
動作:
通常時: 設定通りのRR(2.5倍など)でTP/SLを表示。
壁がある時: **「壁の手前」**にTPを引き下げ、それに合わせてSLも浅く調整します。
表示: 調整が行われた場合、ラベルに 「⚠️Adj(調整済み)」 と警告が出ます。
⑤ 情報集約パネル
Main Panel: 全時間足のトレンド方向、直近の勝率、期間内の純損益を表示。
Scanner: Gold / JPY / BTC の動向と、日米経済指標を常時監視。
4. 使い方 (How to Use)
STEP 1: 初期設定
インジケーター設定の 【F. 資金管理】 を開き、口座資金 と リスク(%) を入力します。
【T. バックテスト期間】 で損益計算を開始したい日付を設定します。
STEP 2: エントリー判断
チャートに 「★ BUY」 または 「★ SELL」 のラベルが出現するのを待ちます。
ラベルの確認:
「⚠️Adj」 と出ている場合 → 「近くに壁があるため、TP/SLを狭く調整しました」という意味です。勝率は上がりますが、値幅は小さくなります。
何も出ていない場合 → 「障害物なし。通常のRRで大きく狙います」という意味です。
STEP 3: 注文 (Execution)
ラベルの数値を信頼して注文を出します。
Lot: 表示された数量を入力。
TP/SL: 表示された価格に指値・逆指値を置く。
STEP 4: 決済 (Exit)
チャート上の 「緑の帯(TP)」 か 「赤の帯(SL)」 にローソク足が到達したら決済です。
**「スマートアジャスト」により、壁の手前で利確設定されているため、「反発して戻ってくる前に逃げ切る」**ことができます。
Day Trading Signals Trend & Momentum Buy/Sell [CocoChoco]Day Trading Signals: Trend & Momentum Buy/Sell
Overview
The indicator is a comprehensive day-trading tool designed to identify high-probability entries by aligning short-term momentum with long-term trend confluence.
It filters out low-volatility "choppy" markets using ADX and ensures you are always trading in the direction of the dominant higher-timeframe trend.
Important: Use on timeframes from 15 min to 2 hours, as the indicator is for day trading only.
How It Works
The script uses a three-layer confirmation system:
Trend Alignment: Uses a Fast/Slow SMA cross (10/50) on the current chart. Signal prints only if price closes above (for bullish) or below (for bearish) the 10-period SMA.
Higher Timeframe Confluence: The script automatically looks at a higher timeframe (1H for charts <=15m, and 4H for others) and checks if the price is above/below a 200-period SMA.
Momentum & Volatility: Signals are only triggered if the Stochastic Oscillator is rising/falling and the ADX is above 20, ensuring there is enough "strength" behind the move.
Visual Signals Buy/Sell
Green Label (Up Arrow): Bullish entry signal
Red Label (Down Arrow): Bearish entry signal.
Red "X": Exit signal based on a moving average crossover (trend exhaustion).
Visual Risk/Reward (1:1) Boxes: When a signal appears, the script automatically draws a projection of your Stop Loss (Red) and Take Profit (Green) based on the current ATR (Average True Range).
How to Use
Entry: Enter when a Label appears. Ensure the candle has closed to confirm the signal.
Stop Loss/Take Profit: Use the visual boxes as a guide. The default is 1.0 ATR for risk and 1.0 RR ratio, which can be adjusted in the settings.
Exit: Exit the trade either at the target boxes or when the Red "X" appears, indicating the trend has shifted.
Please note that this is just a tool, not financial advice. Perform your own analysis before entering a trade.
TA Confluence Scanner v2.9 | Mint_Algo📘 TA Confluence Scanner
Introduction
The TA Confluence Scanner is a multi-factor trend system designed to filter market noise and identify high-probability trade setups. By combining adaptive algorithms (KAMA) with Price Action methodologies (SMC, Breakouts, Fractals), this indicator operates on the principle of Confluence : a signal is only valid when multiple independent tools agree on the direction.
Instead of relying on a single lagging indicator (like just MA fast and slow crossover), this script acts as a "Scanner," evaluating the market state through Volatility, Trend Structure, and Equilibrium.
───────────────────────────────────────────────────
Important Note
To make this "Plug & Play," I have included optimized presets in the settings for different timeframes (1m/15m-1h/4h-1D) and trading styles (Scalper, Intraday, Swing, Investor) tested on symbols:
FX:EURUSD
IG:NASDAQ
BITSTAMP:BTCUSD
BINANCE:ETHUSD
CAPITALCOM:US500
OANDA:XAUUSD
NASDAQ:AAPL
NASDAQ:TSLA
BUT default settings already include a good preset which excludes most of the noise and grabs the trend better (fewer entries, but quality is higher).
Check the presets at the bottom 👇
───────────────────────────────────────────────────
Core Features
Adaptive Trend Filter (KAMA): Adjusts to market volatility to distinguish between chop and true trends.
SMC Equilibrium (EQ) Fans: A three-tiered dynamic structure (Fast, Medium, Slow) for trailing stops and targets.
Confluence Counter: Visually displays the strength of a signal (e.g., "Strong 4/6") based on how many factors align.
Re-Entry Logic: Identifies low-risk entry points within an existing trend.
Automated S/R & Breakouts: Detects key pivot levels and structural breaks.
───────────────────────────────────────────────────
Settings & Components Breakdown
1. KAMA (Primary Trend Filter)
The backbone of the system. It calculates the Efficiency Ratio (ER) of price movement.
How it works: If the ER is high (strong trend), KAMA follows price closely. If ER is low (ranging), KAMA flattens out to prevent false signals.
Tuning:
Fast (ER ~100/5/60): For Scalping.
Smooth: Default settings are optimized for a balance between lag and noise reduction.
2. SMC Equilibrium (EQ Structure)
Based on the HL2 formula (High+Low / 2), this creates a "fan" of three lines:
EQ1 (Fast): The aggressive line. Used for early exits or scalping stops.
EQ2 (Medium): The baseline trend structure.
EQ3 (Slow): The major trend container. Used for position trading.
Usage: Use these lines to gauge how far price has deviated from its "fair value."
3. Breakout & Internal Trend
Lookback Period: Defines the range for a valid breakout. A lower lookback (e.g., 10) gives earlier signals but more noise; a higher lookback (e.g., 20-30) confirms significant structural breaks.
Internal Trend: A simplified SMA check to ensure immediate momentum aligns with the macro trend.
4. Signal Strength (The Confluence Meter)
The indicator counts active signals from: KAMA, Internal Trend, S/R, FVG, Breakout, and EQ.
Strong Signal: When the count hits your threshold (e.g., 4/6 ). This suggests a high-probability reversal or breakout.
Medium Signal (Triangles): These appear when the trend is active but not all filters align. These are excellent continuation/re-entry points.
───────────────────────────────────────────────────
How to Trade (Strategy Guide)
🎯 The Entry
Wait for a Strong Signal (Large Label). This confirms that volatility, structure, and momentum have aligned.
Conservative: Wait for the candle to close.
Aggressive: Enter on the breakout of the KAMA line.
🔄 Re-Entry & Continuation
Markets rarely move in a straight line.
Scenario: You missed the initial "Strong" entry, or you took profit and want to re-enter.
The Signal: Look for the small Triangles (Medium signals). These often appear after a pullback when price resumes the main trend.
Logic: If the main KAMA trend is still green/red, but the "Strong" signal isn't firing, a Triangle indicates a safe place to add to a position.
⚠️ Pyramiding & Risk Management (Advanced)
The EQ Lines (Fast/Medium/Slow) are designed for a tiered position management strategy:
Entry: Open position (e.g., 0.03 lots).
First Take Profit: When price extends far beyond EQ1 (Fast) , lock in partial profits.
Trailing Stop: Move your Stop Loss to trace the EQ2 (Medium) line.
Trend Riding: Hold the "Runner" portion of your position until price closes back under EQ3 (Slow) or the KAMA line.
Tip: Use William Fractals (Period 2) to pinpoint exact swing highs/lows for tightening stops.
───────────────────────────────────────────────────
Presets & Optimized Settings
To make this "Plug & Play," I have included optimized presets in the settings for different trading styles.
(If you don't see some parameters, that means they are turned off in trading mode)
⚡ SCALPER (1m - 5m)
KAMA:
ER: 100
Fast Length: 15
Slow Length: 30
FVG:
Size %: 0.01
Trend Detection:
Length: 20
Breakout:
Lookback Period: 10
S/R Detection:
Pivot Length: 10
Tolerance: 0.3
SMC EQ:
Default: 10
EQ1: 10
EQ2 (Main): 30
EQ3: 120
Signal Strength:
Strong: 4
Medium: 3
📊 INTRADAY (15m - 1H)
KAMA:
ER: 100
Fast Length: 5
Slow Length: 30
Trend Detection:
Length: 100
Breakout:
Lookback Period: 30
S/R Detection:
Pivot Length: 20
Tolerance: 0.5
SMC EQ:
Default: 10
EQ1: 10
EQ2 (Main): 40
EQ3: 80
Signal Strength:
Strong: 4
Medium: 3
📈 SWING (4H - 1D)
KAMA:
ER: 30
Fast Length: 4
Slow Length: 30
Trend Detection:
Length: 50
Breakout:
Lookback Period: 20
S/R Detection:
Pivot Length: 30
Tolerance: 0.7
SMC EQ:
Default: 10
EQ1: 10
EQ2: 50
EQ3 (Main): 60
Signal Strength:
Strong: 4
Medium: 3
💼 INVESTOR (4H - 1D+)
KAMA:
ER: 30
Fast Length: 5
Slow Length: 10
Trend Detection:
Length: 100
Breakout:
Lookback Period: 50
S/R Detection:
Pivot Length: 30
Tolerance: 0.7
SMC EQ:
Default: 10
EQ1: 10
EQ2: 50
EQ3 (Main): 100
Signal Strength:
Strong: 4
Medium: 3
───────────────────────────────────────────────────
Notes
FVG (Fair Value Gaps): Optional. Enable if you trade volatile assets like Crypto/Gold where imbalances are common.
Support/Resistance: The built-in Pivot system is optional. Disable it if you prefer drawing your own levels to keep the chart clean.
Recommended Pairing:
For best results, pair this with a momentum oscillator like RSI to detect the range regime of a trend. Or DI+ and DI- (when it crosses over each other, that means the "range of possible" regime change of a trend).
───────────────────────────────────────────────────
Disclaimer:
This tool is for informational purposes only. "Confluence" increases probability but does not guarantee results. Always manage your risk.
Jake's Candle by Candle UpgradedJake's Candle by Candle Upgraded
The "Story of the Market" Automated
This is not just another signal indicator. Jake's Candle by Candle Upgraded is a complete institutional trading framework designed for high-precision scalping on the 1-minute and 5-minute timeframes.
Built strictly on the principles of Al Brooks Price Action and Smart Money Concepts (SMC), this tool automates the rigorous "Candle-by-Candle" analysis used by professional floor traders. It moves beyond simple pattern recognition to read the "Story" of the market—Context, Setup, and Pressure—before ever allowing a trade.
The Philosophy: Why This Tool Was Built
Most retail traders fail for two reasons:
Getting Trapped: They enter on the first sign of a reversal (H1/L1), which is often an institutional trap.
Trading Chop: They bleed capital during low-volume, sideways markets.
This tool solves both problems with an Algorithmic Discipline Engine. It does not guess. It waits for the specific "Second Leg" criteria used by institutions and physically disables itself during dangerous market conditions.
Key Features
1. The Context Dashboard (HUD)
A professional Heads-Up Display in the top-right corner keeps you focused on the macro picture while you scalp.
FLOW: Monitors the 20-period Institutional EMA. (Green = Bull Flow, Red = Bear Flow). You are prevented from trading against the dominant trend.
STATE: A built-in "Volatility Compressor." If it says "⚠️ CHOP / RANGE", the algorithm is disabled. It protects you from overtrading during lunch hours or low-volume zones.
SETUP: Live tracking of the Al Brooks leg count. It tells you exactly when the algorithm is "Waiting for Pullback" or "Searching for Entry."
2. Smart "Trap Avoidance" Logic (H2/L2)
This tool uses the "Gold Standard" of scalping setups: The High 2 (H2) and Low 2 (L2).
It ignores the first breakout attempt (Leg 1), acknowledging it as a potential trap.
It waits for the pullback and only signals on the Second Leg, statistically increasing the probability of a successful trend resumption.
3. Volatility-Adaptive Risk Management
Stop calculating pips in your head. The moment a signal is valid, the tool draws your business plan on the chart:
Stop Loss (Red Line): Automatically placed behind the "Signal Bar" (the candle that created the setup) based on strict price action rules.
Take Profit (Green Line): Automatically projected at a 1.5 Risk-to-Reward Ratio.
Smart Adaptation: The targets expand and contract based on real-time market volatility. If the market is quiet, targets are tighter. If explosive, targets are wider.
4. The "Snap Entry" Signal
The BUY and SELL badges are not lagging. They are programmed with "Stop Entry" logic—appearing the exact moment price breaks the structure of the Signal Bar, ensuring you enter on momentum, not hope.
How to Trade Strategy
Check the HUD: Ensure FLOW matches your direction and STATE says "✅ VOLATILE".
Wait for the Badge: Do not front-run the tool. Wait for the BUY or SELL badge to print.
Set Your Orders: Once the signal candle closes:
Place your Stop Loss at the Red Line.
Place your Take Profit at the Green Line.
Walk Away: The trade is now a probability event. Let the math play out.
Technical Specifications
Engine: Pine Script v6 (Strict Compliance).
Best Timeframes: 1m, 5m.
Best Assets: Indices (NQ, ES), Gold (XAUUSD), and high-volume Crypto (BTC, ETH).
MTF EMA50/200 // ADX (Auto TF Pairing) with SL/TP // v6Strategy overview (EMA50/EMA200 + ADX, multi-timeframe):
This system trades only in the direction of the higher-timeframe trend and uses the current chart timeframe for precise entries.
Trend filter (Higher TF):
Bull trend: EMA50 > EMA200 and ADX ≥ threshold → only LONGs allowed
Bear trend: EMA50 < EMA200 and ADX ≥ threshold → only SHORTs allowed
If ADX is below the “no-trend” threshold, the market is considered choppy and trades are avoided.
Entry (Lower TF / chart TF):
Enter only when the chart timeframe confirms momentum in the HTF direction using one of:
Touch: price pulls back to EMA50 and closes back on the trend side
Rejection: stricter “touch + reject” near EMA50
Cross: close crosses EMA50 in the trend direction
Stop Loss (structure + volatility):
LONG: below the safer of last swing low or EMA50, minus an ATR buffer
SHORT: above the safer of last swing high or EMA50, plus an ATR buffer
Take Profit (risk-based):
Targets are set as multiples of risk (R) from entry:
TP1 = 2R (default)
TP2 = 3R (optional)
The indicator plots only the latest trade’s Entry (black line), Stop (red dashed), and TP (green dashed), and it auto-pairs the chart timeframe with a “next level up” higher timeframe for the trend filter.
Futures Psychological Levels PROFutures Psychological Levels PRO – Professional Usage Guide
Indicator Overview
This elite psychological levels tool dynamically plots the most institutionally relevant round-number clusters across futures markets (ES, NQ, YM, CL, GC, SI, BTC, and custom instruments). It separates levels into three hierarchical tiers — Major, Tradable, and Sniper — while intelligently filtering distant levels using an ATR-based proximity engine. The result is a clean, adaptive overlay that scales perfectly from scalping precision on 1-minute charts to big-picture context on daily/weekly timeframes.
Core Philosophy
Psychological levels are where order flow clusters: stops, limits, and institutional positioning accumulate around round numbers. This indicator turns static round numbers into a dynamic decision framework by:
Prioritizing confluence zones
Reducing clutter in ranging or low-volatility environments
Highlighting only price-relevant levels in real time
Key Features
Instrument Presets – One-click optimized spacing for major futures contracts
Three-Tier Hierarchy – Major (institutional anchors), Tradable (active defense zones), Sniper (precise entry/exit triggers)
ATR Proximity Filter – Automatically hides irrelevant distant levels
Zones or Lines – Visual magnet areas or clean horizontal lines
Price Labels & Summary Table – Instant reference for next major levels above/below
Full Customization – Colors, thickness, styles, and manual overrides
How to Best Use This Indicator (Professional Workflow)
Select the Correct Instrument Preset
Start with the built-in preset matching your chart (e.g., "ES (S&P 500)" for /ES or MES). This instantly applies battle-tested increments. Use "Custom" only for non-standard assets (forex pairs, micros with different tick values, or crypto alts).
Match Settings to Your Trading Style & Timeframe
Reading the Levels – Decision Framework
Major Levels (thick red by default): Highest probability reaction zones. Expect strong reversals, breakouts with volume, or liquidity sweeps. Treat as primary support/resistance.
Tradable Levels (orange): Active trader defense zones. Excellent for limit order placement, partial profit taking, or fading weak moves.
Sniper Levels (thin gray): Precision entries/exits, stop runs, and scalping targets. Confluence with order blocks or volume profile nodes dramatically increases edge.
Trade Setup Examples
Rejection Play: Price approaches a Major level from below → long wick rejection + close back inside → enter in direction of rejection with stop beyond wick extremity.
Break & Retest: Clean breakout through Tradable/Major → retest as new support/resistance → enter on confirmation candle.
Liquidity Sweep: Price briefly breaches Sniper/Major (stop hunt) → rapid reclaim → aggressive counter-trend entry.
Confluence Boost: When a level aligns with daily/weekly open, VWAP, or prior high/low volume node → dramatically increase position size or conviction.
Risk Management Integration
Always place stops just beyond the next logical level (typically a Sniper or Tradable beyond your entry zone). Use the summary table to quickly identify invalidation points. Target the next level in the direction of your bias for minimum 1:2 risk-reward (often 1:3–1:5 achievable at Major levels).
Pro Optimization Tips
High-volatility sessions (NY open, FOMC, NFP): Increase ATR Multiplier slightly to avoid excessive clutter.
Low-volatility Asian/range sessions: Decrease ATR Multiplier for tighter precision.
Combine with Volume Profile (Fixed Range or Session) to confirm high-volume nodes at psych levels.
Pair with anchored/session VWAP for additional confluence layers.
On higher timeframes, disable Sniper levels and zones entirely for minimalist structural analysis.
Important Disclaimer
This indicator is a professional decision-support tool, not a standalone trading system. All trading involves substantial risk of loss. Past performance is not indicative of future results. Always conduct your own analysis, manage risk appropriately, and consider your financial situation before placing trades.
Mastering psychological levels is one of the highest-edge concepts in institutional trading. Used correctly, this indicator gives you the same reference framework that prop desks and market makers watch every day. Trade smart, stay disciplined, and let price action at these levels guide your executions.
MA Crossover with R SquaredThis indicator enhances the classic Moving Average (MA) crossover strategy with statistical filtering and prediction capabilities.
Let me explain what it does:
Instead of just showing when a fast MA crosses above/below a slow MA, this indicator adds R² (R-squared) filtering to identify higher-quality crossovers and predicts future crossovers.
What is R²?
R² (Coefficient of Determination) is a statistical measure that shows how well one variable explains the movement of another variable. In simpler terms:
R² = 1.0: Perfect relationship - 100% of the movement in one MA is explained by the other MA
R² = 0.8: Strong relationship - 80%
R² = 0.5: Moderate relationship - 50%
R² = 0.0: No relationship - 0%
Imagine two cars driving on a highway:
High R² (0.9): Both cars are in the same lane, moving together consistently
Low R² (0.3): One car is weaving between lanes while the other stays straight - poor coordination.
Traditional MA crossovers often generate false signals during:
Choppy markets (price bouncing around)
Sideways/ranging markets
Low volatility periods
News events causing temporary spikes
The R² Solution:
R² acts as a "quality filter" that answers: "How meaningful this crossover is?"
What this means:
Before R² filtering: Every crossover generates a signal
After R² filtering: Only crossovers with R² > threshold generate signals
Result: Fewer but higher-quality signals.
MARKET REGIME DETECTION
High R² (> 0.7): Strong trending market - MA crossovers are reliable
Medium R² (0.4-0.7): Moderate trending - use with caution
Low R² (< 0.4): Choppy/range-bound market - avoid MA crossover signals
Increasing R²: MAs are converging/moving together more closely
Decreasing R²: MAs are diverging/losing coordination
Sudden R² drop: Potential market regime change.
Why Square the Correlation?
Correlation: Measures direction AND strength (-1 to +1)
R²: Measures strength ONLY (0 to 1)
In trading: We care about relationship strength, not direction
Direction is already indicated by crossover type (bullish/bearish)
Real-World Interpretation:
If R² = 0.64, it means:
64% of the variation in the fast MA is explained by the slow MA
36% is "noise" or unexplained movement
The MAs are moderately coordinated.
R² Trend Confirmation:
Entry: When crossover occurs AND R² is above threshold
Confirmation: R² continues rising after entry
Exit: R² drops below threshold (relationship weakening)
Multi-Timeframe R² Analysis
Check R² on higher timeframe for trend context
Use current timeframe for entry signals
Example: Daily R² > 0.7 gives bullish bias, use 1-hour for entries.
R² LIMITATIONS & CAUTIONS
1. Lagging Nature
R² is calculated from past data
By the time R² is high, the trend may already be established
2. Not a Standalone Indicator
R² should confirm other signals, not generate them alone
Always combine with price action, volume, support/resistance
3. Curve Fitting Risk
Don't over-optimize R² thresholds on historical data
What worked in the past may not work in the future
Use R² as a filter, not a predictor
4. Market-Specific Behavior
R² thresholds that work in trending stocks may fail in Forex
Cryptocurrencies may require different R² settings than commodities
Always test on your specific market/instrument
Before Taking Any Signal:
✅ Does the crossover have a colored circle? (R² > threshold)
✅ What's the R² number shown? (Higher = better)
✅ Is R² rising or falling? (Rising = strengthening relationship)
✅ Check history table - what happened with similar R² values?
✅ Consider prediction - does it align with current signal?
Simple R² Rules of Thumb:
R² > 0.8: Excellent signal quality
R² 0.6-0.8: Good signal quality
R² 0.4-0.6: Moderate - use additional confirmation
R² < 0.4: Poor - avoid or use extreme caution
Think of R² as:
A quality control inspector for MA crossovers
A relationship therapist for your moving averages
A statistical bouncer that only lets strong signals through
Higher win rate + Better risk/reward = More profitable trading
This script transforms the basic "when lines cross" approach into a sophisticated, statistically-validated trading system. R² is the secret sauce that separates random crossovers (Golden/Death) from meaningful trend changes.
DISCLAIMER: This information is provided for educational purposes only and should not be considered financial, investment, or trading advice. Please do boost if you like it. Happy Trading.
Advanced Multi-Level S/R ZonesAdvanced Multi-Level S/R Zones: The Comprehensive Guide
1. Introduction: The Evolution of Support & Resistance:
Support and Resistance (S/R) is the backbone of technical analysis. However, traditional methods of drawing these levels are often plagued by subjectivity. Two traders looking at the same chart will often draw two different lines. Furthermore, standard indicators often treat every price point equally, ignoring the critical context of Volume and Time.
The Advanced Multi-Level S/R Zones script represents a paradigm shift. It moves away from subjective line drawing and toward Quantitative Zoning. By utilizing statistical measures of variability (Standard Deviation, MAD, IQR) combined with Volume-Weighting and Time-Decay algorithms, this tool identifies where price is mathematically most likely to react. It treats S/R not as thin lines, but as dynamic zones of probability.
2. Core Logic and Mathematical Foundation:
To understand how to use this tool optimally, one must understand the "engine" under the hood. The script operates on four distinct pillars of logic:
A. Session-Based Data Collection:
The script does not look at every single tick. Instead, it aggregates data into "Sessions" (daily bars by default logic). It extracts the High, Low, and Total Volume for every session within the user-defined lookback period. This filters out intraday noise and focuses on the macro structure of the market.
B. Adaptive Statistical Variability:
Most Bollinger Band-style indicators use Standard Deviation (StdDev) to measure width. However, StdDev is heavily influenced by outliers (extreme wicks). This script offers a sophisticated Adaptive Method-Skewness Detection: The script calculates the skewness of the price distribution. Adaptive Selection: If the data is highly skewed (lots of outliers, typical in Crypto), it switches to MAD (Median Absolute Deviation). MAD is robust and ignores outliers. If the data is moderately skewed, it uses IQR (Interquartile Range). If the data is normal (Gaussian), it uses StdDev.
Benefit: This ensures the zone widths are accurate regardless of whether you are trading a stable Forex pair or a volatile Altcoin.
C. The Weighting Engine (Volume + Time)
Not all price history is equal. This script assigns a "Weight Score" to every session based on two factors:
Volume Weighting: Sessions with massive volume (institutional activity) are given higher importance. A high formed on low volume is less significant than a high formed on peak volume.
Time Decay: Recent price action is more relevant than price action from 50 bars ago. The script applies a decay factor (default 0.85). This means a session from yesterday has 100% impact, while a session from 10 days ago has significantly less influence on the zone calculation.
D. Clustering Algorithm
Once the data is weighted, the script runs a clustering algorithm. It looks for price levels where multiple session Highs (for Resistance) or Lows (for Support) congregate.
It requires a minimum number of points to form a zone (User Input: minPoints).
It merges nearby levels based on the Cluster Separation Factor.
This results in "Primary," "Secondary," and "Tertiary" zones based on the strength and quantity of data points in that cluster.
3. Detailed Features and Inputs Breakdown:
Group 1: Main Settings
Lookback Sessions (Default: 10): Defines how far back the script looks for pivots. A higher number (e.g., 50) creates long-term structural zones. A lower number (e.g., 5) creates short-term scalping zones.
Variability Method (Adaptive): As described above, leave this on "Adaptive" for the best results across different assets.
Zone Width Multiplier (Default: 0.75): Controls the vertical thickness of the zones. Increase this to 1.0 or 1.5 for highly volatile assets to ensure you catch the wicks.
Minimum Points per Zone: The strictness filter. If set to 3, a price level must be hit 3 times within the lookback to generate a zone. Higher numbers = fewer, but stronger zones.
Group 2: Weighting
Volume-Weighted Zones: Crucial for identifying "Smart Money" levels. Keep this TRUE.
Time Decay: Ensures the zones update dynamically. If price moves away from a level for a long time, the zone will fade in significance.
ATR-Normalized Zone Width: This is a dynamic volatility filter. If TRUE, the zone width expands and contracts based on the Average True Range. This is vital for maintaining accuracy during market breakouts or crashes.
Group 3: Zone Strength & Scoring
The script calculates a "Score" (0-100%) for every zone based on:
-Point Count: More hits = higher score.
-Touches: How many times price wicked into the zone recently.
-Intact Status: Has the zone been broken?
-Weight: Volume/Time weight of the constituent points.
-Track Zone Touches: Looks back n bars to see how often price respected this level.
-Touch Threshold: The sensitivity for counting a "touch."
Group 4: Visuals & Display
Extend Bars: How far to the right the boxes are drawn.
Show Labels: Displays the Score, Tier (Primary/Secondary), and Status (Retesting).
Detect Pivot Zones (Overlap): This is a killer feature. It detects where a Support Zone overlaps with a Resistance Zone.
Significance: These are "Flip Zones" (Old Resistance becomes New Support). They are colored differently (Orange by default) and represent high-probability entry areas.
Group 5: Signals & Alerts
Entry Signals: Plots Buy/Sell labels when price rejects a zone.
Detect Break & Retest: specifically looks for the "Break -> Pullback -> Bounce" pattern, labeled as "RETEST BUY/SELL".
Proximity Alert: Triggers when price gets within x% of a zone.
4. Understanding the Visuals (Interpreting the Chart)
When you load the script, you will see several visual elements. Here is how to read them:
The Boxes (Zones)
Red Shades: Resistance Zones.
Dark Red (Solid Border): Primary Resistance. The strongest wall.
Lighter Red (Dashed Border): Secondary/Tertiary. Weaker, but still relevant.
Green Shades: Support Zones.
Dark Green (Solid Border): Primary Support. The strongest floor.
Orange Boxes: Pivot Zones. These are areas where price has historically reacted as both support and resistance. These are the "Line in the Sand" for trend direction.
The Labels & Emojis
The script assigns emojis to zone strength:
🔥 (Fire): Score > 80%. A massive level. Expect a strong reaction.
⭐ (Star): Score > 60%. A solid structural level.
✓ (Check): Score > 40%. A standard level.
"⟳ RETESTING": Appears when a zone was broken, and price is currently pulling back to test it from the other side.
The Dashboard (Top Right)
A statistics table provides a "Head-Up Display" for the asset:
High/Low σ (Sigma): The variability of the highs and lows. If High σ is much larger than Low σ, it implies the tops are erratic (wicks) while bottoms are clean (flat).
Method: Shows which statistical method the Adaptive engine selected (e.g., "MAD (auto)").
ATR: Current volatility value used for normalization.
5. Strategies for Optimum Output
To get the most out of this script, you should not just blindly follow the lines. Use these specific strategies:
Strategy A: The "Zone Fade" (Range Trading)
This works best in sideways markets.
Identify a Primary Support (Green) and Primary Resistance (Red).
Wait for price to enter the zone.
Look for the "SUPPORT BOUNCE" or "RESISTANCE REJECTION" signal label.
Entry: Enter against the zone (Buy at support, Sell at resistance).
Stop Loss: Place just outside the zone width. Because the zones are calculated using volatility stats, a break of the zone usually means the trade is invalid.
Strategy B: The "Pivot Flip" (Trend Following)
This is the highest probability setup in trending markets.
Look for an Orange Pivot Zone.
Wait for price to break through a Resistance Zone cleanly.
Wait for the price to return to that zone (which may now turn Orange or act as Support).
Look for the "RETEST BUY" label.
Logic: Old resistance becoming new support is a classic sign of trend continuation. The script automates the detection of this exact geometric phenomenon.
Strategy C: The Volatility Squeeze
Look at the Dashboard. Compare High σ and Low σ.
If the values are dropping rapidly or becoming very small, the zones will contract (become narrow).
Narrow zones indicate a "Squeeze" or compression in price.
Prepare for a violent breakout. Do not fade (trade against) narrow zones; look to trade the breakout.
6. Optimization & Customization Guide
Different markets require different settings. Here is how to tune the script:
For Crypto & Volatile Stocks (Tesla, Nvidia)
Method: Set to Adaptive (Mandatory, as these assets have "Fat Tails").
Multiplier: Increase to 1.0 - 1.25. Crypto wicks are deep; you need wider zones to avoid getting stopped out prematurely.
Lookback: 20-30 sessions. Crypto has a long memory; short lookbacks generate too much noise.
For Forex (EURUSD, GBPJPY)
Method: You can force StdDev or IQR. Forex is more mean-reverting and Gaussian.
Multiplier: Decrease to 0.5 - 0.75. Forex levels are often very precise to the pip.
Volume Weighting: You may turn this OFF for Forex if your broker's volume data is unreliable (since Forex has no centralized volume), though tick volume often works fine.
For Scalping (1m - 15m Timeframes)
Lookback: Decrease to 5-10. You only care about the immediate session history.
Decay Factor: Decrease to 0.5. You want the script to forget about yesterday's price action very quickly.
Touch Lookback: Decrease to 20 bars.
For Swing Trading (4H - Daily Timeframes)
Lookback: Increase to 50.
Decay Factor: Increase to 0.95. Structural levels from weeks ago are still highly relevant.
Min Points: Increase to 3 or 4. Only show levels that have been tested multiple times.
7. Advantages Over Standard Tools:
Feature Standard S/R Indicator, Advanced Multi-Level S/R Calculation, Uses simple Pivots or Fractals, Uses Statistical Distributions (MAD/IQR). Zone Width Arbitrary or Fixed Adaptive based on Volatility & ATR.
Context Ignores Volume Volume Weighted (Smart Money tracking).
Time Relevance Old levels = New levels Time Decay (Recency bias applied).
Overlaps Usually ignores overlaps Detects Pivot Zones (Res/Sup Flip).
Scoring None 0-100% Strength Score per zone.
8. Conclusion:
The Advanced Multi-Level S/R Zones script is not just a drawing tool; it is a statistical analysis engine. By accounting for the skewness of data, the volume behind the moves, and the decay of time, it provides a strictly objective roadmap of the market structure.
For the optimum output, combine the Pivot Zone identification with the Retest Signals. This aligns you with the underlying flow of order blocks and prevents trading against the statistical probabilities of the market.
QuantCrawler 5m ORB Pro - Opening Range with Confluence FiltersThis indicator captures the 5-minute Opening Range and generates entry signals using a breakout-then-retest methodology. It includes optional confluence filters to refine entries and reduce false signals.
HOW IT WORKS
1. Captures the 5-minute Opening Range (high, low, midpoint) at your selected session open
2. Waits for price to break beyond OR high or low by your defined distance
3. After breakout, monitors for price to retest the OR midpoint
4. Signals LONG after bullish breakout + midpoint retest
5. Signals SHORT after bearish breakout + midpoint retest
6. Marks invalidated signals with (X) if price breaks through the opposite side
PRE-CONFIGURED SESSIONS
- NYSE - 9:30-9:35 ET
- CME - 8:30-8:35 CT
- London - 3:00-3:05 ET
- Asia - 7:00-7:05 PM ET
- Custom - Define your own session times and timezone
BREAKOUT DISTANCE OPTIONS
Choose between fixed points or percentage-based breakout threshold. Percentage mode automatically scales to the instrument price.
CONFLUENCE FILTERS
Optional filters to add confirmation before signals fire:
- VWAP - Long requires price above VWAP, short requires below
- EMA Slope - Confirms trend direction using 20-period EMA
- Volume - Requires relative volume above 1.5x average
- FVG - Requires a Fair Value Gap supporting trade direction
- ATR - Filters Opening Ranges that are abnormally small or large relative to ATR
When filters block a valid setup, the indicator displays a BLOCKED label so you can see what you missed and why.
STATUS BOX
Real-time display showing:
- Current trade state (Building OR, Watching, Awaiting Retest, Long/Short Active)
- OR High, Low, and Midpoint levels
- Active filters and block reasons
ALERTS
Built-in alerts for Long Entry, Short Entry, or Any Entry.
QuantCrawler ORB Break & Retest 15m - Opening Range StrategyThis indicator automates the 15-minute Opening Range Breakout and Retest strategy. It captures the high, low, and midpoint of the first 15-minute candle, then monitors for confirmed breakouts followed by midpoint retests to generate entry signals.
HOW IT WORKS
1. Captures the high, low, and midpoint of the first 15-minute candle (default 8:00-8:15 premarket)
2. Waits for price to close beyond the OR high or low by your specified breakout distance
3. After breakout confirmation, monitors for price to pull back and touch the midpoint
4. Signals LONG after bullish breakout + midpoint retest
5. Signals SHORT after bearish breakout + midpoint retest
6. Resets after each signal allowing multiple setups per session
WHY 15-MINUTE ORB
The 15-minute Opening Range captures more price action than a 5-minute OR, often providing stronger support/resistance levels. The 8:00 AM default captures premarket activity before the 9:30 open, giving you levels established before the crowd arrives.
WHY BREAKOUT + RETEST
Entering on the initial breakout often results in chop and false signals. This indicator requires confirmation - price must first prove direction by closing beyond the breakout distance, then offer a pullback entry at the midpoint. This filters out many failed breakouts.
SETTINGS
- Breakout Distance - Points beyond OR zone required to confirm breakout
- Timezone - Select your market timezone
- Opening Range Time - Customizable (default 8:00-8:15)
- Session End Time - When to stop monitoring (default 4:00 PM)
VISUAL OUTPUT
- Green line - OR High
- Red line - OR Low
- Orange dotted line - OR Midpoint
- Status box displays current state (Watching, Active, Closed)
ALERTS
Built-in alerts for Long Entry, Short Entry, or Any Entry.
Works on any timeframe chart. The indicator pulls 15-minute data automatically using request.security().






















