Gold Moving Averages & Crossovers3 ma 20 100 e 200 perdiodi che si incrociano e chiamato il segnale m1 solo se il prezzo e rispettivamente sopra o sotto la ma a 200 cerco trade a favore
Wskaźniki i strategie
Gap Statistics (Positive and Negative, Excluding 0 Gaps)Gap statistics for all tf's. Positive and Negative values are seperately evaluated.
EMA 8 & 21The script plots the 8-period and 21-period Exponential Moving Averages (EMA) to help traders identify short-term trend direction and momentum shifts. The 8 EMA (yellow) reacts faster to price changes, while the 21 EMA (white) provides a smoother trend signal. Crossovers between these EMAs can indicate potential buy or sell opportunities.
Ichimoku Entry Historical Data ExportCSV Ichimoku Entry Historical Data Export
test
The Ichimoku Oscillator is a technical indicator derived from the Ichimoku Kinko Hyo system, designed to measure market momentum and trend strength. It is typically calculated as the difference between the Tenkan-sen (Conversion Line) and the Kijun-sen (Base Line).
Key Aspects:
1. Momentum Measurement:
• A positive value suggests that the short-term trend (Tenkan-sen) is stronger than the medium-term trend (Kijun-sen), indicating bullish momentum.
• A negative value indicates that the short-term trend is weaker than the medium-term trend, signaling bearish momentum.
2. Trend Confirmation & Reversals:
• When the Ichimoku Oscillator crosses above zero, it may indicate a bullish signal.
• When it crosses below zero, it may signal a bearish trend.
3. Divergence Analysis:
• If the price is making new highs while the oscillator is declining, it could indicate a potential reversal.
• If the price is making new lows while the oscillator is rising, it could signal a possible bullish reversal.
4. Integration with Other Indicators:
• Traders often combine it with other Ichimoku components (e.g., Cloud (Kumo), Chikou Span) for more comprehensive analysis.
• It can also be used alongside volume indicators or RSI to confirm momentum shifts.
AltsMetricsPrivate Library
Library "AltsMetrics"
curve(disp_ind)
Call function to get a certain curve of your strategy.
Parameters:
disp_ind (string)
Returns: Returns type of curve plot.
cleaner(disp_ind, plot)
Call function to filter out your Strategy plots
Parameters:
disp_ind (string)
plot (float)
cobraTable(option, position)
Assign this function to a random variable to get the "Performance Table"
Parameters:
option (simple string)
position (simple string)
Advanced Buy/Sell Signal with FiltersРодионов_________________________________________________________________________________________________
MajorMetricsPrivate Library
Library "MajorMetrics"
curve(disp_ind)
Call function to get a certain curve of your strategy.
Parameters:
disp_ind (string)
Returns: Returns type of curve plot.
cleaner(disp_ind, plot)
Call function to filter out your Strategy plots
Parameters:
disp_ind (string)
plot (float)
cobraTable(option, position)
Assign this function to a random variable to get the "Performance Table"
Parameters:
option (simple string)
position (simple string)
GSD by MATAGSD by MATA - Gold-Sensitive Divergence Indicator
Overview:
The GSD by MATA indicator is designed to analyze the inverse correlation between an instrument’s price movement and gold (XAU/USD) over a selected time period. It helps traders identify whether the instrument tends to move in the opposite direction of gold, providing insights into potential hedging opportunities or market sentiment shifts.
How It Works:
User-Defined Time Period:
The user selects a time frame for comparison (1 Day, 1 Week, 1 Month, 3 Months, 6 Months, or 12 Months).
The indicator calculates the percentage change in both the instrument’s price and gold price over this period.
Inverse Movement Calculation:
If gold increases and the instrument decreases, the indicator registers a negative inverse change.
If gold decreases and the instrument increases, the indicator registers a positive inverse change.
If both move in the same direction, no inverse movement is recorded.
Cumulative Tracking:
The Reverse Change line shows the instant inverse movement.
The Total Change line accumulates the inverse movements over time, helping traders spot trends and long-term divergences.
How to Use:
A rising Total Change line (green) suggests that the instrument frequently moves in the opposite direction of gold, indicating a possible hedge effect.
A falling Total Change line (red) means the instrument has been moving in sync with gold rather than diverging.
The 0 reference line helps identify whether the cumulative effect is positive or negative over time.
Bollinger Bands with DIFF, RIOT, ZHIXIAN bobliuBollinger Bands with DIFF, RIOT, ZHIXIAN
新增DIFF上下差异
RIOT,DIFF斜率指标
BTC Scalping StrategyBTC 5min scalping strategy that uses 9 and 21 ema crossover mixed with RSI and volume.
crypto Position Size Calcultor// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © Awke
//@version=5
indicator(title = "crypto Position Size Calcultor", shorttitle="CPSC" , overlay=true )
RULE1= " Trade Info "
Rule2= " Account Info"
headline= "Trade display info "
// trade info inputs
entry = input.float(0.0, title="Entry" , group=RULE1)
stoploss = input.float(0.0, title = "Stop Loss", group =RULE1)
takeprofit = input.float(0.0, title="Target Price", group =RULE1)
// Acoount info inputs
Account_balance= input.float(0.0 , title = "Account Balance",group=Rule2)
riskpertrade = input.float(0.0 , title="Risk % of the trade",group=Rule2)
// finding out the stop loss and target
stop_loss_distanation = entry - stoploss
take_profit_distantion = takeprofit - entry
// rrturing into percentage
sl_per = stop_loss_distanation / entry * 100
tg_per = take_profit_distantion / entry * 100
// calculating risk reward ratio and postion size
risk_reward_ratio = tg_per / sl_per
position_size = Account_balance* riskpertrade / sl_per
// diplaying info in table
f_Format() =>
_s = str.tostring(syminfo.mintick)
_s := str.replace_all(_s, "25", "00")
_s := str.replace_all(_s, "5", "0")
_s := str.replace_all(_s, "1", "0")
ch_1 = 0.00000000002
ch_2 = 1
ch_3 = 0.00
// logic of display
if (entry > ch_1 and stoploss > ch_1 and takeprofit > ch_1 and Account_balance > ch_2 and riskpertrade > ch_3 )
// options
var Bottom_left = position.bottom_left
var Bottom_right= position.bottom_right
var Top_left= position.top_left
var Top_right = position.top_right
display = input.bool(true, title="Display Info Table", group=headline)
dposition = input.string(Bottom_right ,options = , title = "Display Positions")
if (display)
var table myTable = table.new(dposition, 2, 6, border_width = 1)
txt1 = "Account Balance "
txt2 = str.tostring(Account_balance) + " USD"
table.cell(myTable , 0,0,bgcolor = color.rgb(128,0,128) ,text_color = color.rgb(255,255,255), text=txt1, text_halign=text.align_center, text_size = size.auto)
table.cell(myTable , 1,0,bgcolor = color.rgb(128,0,128) ,text_color = color.rgb(255,255,255), text=txt2, text_halign=text.align_center,text_size = size.auto)
txt3 = "Risk Per Trade %"
txt4= str.tostring(riskpertrade) + " %"
table.cell(myTable , 0,1,bgcolor = color.rgb(0,255,255) ,text_color = color.rgb(0,0,0), text=txt3, text_halign=text.align_center,text_size = size.auto)
table.cell(myTable , 1,1,bgcolor = color.rgb(0,255,255) ,text_color = color.rgb(0,0,0), text=txt4, text_halign=text.align_center,text_size = size.auto)
txt5 = "Entry "
txt6= str.tostring(entry)
table.cell(myTable , 0,2,bgcolor = color.black ,text_color = color.white, text=txt5, text_halign=text.align_center,text_size = size.auto)
table.cell(myTable , 1,2,bgcolor = color.black,text_color = color.white, text=txt6, text_halign=text.align_center,text_size = size.auto)
txt7 = "Stop Loss"
txt8= str.tostring(stoploss)
table.cell(myTable , 0,3,bgcolor = color.red ,text_color = color.white, text=txt7, text_halign=text.align_center,text_size = size.auto)
table.cell(myTable , 1,3,bgcolor = color.red,text_color = color.white, text=txt8, text_halign=text.align_center,text_size = size.auto)
txt9 = "Take Profit"
txt10= str.tostring(takeprofit)
table.cell(myTable , 0,4,bgcolor = color.green ,text_color = color.white, text=txt9, text_halign=text.align_center,text_size = size.auto)
table.cell(myTable , 1,4,bgcolor = color.green,text_color = color.white, text=txt10, text_halign=text.align_center,text_size = size.auto)
txtx1 = "Position Size Of Trade"
txtx2= str.tostring(math.abs(position_size), f_Format()) + " USD"
table.cell(myTable , 0,5,bgcolor = color.blue ,text_color = color.white, text=txtx1, text_halign=text.align_center,text_size = size.auto)
table.cell(myTable , 1,5,bgcolor = color.blue,text_color = color.white, text=txtx2, text_halign=text.align_center,text_size = size.auto)
// displaying trade lines like entry , stoploss , takeprofit
display_trade_lines=input.bool(true, title="Display trade lines")
hline(display_trade_lines ? entry :na , color= color.blue ,linestyle = hline.style_dotted , linewidth=3)
hline(display_trade_lines ? stoploss :na , color= color.red ,linestyle = hline.style_dotted , linewidth=3)
hline(display_trade_lines ? takeprofit :na , color= color.green ,linestyle = hline.style_dotted , linewidth=3)
Volume-Weighted Moving Average (VWMA)This indicator multiple volume by price to get $ value.
This to me is more valuable than traditional volume on cheaper stocks because a stock that has 10mil volume but is 5 cents is way less significant than a stock with 10 mil volume but is $5. Generally, higher $ volume = better trading opportunity.
Momentum Day Trading Setup//@version=6
indicator("Momentum Day Trading Setup", overlay=true)
// VWAP
vwap = ta.vwap(close) // Fixed VWAP issue
plot(vwap, title="VWAP", color=color.blue, linewidth=2)
// EMA 9 & EMA 20
ema9 = ta.ema(close, 9)
ema20 = ta.ema(close, 20)
plot(ema9, title="EMA 9", color=color.green, linewidth=2)
plot(ema20, title="EMA 20", color=color.orange, linewidth=2)
// MACD
= ta.macd(close, 12, 26, 9)
plot(macdLine, title="MACD Line", color=color.blue, linewidth=2)
plot(signalLine, title="Signal Line", color=color.red, linewidth=2)
// RSI
rsi = ta.rsi(close, 14)
rsiOverbought = 80
rsiOversold = 20
hline(rsiOverbought, "Overbought", color=color.red)
hline(rsiOversold, "Oversold", color=color.green)
plot(rsi, title="RSI", color=color.purple, linewidth=2)
// ATR (Average True Range)
atr = ta.atr(14)
plot(atr, title="ATR", color=color.gray, linewidth=1)
// Volume with Moving Average
vol = volume
volMa = ta.sma(vol, 20)
plot(vol, title="Volume", color=color.new(color.blue, 70), style=plot.style_columns) // Fixed transparency issue
plot(volMa, title="Volume MA (20)", color=color.orange, linewidth=2)
// Entry Signal (Bullish Breakout)
bullishEntry = ta.crossover(ema9, ema20) and close > vwap and rsi > 50 and macdLine > signalLine
plotshape(bullishEntry, title="Bullish Entry", location=location.belowbar, color=color.green, style=shape.labelup, size=size.small)
// Exit Signal (Bearish Reversal)
bearishExit = ta.crossunder(ema9, ema20) or close < vwap or macdLine < signalLine
plotshape(bearishExit, title="Bearish Exit", location=location.abovebar, color=color.red, style=shape.labeldown, size=size.small)
EMA 8 & 21, SMA 20 & 50The script plots two Exponential Moving Averages (EMA) and two Simple Moving Averages (SMA) to help traders analyze market trends. The 8-period and 21-period EMAs (yellow and white) track short-term momentum, while the 20-period and 50-period SMAs (blue and purple) provide insights into longer-term trends and key support/resistance levels.
Candle Color Confirmation Strategy// TradingView (Pine Script v5) Strategy
//@version=5
strategy("Candle Color Confirmation Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// Input: Time confirmation in seconds
confirmTime = input(5, title="Seconds to Confirm")
// Track the candle open and its color consistency
var float openPrice = na
var bool isConfirmed = false
var bool isBullish = false
var int startTime = na
if bar_index != bar_index // New candle
openPrice := open
isConfirmed := false
startTime := timenow
if not isConfirmed and (timenow - startTime) >= confirmTime * 1000
if close > openPrice and high == close // Green candle stays green
isBullish := true
strategy.entry("Buy", strategy.long)
isConfirmed := true
else if close < openPrice and low == close // Red candle stays red
isBullish := false
strategy.entry("Sell", strategy.short)
isConfirmed := true
Relative Strength Index 2 / StochasticCombined RSI 2 and Stochastic 5-3-3
You may want to fiddle with the colours.
Çift Zamanlı Bollinger BandlarıMulti time frame bollinger bands which helps to follow trend from top to down.
Candle Size Alert (Open-Close)This Pine Script is a TradingView indicator that checks the size of the previous candle's body (difference between the open and close prices) and triggers an alert if it exceeds a certain threshold.
Breakdown of the Script
1. Indicator Declaration
//@version=5
indicator("Candle Size Alert (Open-Close)", overlay=true)
//@version=5: Specifies that the script is using Pine Script v5.
indicator("Candle Size Alert (Open-Close)", overlay=true):
Creates an indicator named "Candle Size Alert (Open-Close)".
overlay=true: Ensures the script runs directly on the price chart (not in a separate panel).
2. User-Defined Threshold
candleThreshold = input.int(500, title="Candle Size Threshold")
input.int(500, title="Candle Size Threshold"):
Allows the user to set the threshold for candle body size.
Default value is 500 points.
3. Calculate Candle Size
candleSize = math.abs(close - open )
close and open :
close : Closing price of the previous candle.
open : Opening price of the previous candle.
math.abs(...):
Takes the absolute difference between the open and close price.
This gives the candle body size (ignoring whether it's bullish or bearish).
4. Check If the Candle Size Meets the Threshold
sizeCondition = candleSize >= candleThreshold
If the previous candle’s body size is greater than or equal to the threshold, sizeCondition becomes true.
5. Determine Candle Color
isRedCandle = close < open
isGreenCandle = close > open
Red Candle (Bearish):
If the closing price is less than the opening price (close < open ).
Green Candle (Bullish):
If the closing price is greater than the opening price (close > open ).
6. Generate Alerts
if sizeCondition
direction = isRedCandle ? "SHORT SIGNAL (RED)" : "LONG SIGNAL (GREEN)"
alertMessage = direction + ": Previous candle body size = " + str.tostring(candleSize) +
" points (Threshold: " + str.tostring(candleThreshold) + ")"
alert(alertMessage, alert.freq_once_per_bar)
If the candle body size exceeds the threshold, an alert is triggered.
direction = isRedCandle ? "SHORT SIGNAL (RED)" : "LONG SIGNAL (GREEN)":
If the candle is red, it signals a short (sell).
If the candle is green, it signals a long (buy).
The alert message includes:
Signal type (LONG/SHORT).
Candle body size.
The user-defined threshold.
How It Works in TradingView:
The script does not plot anything on the chart.
It monitors the previous candle’s body size.
If the size exceeds the threshold, an alert is generated.
Alerts can be used to notify the trader when big candles appear.
Price Above 20 DMA, 20 SMA, 200 SMA with Buy/Sell ConditionsGuyse Daily Indicator. Uses daily and weekly moving averages to provide buy conditions.