Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Warning, this is a bit tricky/high level problem.
Some of our very good coders, @Mindset, @bukkan, @gomi, @eDanny, @Fat Tails, ... may have an idea.
I've been playing with ChartHelper.cs, which allow nice things, like calculate the price of the bar number, from the point you have clicked on a chart.
It works fine in an indicator, you can very quickly write an indicator which trap a mouse click, and then get the bar number, or the price level, and so on.
To calculate this, it use the Update() method, which seems to be called with a min and max, which can then be used to calculate the price.
It's also possible, with the Plot() method, where you have a min and a max.
But, AFAIK, these methods are not accessible in a Strategy, right ?
Any idea, to make a strategy able to get these min & max ?
Below a sample Strat, trying to get this price level.
The ChartHelper.cs is also here: ChartHelper.cs
I use channel indicator it called chart helper to draw a channel but it has a bug. When you re-open a chart it draws down channel only, I have to delete then add it back then it draws both up and down channel.
I might add that both the ChannelHelper.cs and the a00Channels.cs look to me as the Pepe Hershey Indicators PP_ChartHelper and PP_Channels, see here , except that there no mention to Pepe any more.
As a developer I find it rather uncool, so I'll grab this opportunity to make public mention of this awsome series of Indicators, and thank Pepe if he wanders here one day.
Pepe, your work was truly inspirational to me and helped me tremendously to deal with mouse/keyboard interaction with the Ninja charts. It really was an eye-opener.
I already had this piece of code, but I was trying to see if there was a simpler way to convert the Y value to a price.
As it seems there is not, I think I will have to modify this one (but I need to understand it first, not really an amateur's one ).
As this indicator/strategy can give the low of a bar if the mouse click is done below, it might be able to also give the high of the same bar. If I can have an Y' of low, and an Y'' for the high, with a know low and high, I should be able to translate my Y into a price.
Very clear for me now, let's see tomorrow morning...