CA daily close strat

Forums ProRealTime forum Français Support ProBuilder CA daily close strat

Viewing 2 posts - 1 through 2 (of 2 total)
  • #234052

    Bonjour a tous,

    J’aurais besoin d’une conversion de code d’un indicateur de Tradingview.

    Merci beaucoup d’avance

    Voici le code:

    // https://www.tradingview.com/u/ChartArt/
    //
    // __ __ ___ __ ___
    // / ` |__| /\ |__) | /\ |__) |
    // \__, | | /~~\ | \ | /~~\ | \ |
    //
    //

    threshold = input(title=”Price Difference Threshold”, type=float, defval=0, step=0.001)

    getDiff() =>
    yesterday=security(tickerid, ‘D’, close[1])
    today=security(tickerid, ‘D’, close)
    delta=today-yesterday
    percentage=delta/yesterday

    closeDiff = getDiff()

    buying = closeDiff > threshold ? true : closeDiff < -threshold ? false : buying[1]

    hline(0, title=”zero line”)

    bgcolor(buying ? green : red, transp=25)
    plot(closeDiff, color=silver, style=area, transp=75)
    plot(closeDiff, color=aqua, title=”prediction”)

    longCondition = buying
    if (longCondition)
    strategy.entry(“Long”, strategy.long)

    shortCondition = buying != true
    if (shortCondition)
    strategy.entry(“Short”, strategy.short)

     

     

     

    #234088

    Holà. Ici vous avez le code :

Viewing 2 posts - 1 through 2 (of 2 total)

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