Scalping Swing Trading Tool de Trading View
Forums › ProRealTime forum Français › Support ProBuilder › Scalping Swing Trading Tool de Trading View
- This topic has 3 replies, 3 voices, and was last updated 4 days ago by
NICO73.
Viewing 4 posts - 1 through 4 (of 4 total)
-
-
03/25/2025 at 6:38 PM #245283
Bonjour à tous,
Je vous solicite aujourd’hui après être tombé sur une vidéo d’un jeune homme mettant en avant un indicateur de scalping “efficace”.
Je suis très curieux de pouvoir expérimenter la chose, mais mes capacités de codeur étant réduite, j’aimerai savoir si l’un de vous peut effectuer la conversion sur PRT puisqu”il s’agit d’un indicateur que l’on peut trouver sur Trading View.
Je vous en suis reconnaissant par avance!
Tony
//@version=3//study(title = “Scalping Swing Trading Tool R1-6 by JustUncleL”, shorttitle = “SCALPSWING R1-6”, overlay = true)//// Revision: 1// Original Author: JustUncleL//// Description:// This study project is a Scalping Swing trading Tool designed for a two pane TradingView chart layout:// – the first pane set to 15min Time Frame;// – the second pane set to 1min Time Frame(TF).// The tools incorporates the majority of the indicators needed to analyse and scalp Trends for Swings,// PullBacks and reversals on 15min charts and 1min charts. The set up optionally utilies Heikin Ashi// candle charts.//// NOTE: A Pullback is synomous to Retracement, generally a Pullback refers to a large Retracement of 100pips// or more. In the context of this Tool and any comments related to it, a Pullback will be the// same as a Retracement.//// Incorporated within this tool are the following indicators:// 1. The following EMAs:// – Green = EMA89 (15min TF) = EMA75 (1min TF)// – Blue = EMA200 (15min TF) = EMA180 (1min TF)// – Black = EMA633 (15min TF) = EMA540 (1min TF)// 2. The 10EMA (default) High/Low+Close Price Action Channel (PAC).// 3. Fractals// 4. HH, LH, LL, HL finder to 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 = EMA36 of bar close// 6. Optionally display Pivot points (disables Fractals automatically when selected).// 7. Display EMA5-12 Channel// 8. Display EMA12-36 Ribbon// 9. Optionally display EMA36 and PAC instead of EMA12-36 Ribbon.//// Setup and hints://// – Set to two pane TradingView chart, set first pane to 15Min and second to 1min.// – Set the chart to Heikin Ashi Candles in both panes (optional).// – I also add “Sweetspot Gold2” indicator to the chart as well to help with support and resistance// finding and shows where the important “00” and “0” lines are.// – Use the EMA200 on the 15min pane as the anchor. So when prices above EMA200 we only trade long (buy)// and when prices below the EMA200 we only trade short (sell).// – On the 15min chart draw any obvious Vertical Trend Lines (VTL), use Pivots point as a guide.// – On the 15min chart what we’re looking for price to Pullback into the EMA5-12 Channel or EMA12-36 ribbon// we Trendlines uitilising the Pivot points or Fractals to guide your TL drawing.// – On the 15min chart look for the trend to resume and break through the drawn TL. The bar color needs to// change back to the trend direction colour to confirm as a break.// – Now this break can be traded as a 15min trade or now look to the 1min chart.// – On the 1min chart draw any Pullback into any of the EMAs.// – On the 1min chart look for the trend to resume and break through the drawn TL. The bar color needs to// change back to the trend direction colour to confirm as a break.// – Now this break can be traded as a 1min trade.// – So we are looking for continuation signals in terms of a strong, momentumdriven pullbacks of the EMA36.// – The other EMAs are there to check for other Pullbacks when EMA36 is broken.// – There is also an option to select Pristine (ie Ideal) filtered Fractals, which look like tents or V shape// 5-candle patterns. These are actually used to calculate the Pivot points as well.// – Other than the SweetSpot Gold2 indicator, you should not need any other indicator to scalp// for pullbacks.//// Revisions:// R1 by JustUncleL// – Original version.//// R1-6 23-June-2019// – Updated to version 3 of Pinescript// – Added optional PAC swing alerts, with optional 200ema filter (PAC has to above/below 200ema)// – Added alarms for swing arrows// – Removed security calls for sources, problematic////// References:// – [RS]Fractals V8 by RicardoSantos// – Price Action Trading System v0.3 by JustUncleL// – SweetSpot Gold2 R1 by JustUncleL//// === INPUTS ===ShowPAC_ = input(true, title=”Show Price Action Channel (PAC)”)scolor = input(true, title=”Show coloured Bars close relative on PAC”)HiLoLen = input(10,minval=2,title=”High Low PAC Length”)ShowPACexit = input(false, title=”Show PAC Swing Alerts”)UseBigArrows = input(false, title=”Use Big Arrows for Swing Alerts”)filterEMA200 = input(true, title=”Filter PAC Alerts with 200ema”)ShowEMA12_Channel= input(true)ShowEMA36_Ribbon = input(true)ShowPAC=HiLoLen>30?ShowEMA36_Ribbon?false:ShowPAC_:ShowEMA12_Channel?false:ShowPAC_ShowPivots = input(true)ShowPivotLabels = input(true)// Disable Fractal drawing if Pivots enabledShowHHLL_ = input(false)ShowHHLL = ShowPivots?false:ShowHHLL_ShowFractals_= input(true)ShowFractals = ShowPivots?false:ShowFractals_ShowFractalLevels =input(false)//ShowFractalLevels = ShowPivots?false:ShowFractalLevels_filterBW_ = input(false, title=”Filter for Pristine (Ideal) Fractals”)// Need Williams Filter for Pivots.filterBW = ShowPivots?true:filterBW_// — CONSTANTS —DodgerBlue = #1E90FF//// — SOURCES —close_ = close //security(ticker, period, close, barmerge.gaps_off, barmerge.lookahead_on)open_ = open //security(ticker, period, open, barmerge.gaps_off, barmerge.lookahead_on)high_ = high //security(ticker, period, high, barmerge.gaps_off, barmerge.lookahead_on)low_ = low //security(ticker, period, low, barmerge.gaps_off, barmerge.lookahead_on)exitClose = close_ //UseHAexit ? security(heikinashi(tickerid), period, close) : close_exitOpen = open_ //UseHAexit ? security(heikinashi(tickerid), period, open) : open_//// === /INPUTS ===// ||— Fractal Recognition Functions: —————————————————————||isRegularFractal(mode) =>ret=mode==1?high_[5] <high_[4] andhigh_[4] <high_[3] andhigh_[3] >high_[2] andhigh_[2] >high_[1] :mode == -1 ? low_[5] > low_[4] and low_[4] > low_[3] and low_[3] < low_[2] and low_[2] < low_[1] : falseisBWFractal(mode) =>ret=mode==1?high_[5] <high_[3] andhigh_[4] <high_[3] andhigh_[3] >high_[2] andhigh_[3] >high_[1] :mode == -1 ? low_[5] > low_[3] and low_[4] > low_[3] and low_[3] < low_[2] and low_[3] < low_[1] : false// ||—————————————————————————————————–||// MA Colour finder for EMA Ribbon plot.maColor(maBase, ma, maRef) =>change(ma)>=0 and maBase>maRef ? DodgerBlue:change(ma)<0 and maBase>maRef ? maroon:change(ma)<=0 and maBase<maRef ? red:change(ma)>=0 and maBase<maRef ? blue:gray// === /FUNCTIONS ===// === SERIES SETUP ===// Price action channelpacC = ema(close_,HiLoLen)pacL = ema(low_,HiLoLen)pacU = ema(high_,HiLoLen)// All other EMAsEMA05 = ema(close_, 05)EMA11 = ema(close_, 11)EMA12 = ema(close_, 12)EMA15 = ema(close_, 15)EMA18 = ema(close_, 18)EMA21 = ema(close_, 21)EMA24 = ema(close_, 24)EMA27 = ema(close_, 27)EMA30 = ema(close_, 30)EMA33 = ema(close_, 33)EMA36 = ema(close_, 36)EMA75 = ema(close_, 75)EMA89 = ema(close_, 89)EMA180 = ema(close_, 180)EMA200 = ema(close_, 200)EMA540 = ema(close_, 540)EMA633 = ema(close_, 633)// === /SERIES ===// === PLOTTING ===//// If selected, Plot the Price Action Channel (PAC) base on EMA high,low and closeL=plot(ShowPAC ?pacL:na, color=gray, linewidth=1, title=”High PAC EMA”,transp=50)U=plot(ShowPAC ?pacU:na, color=gray, linewidth=1, title=”Low PAC EMA”,transp=50)C=plot(ShowPAC ?pacC:na, color=lime, linewidth=1, title=”Close PAC EMA”,transp=0)fill(L,U, color=gray,transp=92,title=”Fill HiLo PAC”)// Colour bars according to the close position relative to the PAC selected.bColour =close>=pacU?blue:close<=pacL?red:graybarcolor(scolor?bColour:na, title = “Bar Colours”)// Draw the EMA12 ribbonema05=plot(ShowEMA12_Channel?EMA05:na, color=blue,linewidth=1,transp=92,title=”EMA05″)ema11=plot(ShowEMA12_Channel?EMA11:na, color=blue,linewidth=1,transp=92,title=”EMA11″)fill(ema05,ema11, color=blue,transp=92,title=”Fill EMA5-12″)//// If this is the 1min Time Frame select 15* EMAsemaFast = isintraday? interval==1? EMA75 : EMA89 : EMA89emaMedium = isintraday? interval==1? EMA180 : EMA200 : EMA200emaSlow = isintraday? interval==1? EMA540 : EMA633 : EMA633plot(emaFast, color=green,linewidth=3,transp=20,title=”EMA fast”)plot(emaMedium, color=blue,linewidth=3,transp=20,title=”EMA medium”)plot(emaSlow, color=black,linewidth=3,transp=20,title=”EMA slow”)// Draw the EMA36 ribbonplot( ShowEMA36_Ribbon?EMA12:na, color=maColor(EMA12,EMA12,EMA36), style=line, title=”MA12″, linewidth=2,transp=20)plot( ShowEMA36_Ribbon?EMA15:na, color=maColor(EMA12,EMA15,EMA36), style=line, title=”MA15″, linewidth=1,transp=20)plot( ShowEMA36_Ribbon?EMA18:na, color=maColor(EMA12,EMA18,EMA36), style=line, title=”MA18″, linewidth=1,transp=20)plot( ShowEMA36_Ribbon?EMA21:na, color=maColor(EMA12,EMA21,EMA36), style=line, title=”MA21″, linewidth=1,transp=20)plot( ShowEMA36_Ribbon?EMA24:na, color=maColor(EMA12,EMA24,EMA36), style=line, title=”MA24″, linewidth=1,transp=20)plot( ShowEMA36_Ribbon?EMA27:na, color=maColor(EMA12,EMA27,EMA36), style=line, title=”MA27″, linewidth=1,transp=20)plot( ShowEMA36_Ribbon?EMA30:na, color=maColor(EMA12,EMA30,EMA36), style=line, title=”MA30″, linewidth=1,transp=20)plot( ShowEMA36_Ribbon?EMA33:na, color=maColor(EMA12,EMA33,EMA36), style=line, title=”MA33″, linewidth=1,transp=20)plot( EMA36, color=ShowEMA36_Ribbon?maColor(EMA12,EMA36,EMA36):red, style=line, title=”MA36″, linewidth=2,transp=20)// === /SERIES ===// === PLOTTING ===// ||— Fractal Recognition:// ||—————————————————————————————————–||filteredtopf = filterBW ? isRegularFractal(1) : isBWFractal(1)filteredbotf = filterBW ? isRegularFractal(-1) : isBWFractal(-1)plotshape(ShowFractals? filteredtopf :na, title=’Filtered Top Fractals’, style=shape.triangledown, location=location.abovebar, color=red, offset=-3,transp=0)plotshape(ShowFractals? filteredbotf :na, title=’Filtered Bottom Fractals’, style=shape.triangleup, location=location.belowbar, color=lime, offset=-3,transp=0)topfractals = nabotfractals = natopfractals := filteredtopf ? high_[3] : topfractals[1]botfractals := filteredbotf ? low_[3] : botfractals[1]topfcolor = nabotfcolor = natopfcolor := topfractals != topfractals[1] ? na : greenbotfcolor := botfractals != botfractals[1] ? na : redplot(ShowFractalLevels? topfractals : na, color=topfcolor, transp=0, linewidth=2)plot(ShowFractalLevels? botfractals : na, color=botfcolor, transp=0, linewidth=2)// ||—————————————————————————————————–||// ||— Higher Highs, Lower Highs, Higher Lows, Lower Lows ——————————————-||higherhigh=filteredtopf==false?false: ( valuewhen(filteredtopf==true,high_[3],1) <valuewhen(filteredtopf==true,high_[3],0) and(ShowPivots or valuewhen(filteredtopf == true, high_[3], 2) < valuewhen(filteredtopf == true, high_[3], 0)))lowerhigh=filteredtopf==false?false: ( valuewhen(filteredtopf==true,high_[3],1) >valuewhen(filteredtopf==true,high_[3],0) and(ShowPivots or valuewhen(filteredtopf == true, high_[3], 2) > valuewhen(filteredtopf == true, high_[3], 0)))higherlow=filteredbotf==false?false: ( valuewhen(filteredbotf==true,low_[3],1) <valuewhen(filteredbotf==true,low_[3],0) and(ShowPivots or valuewhen(filteredbotf == true, low_[3], 2) < valuewhen(filteredbotf == true, low_[3], 0)))lowerlow=filteredbotf==false?false: ( valuewhen(filteredbotf==true,low_[3],1) >valuewhen(filteredbotf==true,low_[3],0) and(ShowPivots or valuewhen(filteredbotf == true, low_[3], 2) > valuewhen(filteredbotf == true, low_[3], 0)))// If selected show HH/LL on top/below candles.plotshape(ShowHHLL ? higherhigh : na, title=’HH’, style=shape.square, location=location.abovebar, color=maroon, text=”[HH]”, offset=-3,transp=0)plotshape(ShowHHLL ? lowerhigh : na, title=’LH’, style=shape.square, location=location.abovebar, color=maroon, text=”[LH]”, offset=-3,transp=0)plotshape(ShowHHLL ? higherlow : na, title=’HL’, style=shape.square, location=location.belowbar, color=green, text=”[HL]”, offset=-3,transp=0)plotshape(ShowHHLL ? lowerlow : na, title=’LL’, style=shape.square, location=location.belowbar, color=green, text=”[LL]”, offset=-3,transp=0)// If selected display Pivot pointsplotshape(ShowPivots and ShowPivotLabels? higherhigh : na, title=’Higher High’, style=shape.cross, location=location.abovebar, color=maroon, text=”[HH]\n[PVT]”, offset=-3,transp=0)plotshape(ShowPivots and not ShowPivotLabels? higherhigh : na, title=’Higher High+’, style=shape.cross, location=location.abovebar, color=maroon, offset=-3,transp=0)//plotshape(ShowPivots and ShowPivotLabels? lowerhigh : na, title=’Lower High’, style=shape.cross, location=location.abovebar, color=maroon, text=”[LH]\n[PVT]”, offset=-3,transp=0)plotshape(ShowPivots and not ShowPivotLabels? lowerhigh : na, title=’Lower High+’, style=shape.cross, location=location.abovebar, color=maroon, offset=-3,transp=0)//plotshape(ShowPivots and ShowPivotLabels? higherlow : na, title=’Higher Low’, style=shape.cross, location=location.belowbar, color=green, text=”[PVT]\n[HL]”, offset=-3,transp=0)plotshape(ShowPivots and not ShowPivotLabels? higherlow : na, title=’Higher Low+’, style=shape.cross, location=location.belowbar, color=green, offset=-3,transp=0)//plotshape(ShowPivots and ShowPivotLabels? lowerlow : na, title=’Lower Low’, style=shape.cross, location=location.belowbar, color=green, text=”[PVT]\n[LL]”, offset=-3,transp=0)plotshape(ShowPivots and not ShowPivotLabels? lowerlow : na, title=’Lower Low+’, style=shape.cross, location=location.belowbar, color=green, offset=-3,transp=0)//// Number candles on Pivot patterns.plotchar(ShowPivots ? filteredtopf: na, title=’High 1u’, location=location.abovebar, color=maroon, char=”1″, offset=-5,transp=0)plotchar(ShowPivots ? filteredtopf: na, title=’High 2u’, location=location.abovebar, color=maroon, char=”2″, offset=-4,transp=0)plotchar(ShowPivots ? filteredtopf: na, title=’High 2d’, location=location.abovebar, color=maroon, char=”2″, offset=-2,transp=0)plotchar(ShowPivots ? filteredtopf: na, title=’High 1d’, location=location.abovebar, color=maroon, char=”1″, offset=-1,transp=0)//plotchar(ShowPivots ? filteredbotf: na, title=’Low 1d’, location=location.belowbar, color=green, char=”1″, offset=-5,transp=0)plotchar(ShowPivots ? filteredbotf: na, title=’Low 2d’, location=location.belowbar, color=green, char=”2″, offset=-4,transp=0)plotchar(ShowPivots ? filteredbotf: na, title=’Low 2u’, location=location.belowbar, color=green, char=”2″, offset=-2,transp=0)plotchar(ShowPivots ? filteredbotf: na, title=’Low 1u’, location=location.belowbar, color=green, char=”1″, offset=-1,transp=0)// === /PLOTTING ===// === ALERTS ===// Check for 1st Heikin Ashi Bar exit the PACisup = exitClose>exitOpen and exitClose>pacU and exitClose[1]<pacU[1] and (not filterEMA200 or pacC>emaMedium)isdown = exitClose<exitOpen and exitClose<pacL and exitClose[1]>pacL[1] and (not filterEMA200 or pacC<emaMedium)// Check have alert//up_alert = isup and (not filterEMA200 or (pacC>EMAmedm) ) ? na(up_alert[1]) ? 1 : up_alert[1]+1 : 0//dn_alert = isdown and (not filterEMA200 or (pacC<EMAmedm) ) ? na(dn_alert[1]) ? 1 : dn_alert[1]+1 : 0up_alert = 0dn_alert = 0up_alert := isup ? na(up_alert[1]) ? 1 : up_alert[1]+1 : 0dn_alert := isdown ? na(dn_alert[1]) ? 1 : dn_alert[1]+1 : 0//plotarrow(ShowPACexit and UseBigArrows? up_alert[1]==1? 1 : dn_alert[1]==1? -1 : na : na, colorup=aqua, colordown=fuchsia, transp=20,minheight=10,maxheight=60, title=”SCALPSWING Alert Arrows”)plotshape(ShowPACexit and not UseBigArrows? up_alert[1]==1? true : na : na, title=’SCALPSWING Buy Arrow’, location=location.belowbar, color=green, style=shape.arrowup, text=”BUY”, textcolor=green,transp=0)plotshape(ShowPACexit and not UseBigArrows? dn_alert[1]==1? true : na : na, title=’SCALPSWING Sell Arrow’, location=location.abovebar, color=red, style=shape.arrowdown, text=”SELL”,textcolor=red,transp=0)// generate an alert if required.alertcondition(up_alert==1, title=”SCAPSWING alert Up”, message=”SWING_UP”)alertcondition(dn_alert==1, title=”SCAPSWING alert Down”, message=”SWING_DN”)// === /ALERTS ===// === eof03/26/2025 at 2:04 PM #245316123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307//--------------------------------------////PRC_Scalping Swing Trading tool//version = 0//26.03.2025//Adapted from tradingview//Iván González @ www.prorealcode.com//Sharing ProRealTime knowledge//--------------------------------------//showFractals=1modoPristine = 0 // 1 = activar pristine, 0 = usar fractales estándarshowEMA12channel=1lenPAC = 10showPAC=1showcolor=1//--------------------------------------//// Fractals calculation//--------------------------------------////--- Fractal superior (máximo)IF modoPristine = 1 THENfractalMax = high[5] < high[3] AND high[4] < high[3] AND high[3] > high[2] AND high[3] > high[1]ELSEfractalMax = high[5] < high[4] AND high[4] < high[3] AND high[3] > high[2] AND high[2] > high[1]ENDIF//--- Fractal inferior (mínimo)IF modoPristine = 1 THENfractalMin = low[5] > low[3] AND low[4] > low[3] AND low[3] < low[2] AND low[3] < low[1]ELSEfractalMin = low[5] > low[4] AND low[4] > low[3] AND low[3] < low[2] AND low[2] < low[1]ENDIF//--- Mostrar fractales en el gráficoIF fractalMax THENdrawtext("✚",barindex[3], high[3] + AverageTrueRange[14](close)*0.5)coloured(180,50,50,showFractals*255)ENDIFIF fractalMin THENdrawtext("✚",barindex[3], low[3] - AverageTrueRange[14](close)*0.5) coloured(50,180,50,showFractals*255)ENDIF//--------------------------------------//// Price Action Channel//--------------------------------------////--- Líneas del Price Action ChannelpacC = Average[lenPAC,1](close) // Línea centralpacH = Average[lenPAC,1](high) // Límite superiorpacL = Average[lenPAC,1](low) // Límite inferior//--- Color de la vela actual según su cierre respecto al PACIF close > pacH THENr = 0g = 0b = 255 // Azul si cierra por encimaELSIF close < pacL THENr = 255g = 0b = 0 // Rojo si cierra por debajoELSEr = 128g = 128b = 128 // Gris si cierra dentro del canalENDIFif showcolor thendrawcandle(open,high,low,close)coloured(r,g,b)endifif showPAC thencolorbetween(pacH,pacL,"grey",92)endif//--------------------------------------//// EMAs calculation//--------------------------------------//ema05 = Average[5,1](close)ema11 = Average[11,1](close)ema12 = Average[12,1](close)ema15 = Average[15,1](close)ema18 = Average[18,1](close)ema21 = Average[21,1](close)ema24 = Average[24,1](close)ema27 = Average[27,1](close)ema30 = Average[30,1](close)ema33 = Average[33,1](close)ema36 = Average[36,1](close)ema75 = Average[75,1](close)ema89 = Average[89,1](close)ema180 = Average[180,1](close)ema200 = Average[200,1](close)ema540 = Average[540,1](close)ema633 = Average[633,1](close)//--------------------------------------//// EMA12 ribbon//--------------------------------------//if showEMA12channel thencolorbetween(ema05,ema11,"blue",92)endifif gettimeframe=60 thenemaFast = ema75emaMedium = ema180emaSlow = ema540elseemaFast = ema89emaMedium = ema200emaSlow = ema633endif//--------------------------------------//// EMAs base para el Ribbon (EMA12-36)//--------------------------------------////--- Color dinámico EMA12IF ema12 > ema36 AND ema12 > ema12[1] THENr12 = 30g12 = 144b12 = 255ELSIF ema12 > ema36 AND ema12 < ema12[1] THENr12 = 128g12 = 0b12 = 0ELSIF ema12 < ema36 AND ema12 < ema12[1] THENr12 = 255g12 = 0b12 = 0ELSIF ema12 < ema36 AND ema12 > ema12[1] THENr12 = 0g12 = 0b12 = 255ELSEr12 = 128g12 = 128b12 = 128ENDIF//--- Color dinámico EMA15IF ema12 > ema36 AND ema15 > ema15[1] THENr15 = 30g15 = 144b15 = 255ELSIF ema12 > ema36 AND ema15 < ema15[1] THENr15 = 128g15 = 0b15 = 0ELSIF ema12 < ema36 AND ema15 < ema15[1] THENr15 = 255g15 = 0b15 = 0ELSIF ema12 < ema36 AND ema15 > ema15[1] THENr15 = 0g15 = 0b15 = 255ELSEr15 = 128g15 = 128b15 = 128ENDIF//--- Color dinámico EMA18IF ema12 > ema36 AND ema18 > ema18[1] THENr18 = 30g18 = 144b18 = 255ELSIF ema12 > ema36 AND ema18 < ema18[1] THENr18 = 128g18 = 0b18 = 0ELSIF ema12 < ema36 AND ema18 < ema18[1] THENr18 = 255g18 = 0b18 = 0ELSIF ema12 < ema36 AND ema18 > ema18[1] THENr18 = 0g18 = 0b18 = 255ELSEr18 = 128g18 = 128b18 = 128ENDIF//--- Color dinámico EMA21IF ema12 > ema36 AND ema21 > ema21[1] THENr21 = 30g21 = 144b21 = 255ELSIF ema12 > ema36 AND ema21 < ema21[1] THENr21 = 128g21 = 0b21 = 0ELSIF ema12 < ema36 AND ema21 < ema21[1] THENr21 = 255g21 = 0b21 = 0ELSIF ema12 < ema36 AND ema21 > ema21[1] THENr21 = 0g21 = 0b21 = 255ELSEr21 = 128g21 = 128b21 = 128ENDIF//--- Color dinámico EMA24IF ema12 > ema36 AND ema24 > ema24[1] THENr24 = 30g24 = 144b24 = 255ELSIF ema12 > ema36 AND ema24 < ema24[1] THENr24 = 128g24 = 0b24 = 0ELSIF ema12 < ema36 AND ema24 < ema24[1] THENr24 = 255g24 = 0b24 = 0ELSIF ema12 < ema36 AND ema24 > ema24[1] THENr24 = 0g24 = 0b24 = 255ELSEr24 = 128g24 = 128b24 = 128ENDIF//--- Color dinámico EMA27IF ema12 > ema36 AND ema27 > ema27[1] THENr27 = 30g27 = 144b27 = 255ELSIF ema12 > ema36 AND ema27 < ema27[1] THENr27 = 128g27 = 0b27 = 0ELSIF ema12 < ema36 AND ema27 < ema27[1] THENr27 = 255g27 = 0b27 = 0ELSIF ema12 < ema36 AND ema27 > ema27[1] THENr27 = 0g27 = 0b27 = 255ELSEr27 = 128g27 = 128b27 = 128ENDIF//--- Color dinámico EMA30IF ema12 > ema36 AND ema30 > ema30[1] THENr30 = 30g30 = 144b30 = 255ELSIF ema12 > ema36 AND ema30 < ema30[1] THENr30 = 128g30 = 0b30 = 0ELSIF ema12 < ema36 AND ema30 < ema30[1] THENr30 = 255g30 = 0b30 = 0ELSIF ema12 < ema36 AND ema30 > ema30[1] THENr30 = 0g30 = 0b30 = 255ELSEr30 = 128g30 = 128b30 = 128ENDIF//--- Color dinámico EMA33IF ema12 > ema36 AND ema33 > ema33[1] THENr33 = 30g33 = 144b33 = 255ELSIF ema12 > ema36 AND ema33 < ema33[1] THENr33 = 128g33 = 0b33 = 0ELSIF ema12 < ema36 AND ema33 < ema33[1] THENr33 = 255g33 = 0b33 = 0ELSIF ema12 < ema36 AND ema33 > ema33[1] THENr33 = 0g33 = 0b33 = 255ELSEr33 = 128g33 = 128b33 = 128ENDIF//--- Color dinámico EMA36IF ema12 > ema36 AND ema36 > ema36[1] THENr36 = 30g36 = 144b36 = 255ELSIF ema12 > ema36 AND ema36 < ema36[1] THENr36 = 128g36 = 0b36 = 0ELSIF ema12 < ema36 AND ema36 < ema36[1] THENr36 = 255g36 = 0b36 = 0ELSIF ema12 < ema36 AND ema36 > ema36[1] THENr36 = 0g36 = 0b36 = 255ELSEr36 = 128g36 = 128b36 = 128ENDIF//-------------------------------------------------//RETURN ema12 COLOURED(r12, g12, b12) STYLE(line,2) AS "EMA12",ema36 COLOURED(r36, g36, b36) STYLE(line,2) AS "EMA36",ema15 COLOURED(r15, g15, b15) STYLE(line,1) AS "EMA15",ema18 COLOURED(r18, g18, b18) STYLE(line,1) AS "EMA18",ema21 COLOURED(r21, g21, b21) STYLE(line,1) AS "EMA21",ema24 COLOURED(r24, g24, b24) STYLE(line,1) AS "EMA24",ema27 COLOURED(r27, g27, b27) STYLE(line,1) AS "EMA27",ema30 COLOURED(r30, g30, b30) STYLE(line,1) AS "EMA30",ema33 COLOURED(r33, g33, b33) STYLE(line,1) AS "EMA33", pacL COLOURED(128,128,128,showPAC*255) STYLE(line,1) AS "PAC Low",pacH COLOURED(128,128,128,showPAC*255) STYLE(line,1) AS "PAC High",pacC COLOURED(0,255,0,showPAC*255) STYLE(line,2) AS "PAC Close", emaFast as "EMA fast" coloured("green")style(line,3),emaMedium as "EMA Medium" coloured("blue")style(line,3),emaSlow as "EMA slow" coloured("black")style(line,3)03/27/2025 at 12:36 AM #24533004/11/2025 at 9:26 AM #245793 -
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
Find exclusive trading pro-tools on
Similar topics: