Conversion Scalping Line Tradingview

Forums ProRealTime English forum ProBuilder support Conversion Scalping Line Tradingview

Viewing 4 posts - 1 through 4 (of 4 total)
  • #211116

    Hello,

    I am using the Scalping Line indicator on Tradingview and would like to convert this indicator to Prorealtime.

    As I have limited skills for programming in PRT I am hoping someone can help me.

    The code in Tradingview is as follows:

    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © KivancOzbilgic

    //@version=4
    study(“Scalping Line”, overlay=false)
    src = input(close, title=”Source”)
    percent = input(1.0,”Percent”, type=input.float, step=0.1, minval=0)
    mainperiod = input(100,”Main Period”)
    signalperiod = input(7,”Signal Period”)
    MA = sma(sma(src, ceil(mainperiod / 2)), floor(mainperiod / 2) + 1)
    ssMA = MA>close+MA*percent/100 ? MA : MA<close-MA*percent/100 ? MA : close
    signalline = sma(close,signalperiod)
    ScalpLine = signalline-ssMA

    k1=plot(ScalpLine,”SLI”,color.maroon,2)
    k2=plot(0,””)

    color1= ScalpLine>=0 ? color.green : color.red
    fill(k1,k2,color=color1,transp=80)
    alertcondition(crossover(ScalpLine,0), title=”BUY ALARM!”, message=”SLI BUY Signal!”)
    alertcondition(crossunder(ScalpLine,0), title=”SELL ALARM!”, message=”SLI SELL Signal!”)

     

    #211479

    😆 Sorry this is ironic, because you ask me to convert the conversion of my own indicator I published here back in 2015: https://www.prorealcode.com/prorealtime-indicators/scalping-line-indicator/

    #211555

    Thank you Nicolas, I have seen the code in that link and copied it into PRT.

    However I have completely different indicator as in Tradingview.

    I don’t understand why it is so different. Hope you can help me.

     

    #211570

    Just use the same settings?

    Default ones are:

    percent = 1
    mainperiod = 100
    signalperiod = 7
    Are you comparing the same exact instrument?
Viewing 4 posts - 1 through 4 (of 4 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login