rgjdfhjjtyj
rgjdfhjjtyj
//
//
// Revision: 1.1
// Original Author: JustUncleL
//
// Description:
// This study project is a Scalping Pullback trading Tool that incorporates the
majority of the indicators
// needed to analyse and scalp Trends for Pull Backs and reversals intended for
lower time frame
// charts upto 15min, but it should work just as well on higher time frame
charts for
// longer term trades.
//
// This Tool can be used with Heikin Ashi (HA) candle charts or normal candle
charts, HA candles
// will show a cleaner/smoother looking candle trend but not show true prices.
//
// Incorporated within this tool are the following indicators:
// 1. Trader selectable important EMAs in an EMA style Ribbon:
// - Green = fast EMA (default=89)
// - Blue = medium EMA (default=200)
// - Black = slow EMA (default=600)
// 2. The PAC EMA (default=34) High/Low+Close creates the Price Action Channel
(PAC).
// 3. Fractals
// 4. HH, LH, LL, HL finder may help with drawing Trend lines and mini Trend
Lines.
// 5. Coloured coded Bar high lighting based on the PAC:
// - blue = bar closed above PAC
// - red = bar closed below PAC
// - gray = bar closed inside PAC
// - red line = PAC EMA (34) of bar close
// 6. Coloured chart Background to indicate Trend direction
// (NOTE: slow EMA(600) is not used in this Algo):
// - green = Trend direction is up when PAC and fast EMA(89) are above
medium EMA(200).
// - red = Trend direction is down when PAC and fast EMA(89) are below
medium EMA(200).
// - yellow = Trend direction is in transition.
// 7. Pullback is defined as Price starts outside the PAC and then pulls back
into the PAC
// closing the opposite side of the PAC centre line, then a recovery arrow
can occur.
// 8. Coloured Alert Arrows:
// - maroon down arrow = Pullback recovery Sell alert
// - green up arrow = Pullback recovery Buy alert
// 9. Option to force Heikin Ashi candles in Algo calculations.
//
// Setup and hints:
//
// - I also add "Sweetspot Gold RN" indicator to the chart as well to help with
support and resistance
// finding and shows where the important "00" and "0" lines are.
// - When price is above the PAC(blue bars) we are only looking to buy as price
comes back to the PAC
// When price is below the PAC(red bars), we are only looking to sell when price
comes back to the PAC
// - What we’re looking for when price comes back into the PAC we draw mini
Trendlines (TL) uitilising the
// Fractals and HH/LL points to guide your TL drawing.
// - Now look for the trend to pull back and break the drawn mini TL. That's is
where we can place the scalp
// trade.
// - So we are looking for continuation signals in terms of a strong, momentum
driven pullbacks
// of the PAC EMA(34).
// - The other EMAs are there to check for other Pullbacks when PAC EMA (34) is
broken.
// - Other than the "SweetSpot Gold RN" indicator, you should not need any other
indicator to scalp
// for pullbacks.
// - If you want to trade shallower Pullbacks for quicker scalps, try reducing the
// PAC and EMA combination lengths for example:
// * 21 PAC and 55, 144, 377 for fast, medium, slow EMAs
// * 13 PAC and 34, 89, 233 for fast, medium, slow EMAs
// - Each alert should be evaluated on it's own merits, the alerts are designed to
highlight possible
// scalping trades from Pullback recoveries around the PAC.
//
// References:
// - [RS]Fractals V8 by RicardoSantos
// - Price Action Trading System v0.3 by JustUncleL
// - SweetSpot Gold RN by JustUncleL
// - http://www.swing-trade-stocks.com/pullbacks.html
// - https://www.forexstrategiesresources.com/scalping-forex-strategies/106-1-min-
scalping-with-34-exponential-moving-average-channel/
//
// Modifications:
// 4-Feb-2020 Release R1.1 changes made to provide a more versitile tool
// - Upgraded to Pinescript R4
// - Reodered code into more logical blocks
// - Added option for PAC filtered Alerts and Alarms.
// - Added option to alter the default EMA lengths.
// - Added option to Show each EMA line.
// - Added option to use Heikin Ashi candles for Algo calculations
// even when normal candles are displayed on chart.
//
isBWFractal(mode) =>
ret = mode == 1 ? high[4] < high[2] and high[3] <= high[2] and high[2] >=
high[1] and
high[2] > high[0] : mode == -1 ?
low[4] > low[2] and low[3] >= low[2] and low[2] <= low[1] and low[2] <
low[0] :
false
ret
//
||---------------------------------------------------------------------------------
--------------------||
//
// === /BASE FUNCTIONS ===
//
// === /SERIES ===
//
// === PLOTTING ===
//
// Plot the Price Action Channel (PAC) base on EMA high,low and close
L = plot(pacL, color=color.gray, linewidth=1, title="High PAC EMA", transp=50)
U = plot(pacU, color=color.gray, linewidth=1, title="Low PAC EMA", transp=50)
C = plot(pacC, color=color.red, linewidth=2, title="Close PAC EMA", transp=0)
fill(L, U, color=color.gray, transp=90, title="Fill HiLo PAC")
// Colour bars according to the close position relative to the PAC selected.
BARcolor = haClose > pacU ? color.blue : haClose < pacL ? color.red : color.gray
barcolor(ShowBarColor ? BARcolor : na, title="Bar Colours")
//
BGcolor = TrendDirection == 1 ? color.green :
TrendDirection == -1 ? color.red : color.yellow
bgcolor(ShowTrendBGcolor ? BGcolor : na, transp=90, title="Trend BG Color")
// === eof.