ISettingsHost - Changing the parameters of RenkoChartStyle via code
Author: RichJSails
Creation Date: 1/3/2012 10:53 PM
profile picture

RichJSails

#1
Before (Pro) V6.2, I had a strategy script that set the size of the RenkoPriceUnits based on an algorithm so that each symbol reviewed would have brick sizes appropriate for its trading range. It worked fairly well, though sometimes a symbol would have to be executed twice to update the display (no big deal)

With the V6.2 implementation of ISettingsHost for RenkoPriceUnits, I have been unable to figure out how to update the RenkoPriceUnits programatically... The methods appear to be public, but I'm clearly missing something.... Help!

Can you provide an example of a script that?:
1 - instantiates ISettingsHost
2 - applies a ReadSettings method
3 - applies a WriteSettings method

Regards,
Rich

This was my code (V6.1)

CODE:
Please log in to see this code.





profile picture

Cone

#2
In 6.2 it's completely different.. Basically, your script isn't tied to the ChartStyle at all any more. You create your own TRenko object and use its properties in the script. The big advantage here is that you're no longer confined to running a Renko strategy in the Strategy Window.

1. See the WealthScript Programming Guide > Backtesting with ChartStyles.Trending > Column Class (Reference) > Renko > TRenko.

2. See "Renko Basic [Rev A]", which has been available for download since 6.2 was released
profile picture

RichJSails

#3
Thank you Cone... I understand that the TRenko class allows use of the Renko methods and column class. An outstanding improvment, and I have re-written my strategy to exchange my home-grown renko class with TRenko.

Still, when changing symbols AND viewing the RenkoChartStyle, I would like to be able to automatically change the the RenkoPriceUnits of the displayed chart. That way, the visual chart matches the brick size of the underlying strategy.

Can the displayed chart be manipulated in this way?

Rich
profile picture

Cone

#4
No, at least not now. The idea was to separate the Strategy calls from the ChartStyle reference to be able to run the strategy when a Chart window didn't exist, like in the Strategy Monitor, multi-symbol test, or optimization. Setting parameters in a script for the ChartStyle wasn't really integrated and there was always a large possibility (or near certainty) that you could be looking at a chart that required refreshing before it matched the script.

To make it clear for anyone else reading this now, the Chart Style must be controlled separately using the "Chart Style Settings" context menu (Ctrl+Y). The parameters used by the script are completely separate and are controlled by the Strategy Parameters, if desired.
profile picture

RichJSails

#5
Thanks for your comments. Yes, it was an absolute certainty to have to refresh the chart on each symbol change. That was a minor consequence to get the certainty that the chart display matched the math under the covers.

So, someday, it would be really nice to have access to the settings host. Hence the request... Please consider it for a future release.

For others reading... the new TRenko (or other Trending Style classes) access is GREAT. In the past, we had to "reinvent the wheel", and now we don't. Wealth-Lab is a great tool. Many thanks to the development team!!!
profile picture

Cone

#6
Thanks, it was a lesson learned :)
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).