traduzione codice TW Hoffman’s scalp indicator

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #229748 quote
    Msport71Msport71
    Participant
    Senior

    Buongiorno a tutti,

    vorrei testare questo interessante codice trovato su TW, che mi sembra interessante (se non ho capito male combina i cross delle medie mobili ma tiene conto anche dell’ampiezza di eventuali ritracciamenti).

    Un grande grazie per il consueto aiuto.

     

    https://it.tradingview.com/script/QXyZfgBb-T-I-P-Hoffman-s-scalp-indicator/

    //@version=5
    indicator(“Hoffman’s scalp indicator [T.I.P.]”, overlay=true)

    PlotMA = input(defval=false, title=”Show MA lines”)

    AutoProfit = input(defval=true, title=”Stop loss according to Moving Average (with risk reward ratio)” , group=”Profit settings”)
    useATR = input(false, “Use ATR for stop loss (with risk reward ratio)”, group = “Profit settings”)
    riskreward = input(1.5, title = “Risk reward ratio”, group=”Profit settings”)
    OpenPositionTreshold = input(defval=1, title=”Open position threshold %” , group=”Profit settings”)
    myTakeProfit = input(defval=1.50, title=”TakeProfit % (if not in use ATR or MA for SL)” , group=”Profit settings”)
    myStopLos = input(defval=1.00, title=”StopLoss % (if not in use ATR or MA for SL)”, group=”Profit settings”)
    Show_TPSLLines = input(defval=true, title=”Show take profit & stop loss lines”, group=”Profit settings”)

    sma5 = ta.sma(close,5)
    ema18 = ta.ema(close,18)
    ema20 = ta.ema(close,20)
    ema35 = ta.ema(close,35)
    sma50 = ta.sma(close,50)
    sma89 = ta.sma(close,89)
    ema144 = ta.ema(close,144)

    //—————Hoffmans bar retracements————————————–
    z = input.int(45, title=”Inventory Retracement Percentage %”, maxval=100, group=”Retracements settings”)

    // Candle Range
    a = math.abs(high – low)
    // Candle Body
    b = math.abs(close – open)
    // Percent to Decimal
    c = z/100

    // Range Verification
    rv = b < c*a

    // Price Level for Retracement
    x = low + (c * a)
    y = high – (c * a)

    sl = rv == 1 and high > y and close < y and open < y
    ss = rv == 1 and low < x and close > x and open > x

    // Line Definition
    li = sl ? y : ss ? x : (x+y)/2
    //——————————————————————————

    //———–Volume Oscillator————————————————–
    useVOL = input(false, “Use volume oscillator for signals”, group = “Volume Oscillator”)
    var cumVol = 0.
    cumVol += nz(volume)
    if barstate.islast and cumVol == 0
    runtime.error(“No volume is provided by the data vendor.”)
    shortlen = input.int(5, minval=1, title = “Short Length”, group = “Volume Oscillator”)
    longlen = input.int(10, minval=1, title = “Long Length”, group = “Volume Oscillator”)
    short = ta.ema(volume, shortlen)
    long = ta.ema(volume, longlen)
    osc = 100 * (short – long) / long
    //hline(0, color = #787B86, title=”Zero”)
    //plot(osc, color=#2962FF)
    //——————————————————————————

    //———————ATR——————————————————
    showATR = input(false, “Show ATR on chart”, group = “ATR”)
    atrlength = input.int(title=”Length”, defval=14, minval=1, group=”ATR”)
    atrsmoothing = input.string(title=”Smoothing”, defval=”RMA”, options=[“RMA”, “SMA”, “EMA”, “WMA”], group=”ATR”)
    atrm = input(0.85, “Multiplier”, group=”ATR”)
    atrsrc1 = input(high, group=”ATR”)
    atrsrc2 = input(low, group=”ATR”)
    atrpline = input(false, “Show ATR Price Lines”, group = “ATR”)

    atrcollong = input(color.teal, “Low Line Color”,inline =”1″, group=”ATR”)
    atrcolshort = input(color.red, “High Line Color”,inline =”2″, group=”ATR”)

    atrma_function(source, atrlength) =>
    if atrsmoothing == “RMA”
    ta.rma(source, atrlength)
    else
    if atrsmoothing == “SMA”
    ta.sma(source, atrlength)
    else
    if atrsmoothing == “EMA”
    ta.ema(source, atrlength)
    else
    ta.wma(source, atrlength)

    atra = atrma_function(ta.tr(true), atrlength) * atrm
    atrx = atrma_function(ta.tr(true), atrlength) * atrm + atrsrc1
    atrx2 = atrsrc2 – atrma_function(ta.tr(true), atrlength) * atrm

    atrp1 = plot(showATR ? atrx : na, title = “ATR Short Stop Loss”, color = color.new(atrcolshort, 20), trackprice = atrpline ? true : false)
    atrp2 = plot(showATR ? atrx2 : na, title = “ATR Long Stop Loss”, color = color.new(atrcollong, 20), trackprice = atrpline ? true : false)
    //——————————————————————————

    //————-Plot Statement—————————————————
    LongHoff = sl and sma5>ema18 and ema18>ema20 and ema20>ema144 and low>sma5
    ShortHoff = ss and sma5<ema18 and ema18<ema20 and ema20<ema144 and high<sma5
    plotshape(LongHoff, style=shape.triangledown, location=location.abovebar, color=color.red, title = “Long Bar”, transp = 0)
    plotshape(ShortHoff, style=shape.triangleup, location=location.belowbar, color=color.green, title = “Short Bar”, transp = 0)

    long_condition = false
    short_condition = false
    if useVOL
    long_condition := LongHoff and close > sma50 and osc > 0
    short_condition := ShortHoff and close < sma50 and osc > 0
    else
    long_condition := LongHoff and close > sma50
    short_condition := ShortHoff and close < sma50

    //label Short = na
    //label Long = na
    plotshape(short_condition, style=shape.circle, location=location.abovebar, color=color.red, title = “short signal”, transp = 0)
    plotshape(long_condition, style=shape.circle, location=location.belowbar, color=color.green, title = “long signal”, transp = 0)

    if barstate.isconfirmed
    if short_condition
    Short = label.new(bar_index,high + (((high-low)/100)*5),text=”Short”,size=size.normal,color=color.red,style=label.style_label_down,textcolor=color.white)
    label.delete(Short[1])

    if barstate.isconfirmed
    if long_condition
    Long = label.new(bar_index,low – (((high-low)/100)*5),text=”Long”,size=size.normal,color=color.green,style=label.style_label_up,textcolor=color.white)
    label.delete(Long[1])

    plot(PlotMA ? sma50 : na, title=”SMA50″, color = color.white,linewidth=2)
    plot(PlotMA ? sma5 : na, title=”SMA5″, color = color.purple,linewidth=2)
    plot(PlotMA ? ema18 : na, title=”EMA18″, color = color.green,linewidth=2)
    plot(PlotMA ? ema20 : na, title=”EMA20″, color = color.silver,linewidth=1)
    plot(PlotMA ? sma89 : na, title=”SMA89″, color = color.silver,linewidth=1)
    plot(PlotMA ? ema144 : na, title=”EMA144″, color = color.silver,linewidth=1)
    plot(PlotMA ? ema35 : na, title=”EMA35″, color = color.silver,linewidth=1)
    //——————————————————————————

    //———–Plot SL & TP lines————————————————-
    StopLosY = sma5
    TakeProfitY = high + (OpenPositionTreshold * ((high-low)/100)) + (riskreward * ((high+ (OpenPositionTreshold * ((high-low)/100)))-sma5))

    if useATR
    StopLosY := atrx2
    TakeProfitY := high + (OpenPositionTreshold * ((high-low)/100)) + (riskreward * ((high+ (OpenPositionTreshold * ((high-low)/100)))-atrx2))
    else
    StopLosY := AutoProfit ? sma5 : (high + (OpenPositionTreshold * ((high-low)/100))) – ((myStopLos/(((high + (OpenPositionTreshold * ((high-low)/100)))-low)/(low/100)))*((high + (OpenPositionTreshold * ((high-low)/100)))-low))
    TakeProfitY := AutoProfit ? high + (OpenPositionTreshold * ((high-low)/100)) + (riskreward * ((high+ (OpenPositionTreshold * ((high-low)/100)))-sma5)) : high + (OpenPositionTreshold * ((high-low)/100)) +((myTakeProfit/((high-low)/(low/100)))*(high-low))

    if barstate.isconfirmed
    if long_condition and Show_TPSLLines
    OpenLineLong = line.new(bar_index + 1, high + (OpenPositionTreshold * ((high-low)/100)),bar_index + 30,high + (OpenPositionTreshold * ((high-low)/100)),color=color.gray,style=line.style_dotted,width=3)
    OpenLabelLong = label.new(bar_index + 1,high + (OpenPositionTreshold * ((high-low)/100)),text=”open position here”,size=size.small,color=color.gray,style=label.style_label_right,textcolor=color.white)
    OpenLabelLongPrice = label.new(bar_index + 30,high + (OpenPositionTreshold * ((high-low)/100)),text = str.tostring(high + (OpenPositionTreshold * ((high-low)/100))),size=size.small,color=color.gray,style=label.style_label_left,textcolor=color.white)
    StopLosLine = line.new(bar_index + 1, StopLosY,bar_index + 50,StopLosY,color=color.maroon,style=line.style_dotted,width=3)
    StopLosLabel = label.new(bar_index + 1,StopLosY,text=”stop loss”,size=size.small,color=color.maroon,style=label.style_label_upper_right,textcolor=color.white)
    StopLosLabelPrice = label.new(bar_index + 50,StopLosY,text=str.tostring(StopLosY),size=size.small,color=color.maroon,style=label.style_label_upper_left,textcolor=color.white)
    TakeProfitLine = line.new(bar_index + 1,TakeProfitY,bar_index + 50,TakeProfitY,color=color.teal,style=line.style_dotted,width=3)
    TakeProfitLabel = label.new(bar_index + 1,TakeProfitY,text=”take profit”,size=size.small,color=color.teal,style=label.style_label_lower_right,textcolor=color.white)
    TakeProfitLabelPrice = label.new(bar_index + 50,TakeProfitY,text=str.tostring(TakeProfitY),size=size.small,color=color.teal,style=label.style_label_lower_left,textcolor=color.white)
    line.delete(OpenLineLong[1])
    line.delete(StopLosLine[1])
    line.delete(TakeProfitLine[1])
    label.delete(StopLosLabel[1])
    label.delete(TakeProfitLabel[1])
    label.delete(OpenLabelLong[1])
    label.delete(OpenLabelLongPrice[1])
    label.delete(StopLosLabelPrice[1])
    label.delete(TakeProfitLabelPrice[1])
    l_alert = “LONG alarm, Entry price:” + str.tostring(high + (OpenPositionTreshold * ((high-low)/100))) + “, SL:” + str.tostring(StopLosY) + “, TP:” + str.tostring(TakeProfitY)
    alert(l_alert,alert.freq_once_per_bar_close)

    sStopLosY = sma5
    sTakeProfitY = (low – (OpenPositionTreshold * ((high-low)/100))) – (riskreward * (sma5 – (low – (OpenPositionTreshold * ((high-low)/100)))))

    if useATR
    sStopLosY := atrx
    sTakeProfitY := (low – (OpenPositionTreshold * ((high-low)/100))) – (riskreward * (atrx – (low – (OpenPositionTreshold * ((high-low)/100)))))
    else
    sStopLosY := AutoProfit ? sma5 : (low – (OpenPositionTreshold * ((high-low)/100))) + ((myStopLos/((high-(low – (OpenPositionTreshold * ((high-low)/100))))/((low – (OpenPositionTreshold * ((high-low)/100)))/100)))*(high-(low – (OpenPositionTreshold * ((high-low)/100)))))
    sTakeProfitY := AutoProfit ? (low – (OpenPositionTreshold * ((high-low)/100))) – (riskreward * (sma5 – (low – (OpenPositionTreshold * ((high-low)/100))))) : (low – (OpenPositionTreshold * ((high-low)/100))) – ((myTakeProfit/((high-(low – (OpenPositionTreshold * ((high-low)/100))))/((low – (OpenPositionTreshold * ((high-low)/100)))/100)))*(high-(low – (OpenPositionTreshold * ((high-low)/100)))))

    if barstate.isconfirmed
    if short_condition and Show_TPSLLines
    OpenLineShort = line.new(bar_index + 1, (low – (OpenPositionTreshold * ((high-low)/100))), bar_index + 30, (low – (OpenPositionTreshold * ((high-low)/100))), color=color.gray,style=line.style_dotted,width=3)
    OpenLabelShort = label.new(bar_index + 1,(low – (OpenPositionTreshold * ((high-low)/100))),text=”open position here”,size=size.small,color=color.gray,style=label.style_label_right,textcolor=color.white)
    OpenLabelShortPrice = label.new(bar_index + 30,(low – (OpenPositionTreshold * ((high-low)/100))),text= str.tostring(low – (OpenPositionTreshold * ((high-low)/100))),size=size.small,color=color.gray,style=label.style_label_left,textcolor=color.white)
    sTakeProfitLine = line.new(bar_index + 1, sTakeProfitY,bar_index + 50,sTakeProfitY,color=color.teal,style=line.style_dotted,width=3)
    sTakeProfitLabel = label.new(bar_index + 1,sTakeProfitY,text=”take profit”,size=size.small,color=color.teal,style=label.style_label_upper_right,textcolor=color.white)
    sTakeProfitLabelPrice = label.new(bar_index + 50,sTakeProfitY,text= str.tostring(sTakeProfitY),size=size.small,color=color.teal,style=label.style_label_upper_left,textcolor=color.white)
    sStopLosLine = line.new(bar_index + 1,sStopLosY,bar_index + 50,sStopLosY,color=color.maroon,style=line.style_dotted,width=3)
    sStopLosLabel = label.new(bar_index + 1,sStopLosY,text=”stop loss”,size=size.small,color=color.maroon,style=label.style_label_lower_right,textcolor=color.white)
    sStopLosLabelPrice = label.new(bar_index + 50,sStopLosY,text= str.tostring(sStopLosY),size=size.small,color=color.maroon,style=label.style_label_lower_left,textcolor=color.white)
    line.delete(OpenLineShort[1])
    line.delete(sStopLosLine[1])
    line.delete(sTakeProfitLine[1])
    label.delete(sStopLosLabel[1])
    label.delete(sTakeProfitLabel[1])
    label.delete(OpenLabelShort[1])
    label.delete(OpenLabelShortPrice[1])
    label.delete(sTakeProfitLabelPrice[1])
    label.delete(sStopLosLabelPrice[1])
    s_alert = “SHORT alarm, Entry price:” + str.tostring(low – (OpenPositionTreshold * ((high-low)/100))) + “, SL:” + str.tostring(sStopLosY) + “, TP:” + str.tostring(sTakeProfitY)
    alert(s_alert,alert.freq_once_per_bar_close)
    //——————————————————————————

    //———Send alert to TV alarm sub-system————————————
    alertcondition(long_condition, title=”LONG alarm”, message=”Long signal!!! OP:{{open position here}}, SL:{{sl_level}}, TP:{{tp_level}}”)
    alertcondition(short_condition, title=”SHORT alarm”, message=”Short signal!!! OP:{{open position here}}, SL:{{ssl_level}}, TP:{{stp_level}}”)
    //——————————————————————————

    #229759 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Aquí tienes:

    //PRC_Hoffman's scalp TIP
    //version = 0
    //14.03.24
    //Iván González @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //inputs
    plotma = 1 //Show MA lines
    autoprofit = 1 //Stop loss according to Moving Average (with risk reward ratio)
    useATR = 0 // Use ATR for stop loss (with risk reward ratio)
    riskreward = 1.5 //Risk reward ratio
    OpenPositionTreshold = 1 //Open position threshold %
    myTakeProfit = 1.5 //TakeProfit % (if not in use ATR or MA for SL)
    myStopLos = 1 // StopLoss % (if not in use ATR or MA for SL)
    ShowTPSLLines = 1//Show take profit & stop loss lines
    ///////////////////////////////////////////////
    sma5 = average[5](close)
    ema18 = average[18,1](close)
    ema20 = average[20,1](close)
    ema35 = average[35,1](close)
    sma50 = average[50](close)
    sma89 = average[89](close)
    ema144 = average[144,1](close)
    ///////////////////////////////////////////////
    //---------------Hoffmans bar retracements-----------------------
    z = 45 // Inventory Retracement Percentage %
    // Candle Range
    a = abs(high - low)
    // Candle Body
    b = abs(close - open)
    // Percent to Decimal
    c = z/100
    // Range Verification
    rv = b < c*a
    // Price Level for Retracement
    x = low + (c * a)
    y = high - (c * a)
    
    sl = rv=1 and high > y and close < y and open < y
    ss = rv=1 and low < x and close > x and open > x
    
    // Line Definition
    if sl then
    li=y
    elsif ss then
    li=x
    else
    li=(x+y)/2
    endif
    //--------------------------------------------------------------
    //-----------Volume Oscillator----------------------------------
    usevol = 0 //Use volume oscillator for signals
    once cumvol = 0
    cumvol = volume+cumvol
    shortlen = 5 //Short Length
    longlen = 10 //Long Length
    short = average[shortlen,1](volume)
    long = average[longlen,1](volume)
    osc = 100*(short-long)/long
    //--------------------------------------------------------------
    //---------------------ATR--------------------------------------
    showATR = 0 //Show ATR on chart
    atrlength = 14//Length
    atrsmoothing = 1 //RMA=1 - SMA=2 - EMA=3 - WMA=4
    atrm = 0.85 // Multiplier
    atrsrc1 = high
    atrsrc2 = low
    atrpline = 0 //Show ATR Price Lines
    atrsrc = tr
    
    if atrsmoothing = 1 then
    alpha = 1/atrlength
    if barindex = atrlength then
    atrafun = average[atrlength](atrsrc)
    else
    atrafun = alpha*atrsrc + (1-alpha)*atrafun[1]
    endif
    elsif atrsmoothing = 2 then
    atrafun = average[atrlength](atrsrc)
    elsif atrsmoothing = 3 then
    atrafun = exponentialaverage[atrlength](atrsrc)
    elsif atrsmoothing = 4 then
    atrafun = weightedaverage[atrlength](atrsrc)
    endif
    
    atra = atrafun*atrm
    atrx = atrsrc1+atrafun*atrm
    atrx2 = atrsrc2-atrafun*atrm
    
    //--------------------------------------------------------------
    //-------------Plot Statement-----------------------------------
    LongHoff = sl and sma5>ema18 and ema18>ema20 and ema20>ema144 and low>sma5
    ShortHoff = ss and sma5<ema18 and ema18<ema20 and ema20<ema144 and high<sma5
    
    if LongHoff then
    drawtext("▼",barindex,high+tr*0.25)coloured("red")//Long bar
    elsif ShortHoff then
    drawtext("▲",barindex,low-tr*0.25)coloured("green")//short bar
    endif
    
    if useVOL then
    longcondition = LongHoff and close > sma50 and osc > 0
    shortcondition = ShortHoff and close < sma50 and osc > 0
    else
    longcondition = LongHoff and close > sma50
    shortcondition = ShortHoff and close < sma50
    endif
    
    //-----------Plot SL & TP lines long condition-----------------------
    StopLosY = sma5
    TakeProfitY = high + (OpenPositionTreshold * ((high-low)/100)) + (riskreward * ((high+ (OpenPositionTreshold * ((high-low)/100)))-sma5))
    
    if useatr then
    StopLosY = atrx2
    TakeProfitY = high + (OpenPositionTreshold * ((high-low)/100)) + (riskreward * ((high+ (OpenPositionTreshold * ((high-low)/100)))-atrx2))
    else
    if Autoprofit then
    StopLosY = sma5
    TakeProfitY = high + (OpenPositionTreshold * ((high-low)/100)) + (riskreward * ((high+ (OpenPositionTreshold * ((high-low)/100)))-sma5))
    else
    StopLosY = (high + (OpenPositionTreshold * ((high-low)/100))) - ((myStopLos/(((high + (OpenPositionTreshold * ((high-low)/100)))-low)/(low/100)))*((high + (OpenPositionTreshold * ((high-low)/100)))-low))
    TakeProfitY = high + (OpenPositionTreshold * ((high-low)/100)) +((myTakeProfit/((high-low)/(low/100)))*(high-low))
    endif
    endif
    
    if longcondition then
    drawtext("○",barindex,low-tr*0.25)coloured("green")//long signal
    $longx[lastset($longx)+1] = barindex
    $stopLosY[lastset($stopLosY)+1] = StopLosY
    $TakeProfitY[lastset($TakeProfitY)+1] = TakeProfitY
    $enterlong[lastset($enterlong)+1] = high + (OpenPositionTreshold * ((high-low)/100))
    endif
    //-----------Plot SL & TP lines Short condition-----------------------
    sStopLosY = sma5
    sTakeProfitY = (low - (OpenPositionTreshold * ((high-low)/100))) - (riskreward * (sma5 - (low - (OpenPositionTreshold * ((high-low)/100)))))
    
    if useATR then
    sStopLosY = atrx
    sTakeProfitY = (low - (OpenPositionTreshold * ((high-low)/100))) - (riskreward * (atrx - (low - (OpenPositionTreshold * ((high-low)/100)))))
    else
    if autoprofit then
    sStopLosY = sma5
    sTakeProfitY = (low - (OpenPositionTreshold * ((high-low)/100))) - (riskreward * (sma5 - (low - (OpenPositionTreshold * ((high-low)/100)))))
    else
    sStopLosY =( low - (OpenPositionTreshold * ((high-low)/100))) + ((myStopLos/((high-(low - (OpenPositionTreshold * ((high-low)/100))))/((low - (OpenPositionTreshold * ((high-low)/100)))/100)))*(high-(low - (OpenPositionTreshold * ((high-low)/100)))))
    sTakeProfitY =(low - (OpenPositionTreshold * ((high-low)/100))) - ((myTakeProfit/((high-(low - (OpenPositionTreshold * ((high-low)/100))))/((low - (OpenPositionTreshold * ((high-low)/100)))/100)))*(high-(low - (OpenPositionTreshold * ((high-low)/100)))))
    endif
    endif
    if shortcondition then
    drawtext("○",barindex,high+tr*0.25)coloured("red")//short signal
    $shortx[lastset($shortx)+1] = barindex
    $sstopLosY[lastset($sstopLosY)+1] = sStopLosY
    $sTakeProfitY[lastset($sTakeProfitY)+1] = sTakeProfitY
    $entershort[lastset($entershort)+1] = (low - (OpenPositionTreshold * ((high-low)/100)))
    endif
    //-----------Plot Last Trade    -----------------------
    if islastbarupdate and ShowTPSLLines then
    ///Last Long trade
    drawsegment($longx[max(0,lastset($longx))]+1,$enterlong[max(0,lastset($enterlong))],$longx[max(0,lastset($longx))]+30,$enterlong[max(0,lastset($enterlong))])coloured("gray")style(dottedline,2)
    drawsegment($longx[max(0,lastset($longx))]+1,$TakeProfitY[max(0,lastset($TakeProfitY))],$longx[max(0,lastset($longx))]+50,$TakeProfitY[max(0,lastset($TakeProfitY))])coloured("teal")style(dottedline,2)
    drawsegment($longx[max(0,lastset($longx))]+1,$stopLosY[max(0,lastset($stopLosY))],$longx[max(0,lastset($longx))]+50,$stopLosY[max(0,lastset($stopLosY))])coloured("maroon")style(dottedline,2)
    drawtext("Open Long",$longx[max(0,lastset($longx))]+40,$enterlong[max(0,lastset($enterlong))]+0.35*tr)coloured("Blue")
    drawtext("TP",$longx[max(0,lastset($longx))]+40,$TakeProfitY[max(0,lastset($TakeProfitY))]+0.35*tr)coloured("Green")
    drawtext("SL",$longx[max(0,lastset($longx))]+40,$stopLosY[max(0,lastset($stopLosY))]+0.35*tr)coloured("Red")
    ///Last Short Trade
    drawsegment($shortx[max(0,lastset($shortx))]+1,$entershort[max(0,lastset($entershort))] ,$shortx[max(0,lastset($shortx))]+30,$entershort[max(0,lastset($entershort))])coloured("gray")style(dottedline,2)
    drawsegment($shortx[max(0,lastset($shortx))]+1,$sstopLosY[max(0,lastset($sstopLosY))],$shortx[max(0,lastset($shortx))]+50,$sstopLosY[max(0,lastset($sstopLosY))])coloured("maroon")style(dottedline,2)
    drawsegment($shortx[max(0,lastset($shortx))]+1,$sTakeProfitY[max(0,lastset($sTakeProfitY))],$shortx[max(0,lastset($shortx))]+50,$sTakeProfitY[max(0,lastset($sTakeProfitY))])coloured("teal")style(dottedline,2)
    drawtext("Open Short",$shortx[max(0,lastset($shortx))]+40,$entershort[max(0,lastset($entershort))]+tr*0.35)coloured("Blue")
    drawtext("TP",$shortx[max(0,lastset($shortx))]+40,$sTakeProfitY[max(0,lastset($sTakeProfitY))]+tr*0.35)coloured("green")
    drawtext("SL",$shortx[max(0,lastset($shortx))]+40,$sstopLosY[max(0,lastset($sstopLosY))]+tr*0.35)coloured("red")
    endif
    
    
    //--------------------------------------------------------------
    
    
    
    return plotma*sma50 As "SMA50"coloured("white")style(line,2),plotma*sma5 as "SMA5"coloured("purple")style(line,2),plotma*ema18 as "EMA18"coloured("green")style(line,2),plotma*ema20 as "EMA20"coloured("silver")style(line,1),plotma*sma89 as "SMA89"coloured("silver")style(line,1),plotma*ema144 as "EMA144"coloured("silver")style(line,1),plotma*ema35 as "EMA35"coloured("silver")style(line,1)
    
    #229771 quote
    Msport71Msport71
    Participant
    Senior

    Grazie e mille, velocissimo!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

traduzione codice TW Hoffman’s scalp indicator


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
Msport71 @carlo-pasca Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Msport71Msport71
2 years, 6 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 03/14/2024
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...