Multiple Ema 20/50/100Multiple Ema 20/50/100 and you can add more EMA Plot easily by changing the codes.
In den Scripts nach "马斯克+100万" suchen
50, 100, 200 EMAsA simple script that displays the 50, 100, and 200-period exponential moving averages. Reduce clutter by combining them into one indicator!
50, 100, 200 SMAsA simple script that displays the 50, 100, and 200-period simple moving averages. Reduce clutter by combining them into one indicator!
50,100,200 MA by CryptoLife71(FIXED)Updated the code by CryptoLife71 so that the 200ma shows correctly.
EMA 20/50/100/200Plots exponential moving average on four timeframes at once for rapid indication of momentum shift as well as slower-moving confirmations.
Displays EMA 20, 50, 100, and 200... default colors are hotter for faster timeframes, cooler for slower ones
DECL: 3 X Moving Average (50, 100 and 200 day)Basic Moving Average with 3 different intervals. Default: 50 day (blue), 100 day (red) and 200 day (purple)
BB 100 with Barcolors6/19/15 I added confirmation highlight bars to the code. In other words, if a candle bounced off the lower Bollinger band, it needed one more close above the previous candle to confirm a higher probability that a change in investor sentiment has reversed. Same is true for upper Bollinger band bounces. I also added confirmation highlight bars to the 100 sma (the basis). The idea is that lower and upper bands are potential points of support and resistance. The same is true of the basis if a trend is to continue. 6/28/15 I added a plotshape to identify closes above/below TLine. One thing this system points out is it operates best in a trend reversal. Consolidations will whipsaw the indicator too much. I have found that when this happens, if using daily candles, switch to hourly, 30 min, etc., to catch a better signal. Nothing moves in a straight line. As with any indicator, it is a tool to be used in conjunction with the art AND science of trading. As always, try the indicator for a time so that you are comfortable enough to use real money. This is designed to be used with "BB 25 with Barcolors".
BB 100 with Barcolors6/19/15 I added confirmation highlight bars to the code. In other words, if a candle bounced off the lower Bollinger band, it needed one more close above the previous candle to confirm a higher probability that a change in investor sentiment has reversed. Same is true for upper Bollinger band bounces. I also added confirmation highlight bars to the 100 sma (the basis). The idea is that lower and upper bands are potential points of support and resistance. The same is true of the basis if a trend is to continue. Nothing moves in a straight line. As with any indicator, it is a tool to be used in conjunction with the art AND science of trading. As always, try the indicator for a time so that you are comfortable enough to use real money. This is designed to be used with "BB 25 with Barcolors".
BB 100 with BarcolorsI cleaned up the highlight barcolor to reflect red or lime depending if it closed > or < the open.
The description is in the code. you want to catch bounces off the 25 (upper or lower) and 100 (upper or lower).
Works well on the hourly and 30 min charts. Haven't tested it beyond that. Haven't tested Forex, just equities.
EMA Keltner Channel 1D100/200 EMAs, along with Keltner Bands based off them. Colors correspond to actions you should be ready to take in the area. Use to set macro mindset.
Uses the security function to display only the 1D values.
Red= Bad
Orange = Not as Bad, but still Bad.
Yellow = Warning, might also be Bad.
Purple = Dip a toe in.
Blue = Give it a shot but have a little caution.
Green = It's second mortgage time.
Shadow Detector//@version=5
indicator("Shadow Detector", overlay=true)
// === Inputs ===
// ---- Upper Wick Controls ----
enableMinUpperWick = input.bool(true, "", group="Long Upper Wick Settings",inline = 'A')
minUpperWickPerc = input.float(0.4, "Min Upper Wick %", step=0.01, group="Long Upper Wick Settings",inline = 'A')
enableMaxLowerWick = input.bool(true, "", group="Long Upper Wick Settings",inline = 'B')
maxLowerWickPerc = input.float(0.5, "Max Lower Wick %", step=0.01, group="Long Upper Wick Settings",inline = 'B')
enableMaxBodyUpper = input.bool(true, " ", group="Long Upper Wick Settings",inline = 'C')
maxBodyPercUpper = input.float(100.0, "Max Body % (Upper Wick)", step=0.01, group="Long Upper Wick Settings",inline = 'C')
// ---- Lower Wick Controls ----
enableMinLowerWick = input.bool(true, "", group="Long Lower Wick Settings",inline = 'd')
minLowerWickPerc = input.float(0.4, "Min Lower Wick %", step=0.01, group="Long Lower Wick Settings",inline = 'd')
enableMaxUpperWick = input.bool(true, "", group="Long Lower Wick Settings",inline = 'e')
maxUpperWickPerc = input.float(0.5, "Max Upper Wick %", step=0.01, group="Long Lower Wick Settings",inline = 'e')
enableMaxBodyLower = input.bool(true, "", group="Long Lower Wick Settings",inline = 'f')
maxBodyPercLower = input.float(100.0, "Max Body % (Lower Wick)", step=0.01, group="Long Lower Wick Settings",inline = 'f')
// === Calculations ===
bodySize = math.abs(close - open)
upperWick = high - math.max(open, close)
lowerWick = math.min(open, close) - low
// Reference price
refPrice = close // you can change to (high+low)/2 or open if preferred
// Thresholds for Upper Wick Condition
minUpperWickPoints = refPrice * (minUpperWickPerc / 100)
maxLowerWickPoints = refPrice * (maxLowerWickPerc / 100)
maxBodyPointsUpper = refPrice * (maxBodyPercUpper / 100)
// Thresholds for Lower Wick Condition
minLowerWickPoints = refPrice * (minLowerWickPerc / 100)
maxUpperWickPoints = refPrice * (maxUpperWickPerc / 100)
maxBodyPointsLower = refPrice * (maxBodyPercLower / 100)
// === Conditions with Enable/Disable Logic ===
// Long Upper Shadow conditions (only check enabled conditions)
upperCondition1 = enableMaxBodyUpper ? bodySize <= maxBodyPointsUpper : true
upperCondition2 = enableMinUpperWick ? upperWick >= minUpperWickPoints : true
upperCondition3 = enableMaxLowerWick ? lowerWick <= maxLowerWickPoints : true
longUpper = upperCondition1 and upperCondition2 and upperCondition3
// Long Lower Shadow conditions (only check enabled conditions)
lowerCondition1 = enableMaxBodyLower ? bodySize <= maxBodyPointsLower : true
lowerCondition2 = enableMinLowerWick ? lowerWick >= minLowerWickPoints : true
lowerCondition3 = enableMaxUpperWick ? upperWick <= maxUpperWickPoints : true
longLower = lowerCondition1 and lowerCondition2 and lowerCondition3
// === Plot Shapes ===
plotshape(longUpper, title="Long Upper Shadow", style=shape.triangledown, color=color.red, size=size.small, location=location.abovebar)
plotshape(longLower, title="Long Lower Shadow", style=shape.triangleup, color=color.green, size=size.small, location=location.belowbar)
// === Alerts ===
alertcondition(longUpper, title="Long Upper Shadow", message="Upper shadow conditions met")
alertcondition(longLower, title="Long Lower Shadow", message="Lower shadow conditions met")
MTF Ichimoku Strategy (4H & 1H) Gus81Core Idea
This is a multi-timeframe Ichimoku alignment strategy.
It looks at the 4-hour (higher timeframe) and the 1-hour (lower timeframe) charts at the same time.
Trades are only allowed when both timeframes agree that price is trending in the same direction.
• Long (Buy) if both 4H and 1H price are:
• Above the top of the Ichimoku cloud (Kumo = Senkou Span A / Senkou Span B)
• Above the Kijun-sen (baseline)
• Short (Sell) if both 4H and 1H price are:
• Below the bottom of the cloud
• Below the Kijun-sen
This ensures trades only happen when trend strength is confirmed on two timeframes.
⸻
Ichimoku Logic Used
The script manually computes Ichimoku levels instead of using ta.ichimoku():
• Tenkan-sen (Conversion Line): (9-period highest high + 9-period lowest low) / 2
• Kijun-sen (Base Line): (26-period highest high + 26-period lowest low) / 2
• Senkou Span A: (Tenkan + Kijun) / 2
• Senkou Span B: (52-period highest high + 52-period lowest low) / 2
Then it uses request.security() to fetch these values for 4H and 1H timeframes, regardless of the chart you apply it on.
⸻
Trade Execution
• Entry:
• If conditions align, a long or short order is opened.
• If an opposite position is open, the old one is closed first (“flip”).
• Stop Loss & Take Profit (dynamic):
• SL and TP are set as a percentage of the average entry price.
• Example:
• Long trade SL = avgPrice * (1 - riskSLpct/100)
• Long trade TP = avgPrice * (1 + riskTPpct/100)
• Defaults: SL = 2%, TP = 4%.
• Cooldown filter:
• Prevents new trades until cooldownBars candles have passed since the last entry (default 12 bars).
• Reduces over-trading and whipsaws.
• Optional Opposite Exit:
• If enabled, a position will close when the opposite signal appears, even if SL/TP is not hit.
⸻
Visuals on Chart
• 4H Kumo Cloud plotted in teal
• 1H Kumo Cloud plotted in orange
• Kijun lines (blue for 4H, orange for 1H)
• Background shading: green when long conditions active, red when short
• Markers: triangles below/above bars for BUY/SELL signals
⸻
Alerts
Two layers of alerts:
1. Static alertcondition() → lets you set alerts via TradingView’s UI.
2. Code-fired alerts with cooldown → sends push alerts when conditions trigger, formatted as:
Ichimoku MTF | BUY 4H+1H | EURUSD | TF:60 | Close:1.0765
This way you can link alerts directly to your phone.
⸻
Backtesting
Since it’s a strategy():
• Runs through historical bars automatically.
• You can check net profit, drawdown, win rate, profit factor in Strategy Tester.
• Date filtering is possible via inputs (defaults: Sept 2024 → Sept 2025 if toggled on).
⸻
Strengths
• Trend alignment filter: only trades in strong, multi-timeframe trends.
• MTF Ichimoku logic: reduces false signals common in single-timeframe Ichimoku.
• Risk control: built-in SL/TP and cooldown.
• Visual clarity: cloud overlays + background shading.
⸻
Limitations
• Works best in strong trending conditions (Ichimoku’s strength).
• Will whipsaw in sideways / choppy markets.
• SL/TP are fixed percentages, not volatility-adaptive.
• No position sizing logic beyond “% of equity”.
⸻
In short: This is a trend-following breakout/confirmation strategy using Ichimoku across 4H + 1H. It waits for multi-timeframe agreement above/below the Kumo and Kijun before entering trades, manages risk with SL/TP and cooldown, and is fully backtestable in TradingView.