by kritarth2121· code credited to Dynamictradingstrategies
This intraday strategy opens a long when the MACD histogram crosses above zero and a short when it crosses below, only inside a chosen session and only while ADX is below a threshold of 25.
1Copy the scriptPress Copy script above, or the copy button on the code below.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.
Source Code
53 lines of Pine Script v5 from MACD DAY TRADING WITH TGT AND SL.txt, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
Each trade has a fixed point-based stop loss and take profit relative to the average entry price, set separately for long and short. Positions are squared off in the last fifteen minutes of the session. Stop and target levels are plotted on the price chart.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
session
session
0915-1445
session
LONGSTOP
int
50
LONGSTOP
LONGTGT
int
100
LONGTGT
SHORTSTOP
int
50
SHORTSTOP
SHORTTGT
int
100
SHORTTGT
ADX_LEVEL
int
25
ADX_LEVEL
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
This strategy plots VWAP on the price chart and trades only between a start hour and an end hour. It enters long when VWAP is rising and RSI is above a threshold, and short when VWAP is falling and RSI is below a threshold. If the reversal option is on, it clo
This strategy enters long or short on the price chart when price is on the correct side of a 200-period EMA, MACD agrees, RSI is not at the opposing extreme, ADX exceeds a threshold, volume beats a 20-bar average, and close breaks the recent high or low. A tim
Donald - AI Futures is a price-chart strategy that estimates inner and outer high-low zones and a smoothed close with rational quadratic kernel regression. It builds bullish and bearish momentum signals, optionally compares volume with a volume-weighted moving
This strategy enters long when price closes above the prior Donchian high and short when it closes below the prior Donchian low, only while flat and inside a Taipei-hour window. It exits on a MACD histogram reversal or through an ATR stop and a percentage take
This strategy tracks an opening session time range to establish directional bias and triggers pullback trades using Stochastic RSI. Once price breaks out of the initial range, it establishes a directional bias and enters when the Stochastic RSI crosses over in
This strategy plots on the XAUUSD price chart and looks for Smart Money Concepts entries on the fifteen-minute timeframe. It scores fair value gaps, order blocks, liquidity sweeps, break of structure, and change of character, plus EMA, RSI, MACD, and higher-ti