Overlays Renko Bars on Regular Price Bars.
Default Renko plot is based on . Look Back period adjustable in Inputs Tab.
If you Choose to use "Traditional" Renko bars and pick the Size of the Renko Bars the please read below.
Value in Input Tab is multiplied by .001 (To work on Forex)
1 = 10 pips on EURUSD - 1 X .001 = .001 or 10 Pips
10 = .01 or 100 Pips
1000 = 1 point to the left of decimal. 1 Point in Stocks etc.
10000 = 10 Points on Stocks etc.
***V2 will fix this issue.
//Created By ChrisMoody on 11-03-2014 study(title="CM_Renko Overlay Bars V1", shorttitle="CM_Renko Overlay_V1",overlay=true) //rt = input(true, title="ATR Based REnko is the Default, UnCheck to use Traditional ATR?") atrLen = input(10, minval=1, title="ATR Look Back Length") isATR = input(true, title="Checked Box = ATR Renkos, If You Un Check Box Please Read Below") def = input(false, title="Number Below is Multiplied by .001, So 1=10 Pips on EURUSD, 10=100 Pips, 1000 = 1 Point on Stocks/Furures") tradLen1 = input(1000, minval=0, title="Input for Non-ATR Renkos, See Above for Calculations") //Code to be implemented in V2 //mul = input(1, "Number Of minticks") //value = mul * syminfo.mintick tradLen = tradLen1 * .001 param = isATR ? renko(tickerid, "open", "ATR", atrLen) : renko(tickerid, "open", "Traditional", tradLen) renko_close = security(param, period, close) renko_open = security(param, period, open) col = renko_close < renko_open ? fuchsia : lime p1=plot(renko_close, style=cross, linewidth=3, color=col) p2=plot(renko_open, style=cross, linewidth=3, color=col) fill(p1, p2, color=white, transp=80)
Never use Regular Renko Bars as the basis for your trading. Just use Renko Bars in Reference to the Regular Japanese Candles.
I'd like to be able to plug in a custom time-frame ATR variable to the "Traditional" value since the built-in ATR method for the renko function only calls the ATR for the time-frame you're currently viewing. Here's an example of the code I'd like to use but can't because the variable is dynamic where "ATR" would be referencing the ATR on a previous daily or hourly
renko_tickerid =renko(tickerid, "open", "Traditional", ATR)
renko_close =security(renko_tickerid, "3", close)
I hope you understand what I'm trying to articulate and maybe you have a solution?!
Have a good weekend :)
Not following your question. I've used Renkos for 10+ years on various platforms and TradingView's Renkos work exactly like all other platforms..However, they have the added ability to work off ATR's (Which is the Default) so you can place on any instrument and get a picture and then adjust the settings accordingly.
Apply the Renkos to a chart...they will appear as the ATR type. Click on the Gear icon by the symbol name and choose Traditional and set the Box size to what you want it to be. These are True Renkos based on where the price has been.
My Renko Overlays
In the inputs Tab uncheck the top box that comes checked by default. Then below put in your box size. The only difference with mine is I set it up to work easily with forex...so if your looking at a stock 2 points would = 2000 etc.
Regarding your Code:
Let's say you wanted the ATR to be based off a Daily chart but your were using a 60 minute chart etc. You would change these two lines of code in my script. Where I placed "D" it used to say period.
renko_close = security(param, "D", close)
renko_open = security(param, "D", open)
Now this 60 Minute chart is using the ATR from a Daily Chart.
Now if you went into the inputs tab and unchecked the top checkbox and in this example I'm showing the GBPJPY so setting the box size to 1000 would equal 1 point. Then you would see the bars plot for the entire Daily session of the GBPJPY. HOWEVER, this is not giving you an accurate result based on the code...as you can see in the big gap between sessions that you would not have seen using true Renkos.
So if you wanted to use the 3 setting from above...the code would just be
renko_close = security(param, "3", close)
renko_open = security(param, "3", open)
Again...I don't recommend playing with the sessions on the Renko Overlays. Just uncheck the top checkbox and set the Box Width Amount to what you want.
let me know if that doesn't answer your question...
See how the 1 brick Renko chart of SPY is different from the StockCharts and TradingView charts. In Theory every single 1 size Renko Chart of SPY should look exactly the same. They don't because TradingView (and Stockcharts?) assess their brick drawing every "time frame" (3min, 5min, 60min etc) instead of absolutely price history. So in your example above plugging in a different time frame for ATR to be viewed on a lower timeframe "works" it will only check the price location relative to the last renko every hour (assuming that's the timeframe we use for ATR). However, if I drill down my timeframes to a more granular level in my TV SPY chart (3min) you will see how the 1 size Renko chart is congruent to my ToS renko chart (it's because it checks the location of the price every 3 minutes):
So what I am saying that I need is a customATR Renko setting (60min for example) that checks a 3minute timeframe instead of a 60 minute timeframe. TV won't allow it. Sure it will draw Renkos on a lower timeframe but it won't be accurate to true granular price history, only where the price has been every 60 minutes.