Hi everyone.
I came across an issue using Renko charts and I would like Multicharts support to explain how to resolve this issue. I believe many people already experienced these issues.
First of all, backtesting a strategy using Renko charts results in false entry/exit prices for any strategy.
Second, in live strategy running, in many cases the boxes of the Renko chart are generated before the closing price of the bar or before a new bar is generated for a given time frame. This leads to many more boxes than it should be plotted. Then when I reload all the data (Ctrl+R), some boxes simply disappear. This certainly leads to wrong trades as the price difference at the close may not be exceeding the box size and so there shouldn't be created any box.
So my question is, how can I prevent this to happen?
Kind regards.
Renko chart in live strategy running
Re: Renko chart in live strategy running
I also have the same problem where Renko bars drawn in real time they are replaced when I refresh the chart. This is not expected behavior and I don't see it happening on other platforms.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Renko chart in live strategy running
Then when I reload all the data (Ctrl+R), some boxes simply disappear.
This issue has been already fixed. In the attachment are the modules with a fix. The modules can be used with MultiCharts 8.0 Release only. They would be also included in MultiCharts 8.1 by default.I also have the same problem where Renko bars drawn in real time they are replaced when I refresh the chart. This is not expected behavior and I don't see it happening on other platforms.
Here is how to install it:
1) You need to close MultiCharts and all of its applications.
2) Then go to MultiCharts folder (make a right click on the MC shortcut –> Properties –> "Shortcut" tab –> select "open file location") and rename the file Shaper.dll into old_Shaper.dll
3) Save the file from the attachment corresponding to the version of MultiCharts you have and paste it to the MultiCharts folder.
You can find more information regarding calculation on the Renko chart type at the following pages:
Renko chart type
IOG on non standard chart types
- Attachments
-
- Shaper.dll
- For 64bit MultiCharts
- (2.88 MiB) Downloaded 447 times
-
- Shaper.dll
- For 32bit MultiCharts
- (1.68 MiB) Downloaded 309 times
-
- Posts: 196
- Joined: 08 Aug 2012
- Has thanked: 41 times
- Been thanked: 41 times
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Renko chart in live strategy running
The update is already included in Multicharts .Net 8.0 Release.do i need to do this for multicharts.net ?
-
- Posts: 196
- Joined: 08 Aug 2012
- Has thanked: 41 times
- Been thanked: 41 times
Re: Renko chart in live strategy running
Hi everyone.
Thanks for the reply and the file.
Was this the reason why strategy performance based on history and data playback didn't match?
Kind regards.
Thanks for the reply and the file.
Was this the reason why strategy performance based on history and data playback didn't match?
Kind regards.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Renko chart in live strategy running
Hello lois77,Hi everyone.
Thanks for the reply and the file.
Was this the reason why strategy performance based on history and data playback didn't match?
Kind regards.
The dll is the fix for the following:
Then when I reload all the data (Ctrl+R), some boxes simply disappear.
Please describe in details what exact mismatch do you have between history and data playback strategy performance:I also have the same problem where Renko bars drawn in real time they are replaced when I refresh the chart. This is not expected behavior and I don't see it happening on other platforms.
1) provide screenshots demonstrating this behavior
2) workspace you are using
3) signal code you are using
4) detailed description and steps for reproducing this behavior.
Re: Renko chart in live strategy running
Hi.
I already discovered why strategy performance based on history and data playback doesn't match.
When I run the data playback, all the orders are executed at the close of the next bar. (next bar is the bar where the order should be placed when the current bar generates a signal)
Before I run the data playback, all the orders are executed at the beginning of the next bar, and this is how I pretend.
This must be the reason why I always get a worse performance when I run the data playback.
Why is this happening? Did somebody else experienced this? Is there some option to check in order to get the same results?
Kind regards.
I already discovered why strategy performance based on history and data playback doesn't match.
When I run the data playback, all the orders are executed at the close of the next bar. (next bar is the bar where the order should be placed when the current bar generates a signal)
Before I run the data playback, all the orders are executed at the beginning of the next bar, and this is how I pretend.
This must be the reason why I always get a worse performance when I run the data playback.
Why is this happening? Did somebody else experienced this? Is there some option to check in order to get the same results?
Kind regards.
Re: Renko chart in live strategy running
Hi again.
There is another issue I came across.
On real time chart, there are cases where the boxes exceed the box size defined on Format Instrument. Then, when a new period starts, the box divides in two, where the first has the box size and the second takes the size value between the close of the first and the current price. This shouldn't happen as Renko charts do not depend on time to plot new boxes and neither should be plotted boxes with a size higher than the preset size.
Does anyone experienced the same problem? What should I do to prevent this?
Kind regards.
There is another issue I came across.
On real time chart, there are cases where the boxes exceed the box size defined on Format Instrument. Then, when a new period starts, the box divides in two, where the first has the box size and the second takes the size value between the close of the first and the current price. This shouldn't happen as Renko charts do not depend on time to plot new boxes and neither should be plotted boxes with a size higher than the preset size.
Does anyone experienced the same problem? What should I do to prevent this?
Kind regards.
- Katrin Yanenko
- Posts: 55
- Joined: 28 Nov 2011
- Has thanked: 18 times
- Been thanked: 23 times
Re: Renko chart in live strategy running
Dear lois77,
Please answer the questions in a step-by-step way.
Best Regards,
Katrin Yanenko
We still need this information and the screenshots for further investigation.Please describe in details what exact mismatch do you have between history and data playback strategy performance:
1) provide screenshots demonstrating this behavior
2) workspace you are using
3) signal code you are using
4) detailed description and steps for reproducing this behavior.
Please answer the questions in a step-by-step way.
This behavior can be reproduced on more than 1 tick resolution charts, real time bars are plotted at the close of the bar of the main data series.Hi again.
There is another issue I came across.
On real time chart, there are cases where the boxes exceed the box size defined on Format Instrument. Then, when a new period starts, the box divides in two, where the first has the box size and the second takes the size value between the close of the first and the current price. This shouldn't happen as Renko charts do not depend on time to plot new boxes and neither should be plotted boxes with a size higher than the preset size.
Does anyone experienced the same problem? What should I do to prevent this?
Kind regards.
Best Regards,
Katrin Yanenko
Re: Renko chart in live strategy running
1)
Before running data playback and after running data playback images.
Note the connecting lines of the trades.
2)
I am using a new workspace with only one chart.
3)
I am using this code to entry/exit long positions:
I am using this code to entry/exit short positions:
4) Well, after changing the code of my strategy, I check the strategy performance and get some results. Then, if I run the data playback and check again the strategy performance, the results are always different. And are always worse.
If you need more feedback, let me know.
Kind regards.
Before running data playback and after running data playback images.
Note the connecting lines of the trades.
2)
I am using a new workspace with only one chart.
3)
I am using this code to entry/exit long positions:
Code: Select all
if condition1 and condition2 and not(condition3) and not(condition4) then
var0 = var0 + 1
else
var0 = 0 ;
if condition1 and condition2 and not(condition3) and not(condition4) and CurrentBar > ConfirmBars and var0 = ConfirmBars then
Buy next bar market ;
if (condition7 and condition8) or (condition8 and condition9) then
Sell next bar market ;
Code: Select all
if condition1 and condition2 and condition3 and not(condition4) then
var0 = var0 + 1
else
var0 = 0 ;
if condition1 and condition2 and condition3 and not(condition4) and CurrentBar > ConfirmBars and var0 = ConfirmBars then
Sellshort next bar market ;
if not(condition2) and not(condition3) then
Buytocover next bar market ;
If you need more feedback, let me know.
Kind regards.
- Attachments
-
- After_data_playback.png
- (50.18 KiB) Downloaded 1957 times
-
- Before_data_playback.png
- (51.37 KiB) Downloaded 1958 times
- Katrin Yanenko
- Posts: 55
- Joined: 28 Nov 2011
- Has thanked: 18 times
- Been thanked: 23 times
Re: Renko chart in live strategy running
Dear lois77,
We were asking you for a workspace because it would show us whether you use IOG or not.
If this option is enabled then this situation is likely to happen. Let me explain why.
Let’s say you have IOG on then the strategy is calculated 4 times on each historical bar during backtesting.
Data Playback is the emulation of real time. The calculation is made on the received Close of the second data series during the Playback.
Only As is mode of Data Playback is available for non-standard chart types, such as Renko. The strategy will not be calculated 4 times each bar as on backtesting, it’s calculated on the Close of the bar of the second data series.
This is the current implementation. You may want to submit a feature request for developing this As is mode of Data Playback to the Project Management of our web site so other users can vote for it: https://www.multicharts.com/pm/.
Best Regards,
Katrin Yanenko
We were asking you for a workspace because it would show us whether you use IOG or not.
If this option is enabled then this situation is likely to happen. Let me explain why.
Let’s say you have IOG on then the strategy is calculated 4 times on each historical bar during backtesting.
Data Playback is the emulation of real time. The calculation is made on the received Close of the second data series during the Playback.
Only As is mode of Data Playback is available for non-standard chart types, such as Renko. The strategy will not be calculated 4 times each bar as on backtesting, it’s calculated on the Close of the bar of the second data series.
This is the current implementation. You may want to submit a feature request for developing this As is mode of Data Playback to the Project Management of our web site so other users can vote for it: https://www.multicharts.com/pm/.
Best Regards,
Katrin Yanenko
Re: Renko chart in live strategy running
Hi Katrin.
If IOG enabled means "Enable Intra-bar Order Generation" checked, so I must say I didn't enable IOG.
I tried everything and I can't see where is the problem.
Kind regards.
If IOG enabled means "Enable Intra-bar Order Generation" checked, so I must say I didn't enable IOG.
I tried everything and I can't see where is the problem.
Kind regards.
- Katrin Yanenko
- Posts: 55
- Joined: 28 Nov 2011
- Has thanked: 18 times
- Been thanked: 23 times
Re: Renko chart in live strategy running
Hi lois77,
Please come to our Live Chat http://messenger.providesupport.com/mes ... pport.html tomorrow from 6:30 am till 1 pm EST in order we could connect to your machine remotely and investigate this issue with the specialist in this area.
Best Regards,
Katrin Yanenko
Please come to our Live Chat http://messenger.providesupport.com/mes ... pport.html tomorrow from 6:30 am till 1 pm EST in order we could connect to your machine remotely and investigate this issue with the specialist in this area.
Best Regards,
Katrin Yanenko
-
- Posts: 116
- Joined: 19 Aug 2012
- Location: San Francisco
- Has thanked: 23 times
- Been thanked: 30 times
- Contact:
Re: Renko chart in live strategy running
There is definitely something inconstant with Back Testing vs Data Playback results on Renko Charts.
The Back Testing shows buy/sell as next bar open while Playback shows buy/sell next bar at close.
I have attached workspace and screen shots as well as sent you a work space.
- Stefano
The Back Testing shows buy/sell as next bar open while Playback shows buy/sell next bar at close.
I have attached workspace and screen shots as well as sent you a work space.
- Stefano
- Attachments
-
- Playback Screen.png
- Play Back Screen
- (36.25 KiB) Downloaded 1945 times
-
- Backtest Screen.png
- Back Test Screen
- (39.68 KiB) Downloaded 1948 times