Scalping PullBack Tool
Forums › ProRealTime forum Français › Support ProBuilder › Scalping PullBack Tool
- This topic has 5 replies, 2 voices, and was last updated 1 month ago by
Iván.
Viewing 6 posts - 1 through 6 (of 6 total)
-
-
09/14/2025 at 9:21 AM #250794
Hello,
J’ai trouvé un indicateur de scalping qui a l’air de plutôt bien fonctionner sur Trading View et je souhaitais savoir si quelqu’un pouvait être en mesure de le traduire en ProBuilder.
L’indicateur s’appelle Scalping PullBack Tool R1.1 par JustUncleL.
En vous souhaitant une très bonne journée !
//@version=4//study(title=”Scalping PullBack Tool R1.1 by JustUncleL”, shorttitle=”SCALPTOOL R1.1″, overlay=true)//// 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//// 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.//// === INPUTS ===HiLoLen = input(34, minval=2, title=”High Low PAC channel Length”)fastEMAlength = input(89, minval=2)mediumEMAlength = input(200, minval=2)slowEMAlength = input(600, minval=2)ShowFastEMA = input(true)ShowMediumEMA = input(true)ShowSlowEMA = input(false)ShowHHLL = input(false)ShowFractals = input(true)filterBW = input(false, title=”Show Ideal Fractals Only”)ShowBarColor = input(true, title=”Show coloured Bars around PAC”)ShowBuySell = input(true, title=”Show Buy/Sell Alert Arrows”)Lookback = input(3, minval=1, title=”Pullback Lookback for PAC Cross Check”)DelayArrow = input(false, title=”Show Alert Arrows Only on Closed Candles”)Delay = DelayArrow ? 1 : 0ShowTrendBGcolor= input(true)UseHAcandles = input(true, title=”Use Heikin Ashi Candles in Algo Calculations”)//// === /INPUTS ===// === BASE FUNCTIONS ===haClose = UseHAcandles ? security(heikinashi(syminfo.tickerid), timeframe.period, close) : closehaOpen = UseHAcandles ? security(heikinashi(syminfo.tickerid), timeframe.period, open) : openhaHigh = UseHAcandles ? security(heikinashi(syminfo.tickerid), timeframe.period, high) : highhaLow = UseHAcandles ? security(heikinashi(syminfo.tickerid), timeframe.period, low) : low// ||— Fractal Recognition Functions: —————————————————————||isRegularFractal(mode) =>ret=mode==1?high[4] <high[3] andhigh[3] <high[2] andhigh[2] >high[1] andhigh[1] >high[0] :mode==-1?low[4] >low[3] andlow[3] >low[2] andlow[2] <low[1] andlow[1] <low[0] :falseretisBWFractal(mode) =>ret=mode==1?high[4] <high[2] andhigh[3] <=high[2] andhigh[2] >=high[1] andhigh[2] >high[0] :mode==-1?low[4] >low[2] andlow[3] >=low[2] andlow[2] <=low[1] andlow[2] <low[0] :falseret// ||—————————————————————————————————–||//// === /BASE FUNCTIONS ===// === SERIES SETUP ===//// ||— Setup Moving Averages and PAC channel:// ||—————————————————————————————————–||fastEMA = ema(haClose, fastEMAlength)mediumEMA = ema(haClose, mediumEMAlength)slowEMA = ema(haClose, slowEMAlength)pacC = ema(haClose, HiLoLen)pacL = ema(haLow, HiLoLen)pacU = ema(haHigh, HiLoLen)TrendDirection=fastEMA>mediumEMAandpacL>mediumEMA?1:fastEMA < mediumEMA and pacU < mediumEMA ? -1 : 0// ||— Fractal Recognition:// ||—————————————————————————————————–||filteredtopf = filterBW ? isRegularFractal(1) : isBWFractal(1)filteredbotf = filterBW ? isRegularFractal(-1) : isBWFractal(-1)// ||—————————————————————————————————–||// ||— Higher Highs, Lower Highs, Higher Lows, Lower Lows ——————————————-||valuewhen_H0 = valuewhen(filteredtopf == true, high[2], 0)valuewhen_H1 = valuewhen(filteredtopf == true, high[2], 1)valuewhen_H2 = valuewhen(filteredtopf == true, high[2], 2)//higherhigh=filteredtopf==false?false:valuewhen_H1 < valuewhen_H0 and valuewhen_H2 < valuewhen_H0lowerhigh=filteredtopf==false?false:valuewhen_H1 > valuewhen_H0 and valuewhen_H2 > valuewhen_H0valuewhen_L0 = valuewhen(filteredbotf == true, low[2], 0)valuewhen_L1 = valuewhen(filteredbotf == true, low[2], 1)valuewhen_L2 = valuewhen(filteredbotf == true, low[2], 2)//higherlow=filteredbotf==false?false:valuewhen_L1 < valuewhen_L0 and valuewhen_L2 < valuewhen_L0lowerlow=filteredbotf==false?false:valuewhen_L1 > valuewhen_L0 and valuewhen_L2 > valuewhen_L0//// === /SERIES ===//// === PLOTTING ===//// Plot the Price Action Channel (PAC) base on EMA high,low and closeL = 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.graybarcolor(ShowBarColor ? BARcolor : na, title=”Bar Colours”)//BGcolor=TrendDirection==1?color.green:TrendDirection == -1 ? color.red : color.yellowbgcolor(ShowTrendBGcolor ? BGcolor : na, transp=90, title=”Trend BG Color”)// Draw the EMA ribbonplot(ShowFastEMA ? fastEMA : na, color=color.green, linewidth=2, transp=20, title=”fastEMA”)plot(ShowMediumEMA ? mediumEMA : na, color=color.blue, linewidth=3, transp=20, title=”mediumEMA”)plot(ShowSlowEMA ? slowEMA : na, color=color.black, linewidth=4, transp=20, title=”slowEMA”)//plotshape(ShowFractals ? filteredtopf : na, title=’Filtered Top Fractals’, style=shape.triangledown, location=location.abovebar, color=color.red, offset=-2)plotshape(ShowFractals ? filteredbotf : na, title=’Filtered Bottom Fractals’, style=shape.triangleup, location=location.belowbar, color=color.lime, offset=-2)//plotshape(ShowHHLL ? higherhigh : na, title=’Higher High’, style=shape.square, location=location.abovebar, color=color.maroon, text=”[HH]”, offset=-2)plotshape(ShowHHLL ? lowerhigh : na, title=’Lower High’, style=shape.square, location=location.abovebar, color=color.maroon, text=”[LH]”, offset=-2)plotshape(ShowHHLL ? higherlow : na, title=’High Low’, style=shape.square, location=location.belowbar, color=color.green, text=”[HL]”, offset=-2)plotshape(ShowHHLL ? lowerlow : na, title=’Lower Low’, style=shape.square, location=location.belowbar, color=color.green, text=”[LL]”, offset=-2)//// === /PLOTTING ===// === ALERTING ===//// Initialise Trading state.TradeDirection = 0TradeDirection := nz(TradeDirection[1])//pacExitU = haOpen < pacU and haClose > pacU and barssince(haClose<pacC)<=LookbackpacExitL = haOpen > pacL and haClose < pacL and barssince(haClose>pacC)<=Lookbackplotshape(barssince(haClose<pacC),color=na,location=location.bottom,title=”barssince(haClose<pacC)”)plotshape(barssince(close>pacC),color=na,location=location.bottom,title=”barssince(haClose>pacC)”)//Buy = TrendDirection == 1 and pacExitUSell = TrendDirection == -1 and pacExitL//// Keep Current trading state until Pullback occurs or New Recovery.TradeDirection:=TradeDirection==1andhaClose<pacC?0:TradeDirection==-1andhaClose>pacC?0:TradeDirection==0andBuy?1:TradeDirection == 0 and Sell ? -1 : TradeDirection// Show buy/sell arrowsplotarrow(ShowBuySellandnz(TradeDirection[1+Delay]) ==0andTradeDirection[Delay] !=0?TradeDirection[Delay] :na,offset=-Delay,colorup=color.green, colordown=color.maroon, transp=20, minheight=20, maxheight=50, title=”Buy/Sell Arrow”)//// Create alerts for TradingView Alarm subsystem.Long = nz(TradeDirection[1]) == 0 and TradeDirection == 1Short = nz(TradeDirection[1]) == 0 and TradeDirection == -1alertcondition(Long, title=”Buy Condition”, message=”BUY”)alertcondition(Short, title=”Sell Condition”, message=”SELL”)//// === /ALERTING ===// === eof.09/16/2025 at 11:05 AM #250925voici:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137//-----------------------------------------------////PRC_Scalping PullBack Tool by JustUncleL//version = 0//16.09.25//Iván González @ www.prorealcode.com//Sharing ProRealTime knowledge//-----------------------------------------------//HiLoLen = 34 //High Low PAC channel LengthfastEMAlength = 89 //mediumEMAlength = 200 //slowEMAlength = 600 //ShowFastEMA = 1 //ShowMediumEMA = 1 //ShowSlowEMA = 0 //ShowHHLL = 0 //ShowFractals = 0 //filterBW = 0 //Show Ideal Fractals OnlyShowBarColor = 0 //Show coloured Bars around PACShowTrendBGcolor= 1 //UseHAcandles = 1 //Use Heikin Ashi Candles in Algo Calculationsatr=averagetruerange[14](close)//-----------------------------------------------//// Candles Definition//-----------------------------------------------//once haopen=openif UseHAcandles thenhaclose=(open+close+high+low)/4if barindex> 0 thenhaopen=(haopen+haclose[1])/2endifhalow=min(low,min(haclose,haopen))hahigh=max(high,max(haclose,haopen))elsehaclose=closehaopen=openhalow=lowhahigh=highendif//-----------------------------------------------//// Setup Moving averages and PAC channel//-----------------------------------------------//fastEma = average[fastEMAlength,1](haclose)mediumEma = average[mediumEMAlength,1](haclose)slowEma = average[slowEMAlength,1](haclose)pacC = average[hiLoLen,1](haclose)pacL = average[hiLoLen,1](halow)pacU = average[hiLoLen,1](hahigh)if fastEma>mediumEma and pacL > mediumEma thentrendDirection = 1elsif fastEma<mediumEma and pacU<mediumEma thentrendDirection = -1elsetrendDirection = 0endif//-----------------------------------------------//// Fractal recognition//-----------------------------------------------//if filterBW thenfilteredtopf=high[4] <high[3] and high[3] <high[2] and high[2] >high[1] and high[1] >highfilteredbotf=low[4] >low[3] and low[3] >low[2] and low[2] <low[1] and low[1] <lowelsefilteredtopf=high[4] <high[2] and high[3] <=high[2] and high[2] >=high[1] and high[2] >highfilteredbotf=low[4] >low[2] and low[3] >=low[2] and low[2] <=low[1] and low[2] <lowendif//-----------------------------------------------//// Higher Highs, Lower Highs, Higher Lows and Lower Lows//-----------------------------------------------//if filteredtopf thenvaluewhenH2 = valuewhenH1valuewhenH1 = valuewhenH0valuewhenH0 = high[2]higherhigh=valuewhenH1 < valuewhenH0 and valuewhenH2 < valuewhenH0lowerhigh=valuewhenH1 > valuewhenH0 and valuewhenH2 > valuewhenH0drawtext("▼",barindex[2],high[2]+atr*0.35)coloured("red",255*showFractals)elsehigherhigh=0lowerhigh=0endifif filteredbotf thenvaluewhenL2 = valuewhenL1valuewhenL1 = valuewhenL0valuewhenL0 = low[2]higherlow=valuewhenL1 < valuewhenL0 and valuewhenL2 < valuewhenL0lowerlow=valuewhenL1 > valuewhenL0 and valuewhenL2 > valuewhenL0drawtext("▲",barindex[2],low[2]-atr*0.35)coloured("green",255*showFractals)elsehigherlow=0lowerlow=0endif//-----------------------------------------------//// Plotting//-----------------------------------------------//// Price Action Channelcolorbetween(pacL,pacU,"grey",90)// Colour barsif haClose>pacU thenr=0g=0b=255elsif haClose<pacL thenr=255g=0b=0elser=124g=124b=124endifdrawcandle(haopen,hahigh,halow,haclose)coloured(r,g,b,ShowBarColor*255)// Background colorif trendDirection=1 thenbackgroundcolor("green",30*ShowTrendBGcolor)elsif trendDirection=-1 thenbackgroundcolor("red",30*ShowTrendBGcolor)elsebackgroundcolor("yellow",30*ShowTrendBGcolor)endif// show HHLLif showHHLL thenif higherhigh thendrawtext("HH",barindex[2],high[2]+atr)coloured("darkred")endifif lowerhigh thendrawtext("LH",barindex[2],high[2]+atr)coloured("darkred")endifif higherlow thendrawtext("HL",barindex[2],low[2]-atr)coloured("darkgreen")endifif lowerlow thendrawtext("LL",barindex[2],low[2]-atr)coloured("darkgreen")endifendif//-----------------------------------------------//return pacL as "High PAC ema" coloured("grey")style(line,1), pacU as "Low PAC ema" coloured("grey")style(line,1),pacC as "Close PAC ema" coloured("red")style(line,2), fastEMA as "fast Ema"coloured("green",showFastEma*255)style(line,2),mediumEMA as "medium Ema"coloured("blue",showMediumEma*255)style(line,3),slowEMA as "slow Ema"coloured("black",showSlowEma*255)style(line,4)09/16/2025 at 11:27 AM #25092609/16/2025 at 2:37 PM #25093109/16/2025 at 2:53 PM #25093209/16/2025 at 3:51 PM #250939 -
AuthorPosts
Viewing 6 posts - 1 through 6 (of 6 total)
