Autotrading with Renko Bars
Forums › ProRealTime English forum › ProOrder support › Autotrading with Renko Bars
- This topic has 23 replies, 5 voices, and was last updated 2 years ago by Sterk.
Tagged: renko
-
-
02/03/2020 at 12:12 AM #11850802/03/2020 at 12:19 AM #118510
Searching the forum for the word RENKO will return the info you need.
You can also browse https://www.prorealcode.com/topics-tag/renko/.
02/03/2020 at 7:35 AM #11851302/03/2020 at 8:14 AM #11851602/03/2020 at 8:59 PM #11860302/03/2020 at 9:46 PM #118604How come you could post here without knowing where this place is?!
02/03/2020 at 9:49 PM #11860502/03/2020 at 10:08 PM #118606I hope Nicolas or someone else can help you.
I posted some links and gave you a few hints on how to find info, but I never dealt with Renko bars myself.
Did you read those posts? I remember having read many times about Renko bars and TS’s.
I don’t think is possible with v10.3, but v11 should have some support for Renko charts.
02/04/2020 at 10:31 AM #118626It is not possible to run an automated trading strategy on renko chart, however we can simulate that kind of price representation in the code. This simple code is an example on how to achieve the same thing as the renko chart itself.
12345678910111213141516171819202122Defparam cumulateorders = falseboxSize = 40once renkoMax = ROUND(close / boxSize) * boxSizeonce renkoMin = renkoMax - boxSizeIF high > renkoMax + boxSize THENWHILE high > renkoMax + boxSizerenkoMax = renkoMax + boxSizerenkoMin = renkoMin + boxSizeWENDELSIF low < renkoMin - boxSize THENWHILE low < renkoMin - boxSizerenkoMax = renkoMax - boxSizerenkoMin = renkoMin - boxSizeWENDENDIFbuy at renkoMax + boxSize stopsellshort at renkoMin - boxSize stop02/04/2020 at 9:17 PM #11868002/04/2020 at 10:01 PM #11868709/22/2020 at 11:01 AM #144976Dear All,
I tried to add the calulation of the boxsize based on ATR but I must be missing something obvious as no trade is taken in backtest.
I tried Boxsize = Average[200](averagetruerange[14]); boxsize = averagetruerange[14] and boxsize = averagetruerange[14]*pipsize but nothin works.
If someone can point my mistake that would be helpful.
Best regards.
Alex
12345678910111213141516171819202122Defparam cumulateorders = falseboxsize = averagetruerange[14]*pipsizeonce renkoMax = ROUND(close / boxSize) * boxSizeonce renkoMin = renkoMax - boxSizeIF high > renkoMax + boxSize THENWHILE high > renkoMax + boxSizerenkoMax = renkoMax + boxSizerenkoMin = renkoMin + boxSizeWENDELSIF low < renkoMin - boxSize THENWHILE low < renkoMin - boxSizerenkoMax = renkoMax - boxSizerenkoMin = renkoMin - boxSizeWENDENDIFbuy at renkoMax + boxSize stopsellshort at renkoMin - boxSize stop1 user thanked author for this post.
09/22/2020 at 11:43 AM #14498109/22/2020 at 11:46 AM #144983Hi Nicolas,
Thanks for your reply.
I tried also but it does not return any results.
Alex
12345678910111213141516171819202122Defparam cumulateorders = falseboxsize = averagetruerange[14]once renkoMax = ROUND(close / boxSize) * boxSizeonce renkoMin = renkoMax - boxSizeIF high > renkoMax + boxSize THENWHILE high > renkoMax + boxSizerenkoMax = renkoMax + boxSizerenkoMin = renkoMin + boxSizeWENDELSIF low < renkoMin - boxSize THENWHILE low < renkoMin - boxSizerenkoMax = renkoMax - boxSizerenkoMin = renkoMin - boxSizeWENDENDIFbuy at renkoMax + boxSize stopsellshort at renkoMin - boxSize stop09/22/2020 at 12:37 PM #144985It makes sense, the renko brick code you use seeks to fix the construction of the bricks to round numbers like the internal indicator of the platform does. Except if the ATR has a value so the rest of the division is not 0, then the code cannot fix the construction of the bricks and nothing happens. To build renko candles with the ATR, I will suggests this code:
123456789101112131415161718boxsize = AverageTrueRange[14](close)once topprice = closeonce bottomprice = close - boxsizeif(high > topprice + boxsize*2) THENtopprice = closebottomprice = topprice - boxsize*2ELSIF (low < bottomprice - boxsize*2) THENbottomprice = closetopprice = bottomprice + boxsize*2ELSEtopprice = toppricebottomprice = bottompriceENDIFRETURN topprice as "box top", bottomprice as "bottom box" -
AuthorPosts
Find exclusive trading pro-tools on