traduzione codice TW order block

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #222321 quote
    Msport71
    Participant
    Junior
    Buongiorno,
    volevo chiedere cortese traduzione del seguente codice da TW, che non troppo esteso sembra interessante.
    Grazie e mille.
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © dadoesploso
    //@version=4
    study(title=”Volatility Expansion Levels”, shorttitle = “VEL”,overlay=true)
    atrc = input(defval=0.9, title=”ATR Multiplier (of Trapped Trend Bar minimum absolute close-to-open distance). Default is 0.9. Higher values make the indicator picky.”)
    atrct = input(defval=2.0, title=”Trapping Trend Bar Close-Open Minimum value (relative to Trapped Trend Bar absolute close-to-open distance). Default is 2. Higher values make the indicator picky.”)
    lenght = input(title=”Rectangle Lenght”, type=input.integer, defval=350)
    //Bullish VEL
    if (open[1] – close[1]) > atrc*atr(10) and close – open > atrct*(open[1] – close[1])
    box.new(left=bar_index[1],top=open[1],right=bar_index+lenght,bottom=lowest(low,1),
    border_color=color.blue,border_width=3,bgcolor=na)
    alert(“Bullish OB”,alert.freq_once_per_bar_close)
    //Bearish VEL
    if (close[1] – open[1]) > atrc*atr(10) and open – close > atrct*(close[1] – open[1])
    box.new(left=bar_index[1],top=highest(high,1),right=bar_index+lenght,bottom=open[1],
    border_color=color.red,border_width=3,bgcolor=na)
    alert(“Bearish OB”,alert.freq_once_per_bar_close)
    Screenshot-2023-10-12-at-09-59-47-Auto-Order-Block-by-D.-Brigaglia-—-Indicatore-di-dadoesploso.jpg Screenshot-2023-10-12-at-09-59-47-Auto-Order-Block-by-D.-Brigaglia-—-Indicatore-di-dadoesploso.jpg
    #222380 quote
    robertogozzi
    Moderator
    Master

    Eccolo:

    // Auto Order Block by D. Brigaglia
    //
    // https://it.tradingview.com/script/i3BKmxdj/
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © dadoesploso
    // @version=4
    //
    // This indicator finds trend following engulfings, and draws order blocks based on the 1st candle's
    // range (the first candle of the engulfing pattern).
    // It does filter the trend with simple moving averages of 21 and 55 periods, but it doesn't filter
    // for retracements in the trend (you should consider only the order blocks that are coming from
    // engulfings after a retracement)
    //
    ONCE atrc   = 0.9
    ONCE atrct  = 2.0
    ONCE length = 350
    Atr10       = AverageTrueRange[10](close)
    //
    IF ((open[1] - close[1]) > (atrc * atr10)) AND ((close - open) > (atrct * (open[1] - close[1]))) THEN
       DrawRectangle(BarIndex[1],open[1],BarIndex + length,lowest[1](low)) coloured("Blue",255)
    ENDIF
    //
    IF ((close[1] - open[1]) > (atrc * atr10)) AND ((open - close) > (atrct * (close[1] - open[1]))) THEN
       DrawRectangle(BarIndex[1],highest[1](high),BarIndex + length,open[1]) coloured("Red",255)
    ENDIF
    //
    RETURN
    Auto-Order-Block.itf
    #222385 quote
    Msport71
    Participant
    Junior

    Grazie e mille !

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

traduzione codice TW order block


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 Msport71
2 years, 5 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 10/12/2023
Status: Active
Attachments: 2 files
Logo Logo
Loading...