obtaining bar data by clicking move
Author: bobydesi123
Creation Date: 2/6/2010 5:22 PM
profile picture

bobydesi123

#1
Is there a way to obtain the Bar value such as barnumber, Close price etc. by clicking it on a chart? I want to be able to click a bar data(candle) on chart and have its information available in strategy. Thank you.
profile picture

Eugene

#2
No, this kind of interaction is not possible.
profile picture

bobydesi123

#3
Eugene,
Thank you for your reply.
If its not possible to obtain bardata etc. as mentioned above, can you tell me how I can refer to the "bitmap" that is displayed as "graph" in WLP5? C# sytem.drawing has "bitmap" class that can be used to further investigate. How do i refere (name given by WL DLL) to the WL "chart", when i instantiate a new "bitmap" object?
WLP5 has methods such as drawpolygon etc. which takes Bars.number and NOT the pixel(x,y) cordinates. Obviously, WL contains the relationship between pixel(x,y) and the BarNumber.
Thank you in advance.
profile picture

Eugene

#4
You're going absolutely the wrong route with DrawPolygon, coordinates etc. The Strategy has already finished working before presenting you with the chart bitmap.

Re: System.Drawing.Bitmap will not help either. It's a static image that you can obtain with WL5's GetChartBitmap() method.

You're going the wrong way. No discretionary chart interaction is possible to "click a bar data(candle) on chart and have its information available in strategy".
profile picture

Cone

#5
This information is in the ChartStyle Class / API, but Eugene is right about the order of things.

You can access the bitmap for drawing, but you'll need to know the details of the derived ChartStyle member in use in order to cast it to obtain the current ChartStyle instance. Here's an example

The ChartStyle instance can really only help your analyses if it explicitly provides public data for you to access, like the Trending ChartStyles do (WealthScript Guide).
profile picture

bobydesi123

#6
Eugen,
"You're going absolutely the wrong route with DrawPolygon, coordinates etc. The Strategy has already finished working before presenting you with the chart bitmap."

I think this makes it more clearer.

One more question, how the strategy interact/deal with user drawn trend lines(TL) during the execution? How does the strategy obtain user drawn TL information (conversion from bitmaps to bar number)?
Here is what i am trying to accomplish. I think, this will help you better answer my question than if i kept asking indirect questions. sorry for that.
1. I am writing a strategy that does "custom" pattern recognization in RT intra-day , e.g. 1 minute scale.
2. The numbers of bars required to recognize pattern requires VARIABLE numbers of bar data. If i feed ALL the bar data or bar data strarting from the END of previous pattern, the complexity and time for developing startegy increases many fold.
3. Initially and perhaps ideally, i would like to "point and click" on the area of the WL graph after say, a new Bar data (e.g. 1 minute) has been received by the strategy.
- on the next tick the strategy has the places( Cordinates of the bitmaps converted to its nearest Bar number) I had "pointed and clicked" in between the previous received bar and current received bar.
4. So that on the next tick the chart can do the pattern recognization on the area of interest as selected by me by "pointing and clicking" the graph in between the bar intervals (1 minute).
I hope this makes it clear to you why i was asking these questions in the first place. I guess next time I should define the problem i am trying to solve along with the question.
Thank you for your time and any help will be appreaciated.
profile picture

bobydesi123

#7
Cone,
Thanks for your reply. I am sorry I did not see your post while i was composing my reply posted @ 11:23/24 AM EST. I guess you must have replied while i was composing it. I think my post @11:23 EST explains in detail what i am trying to accomplish.
After reading your post, i think i understand how to get x,y co-ordinate for the bar, using convetbarToX method.
My next question is how can i know which point(x,y) was clicked by mouse. I could probably use a brute force method such as creating a global hook to mouseMove and mouseClick event etc. and map/translate cordinates but that seems like over kill.
Is there another way to access LOCAL mouseMove and mouseClick events to identify the (x,y) clicked on the chart?
Once again thank you both for your insight and quick response. Do both of you work for people who created WLP/WLD? Anyway, keep up the good work! (thumbs UP simile)
profile picture

bobydesi123

#8
Cone, Eugene or any member,
Just checking for any updates. As i have mentioned in my posts, i just want to MAP a click on WLP "chart" to a bar number that is closest to the are clicked. I am not looking for a neat solution, any work around/suggestion is appreciated. If I am charting the WLP properitory territory and you cant help, please show me the direction where i should investigate further. Thank you.
profile picture

Eugene

#9
QUOTE:
Is there another way to access LOCAL mouseMove and mouseClick events to identify the (x,y) clicked on the chart?

It's not possible to know the point (x,y) that was clicked by mouse, in Strategy code. Execute() is done before you see the chart. Possible for the application itself, of course.
QUOTE:
- on the next tick the strategy has the places( Cordinates of the bitmaps converted to its nearest Bar number) I had "pointed and clicked" in between the previous received bar and current received bar.

If I'm not mistaken, you'd need an event-driven platform for this kind of things.
profile picture

bobydesi123

#10
Eugene,
Thank you for ur help. I am sorry that I had opened a support ticket amid confusion. I was not sure if support ticket goes to the fidelity or to you and if WLP support is same as WLD support. Seems like there are differences between WLP and WLD platform. Are WLP and WLD exatly the same platforms or different? Just curious.
profile picture

Eugene

#11
No need to be sorry. It's OK. Here, on the forum, is the optimal place for such kind of questions.

Built from the same code base, WLP and WLD have some "regional" differences, so to speak. What's the difference between Wealth-Lab Developer and Wealth-Lab Pro?
QUOTE:
Wealth-Lab Developer is sold outside of the U.S. by MS123, LLC under license by Fidelity Investments. Wealth-Lab Pro, the U.S. version, is available to qualified active trader accounts at Fidelity free of charge. "Pro" and "Developer" are in effect the same application except that "Pro" is delivered with special integration for Fidelity price and fundamental data as well as for automated trading with Fidelity Investments.


Fidelity WLP support and our (MS123) WL support are different.
profile picture

DaveAronow

#12
QUOTE:
Fidelity WLP support and our (MS123) WL support are different.


Sorry, couldn't resist:

Fidelity support involves a lot of waiting and broken promises, kind of like being a Mets or Jets fan in NYC.
profile picture

bobydesi123

#13
Thanks Eugene.
DaveAronow, I am with you. Calling fidelity support is a waste of time.
Eugene, Cone etc. are extremly helpful and knowledgeable, but they seem to be (understably) contract bound to fidelity to not to divulge more about the API. From what I understand,API information was once available here and was put offline.
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).