Hi,
I have created my own ChartStyle. Now I´d like to access its information to create signals upon it. How can I do that? For example I would like to buy if there were three upward bricks in a row.
dansmo
Size:
Color:
Hi,
"Backtesting with ChartStyles.Trending" in the WealthScript Programming Guide might be helpful.
Size:
Color:
Yes, but how do I fill Column for my own ChartStyle?
Size:
Color:
Have you already taken a look at the prepackaged Strategy "Kagi Basic"?
Size:
Color:
I had a look at this:
CODE:
Please log in to see this code.
Having my own ChartStyle called ExperimentalChartStyle.
However replacing "Renko" with "Experimental" wont do it because there is
no defintion for Columns in my namespace. I dont get it.
Size:
Color:
You can only access public methods and properties that your ChartStyle makes available. How can we can tell you how to use something that you've programmed?
Size:
Color:
Of course not. I thought there would be something that describes hot to create columns for a own ChartStyle.
Something like SetBarWidth --> SetColumns.
Size:
Color:
Okay, I think I understand it now. I "just" need to create a Column class for each traditional bar in the chart. I then can access this class for every bar in WLD and use this information.
Size:
Color:
You don't have to do it that way, but that was my solution.
Note that you have to actually be using a Renko Chart to access its methods by casting the RenkoChartStyle. This isn't necessarily desirable since there is no Chart object in tools like Rankings or Strategy Monitor. Unfortunately, I didn't catch on to that until after I finished writing Renko, Kagi, and LineBreak. But that's why PnF took a more-versatile approach. It uses a separate TPnF class that calculates and stores the PnF Column data that the Chart Style uses. You can, then, access the same class in your script that the Chart Style uses without needing to cast the ChartStyle.
Size:
Color:
In the meantime I thought about how to solve this:
I store all necessary value in Dictionaries for ever traditional OHLC bar. Now I provide some get-methods that provide these Dictionaries directly to WLD. This way it is possible to use all values etc. I later use for rendering the chart.
First examples show that this will do it for me.
Size:
Color:
@Cone
I need a hint with this.
I wanted to modify my code, so that it matches your solution. All the necessary calculations should be in a own calculator class. However, I dont get it done:
This class does all the chartStyle things for WLD and has Initialize, SetBarWidth etc:
CODE:
Please log in to see this code.
Now, I wanted to add a class
CODE:
Please log in to see this code.
to do all the calculation. However, I get lots of errors.
When adding FlexRenko: ChartStyle it is telling me that I need Initialize() etc. How do I have to set up this class?? Just like you did it with TPnF class!
Size:
Color:
I can't troubleshoot your errors, but FlexRenko should be a completely separate, but public class that you instantiate in FlexibleRenkoChartStyle.
Size:
Color:
QUOTE:
I can't troubleshoot your errors
That´s not what I posted for.
Since you wrote the TPnF class I thought you could give me some insights.
Why does FlexRenko need to inherit the methods InitializeBarWidths(), Glyph(). I mean: I have these in the FlexibleRenkoChartStyle class. How can I avoid thos?
Size:
Color:
QUOTE:
Why does FlexRenko need to inherit the methods InitializeBarWidths(), Glyph().
It shouldn't; it's not a ChartStyle.
Size:
Color:
I must be missing something important here, but I dont have a clue what it is and how to fix it:
this is the start of the class:
CODE:
Please log in to see this code.
Now, it says I need a object reference for "WealthLab.Bars.High.get".
Size:
Color:
Maybe you should pass the reference of the Bars object (the basis for your brick data) to calculateRenkos.
Those are a lot of dictionaries when you only need one... <Int32, Renko>, where Renko is a class that has the brick data. In other words, summarize the data in one Renko object for each bar.
Size:
Color:
Okay, I think I have understood. Thank you.
One more issue:
CODE:
Please log in to see this code.
This line throws a System.FormatException. I cannot figure what went wrong here. Is there any way to clear these settings? Do you have any idea what could be wrong?
Size:
Color:
QUOTE:
Is there any way to clear these settings?
It's in the WealthLabConfig.txt file, look inside the Data directory (see the User Guide > Data, the path isn't trivial and is
not under Program Files).
Size:
Color:
Thank you. There was a decimal separator problem. In the Config there was a comma saved.
Size:
Color:
Hi Cone,
need a hint with your suggestion in your post:
QUOTE:
Those are a lot of dictionaries when you only need one... <Int32, Renko>, where Renko is a class that has the brick data. In other words, summarize the data in one Renko object for each bar.
I try it this way:
CODE:
Please log in to see this code.
and then:
CODE:
Please log in to see this code.
However, it wont let me have access to Renk() due to security reasons. Can you give me a hint what I am doing wrong here?
Size:
Color:
Not enough information.
Size:
Color:
May I contact you via Support ticket with the full code?
Size:
Color:
I hate to see anyone struggle with solutions (we all do from time to time) but per
Our Support Policy, custom solutions are very low priority for me - I'm overloaded, really.
dansmo, pardon the suggestion, but I think you can get a lot of mileage at a site like
Experts Exchange. For only about $100/yr, you can get programmers around the world working on problems for you, often the same day. Check it out.
Size:
Color:
QUOTE:
However, it wont let me have access to Renk() due to security reasons.
What is the exact error message in the compiler?
Size:
Color:
QUOTE:
Fehler 1 Der Zugriff auf "Dansmo.ChartStyles.FlexRenko.Renko.Renko()" ist aufgrund der Sicherheitsebene nicht möglich.
Size:
Color:
This is the infamous
Compiler Error CS0122 i.e. Renko.Renko is inaccessible due to its protection level. In other words, even though your code dated 7/7/2010 doesn't show it on the first look, the Renko class somewhere is missing the "public" modifier and in fact is private.
Size:
Color:
Yes, that is how I understand it, too. But I cannot figure out why. All classes are "public class". I dont know how to fix it.
Size:
Color:
Attach your project to a new ticket please, I'll try to take a look at this specific error.
Size:
Color: