Discussions
»
Product and Service Development
»
MetaStock
»
How can I see the price range between two prices ?
Rank: Newbie
Groups: Registered, Registered Users Joined: 4/8/2008(UTC) Posts: 8
|
Hi.
I would like to know how to draw a line from one price to another, and the line tell me the price range between the two points.
For example, I have one point at 10.00 and other point at 15.00. Then the line should tell me the price range is 5.00 (+50%). Or if I draw from 10.00 to 8.00 the line should tell me the range is -2.00 (-20%).
It's not exactly a trendline, so I guess this tool is not what I'm looking for.
Does it exists in any drawing tool ?
Or anyone have made a plugin to do so?
Or in last case, can I code it myself and add a new drawing tool to metastock ? ( i am a .NET programmer )
[]s
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
Hi Yammy,
Welcome to the Forum.
As a programmer you should appreciate these questions:
How are you deciding on where the "prices" are? Are the end points defined by datetime? Are they defined by events?
Are you looking for only a single line on the chart, or do you want to be able to draw a function with many sections?
You need to provide more information about what it is that you are trying to achieve, in order for someone to provide you with a definitive solution.
wabbit [:D]
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 4/8/2008(UTC) Posts: 8
|
If you look at the program " ProfitChart " you would see an example of this functionaly in action.
But I will try to explain how it works.
Have some candles or lines (or whatever) graphic plotted on screen, at any time and period.
Then the tool i'm looking for looks like a trendline tool, you can draw a line onto the candles, with a start point and an end point. But instead of showing just the line, It marks the price at the start point and the price and the end point, and give me the subtraction of the two values.
For example.
At march 10th, I start drawing the line when it was 10 dolars, and end drawing at march 20th, when the price was 16 dolars.
Then the line do the math : 16 - 10 = 6
And voi lá. The trade variation was + 6
The opposite is also true. If I draw a line from 16 to 10, it should tell the the trade variation was - 6.
Simple like that : )
ProfitChat do that like a charm, and is a much smaller program than Metastock. I don't believe there is no such tool already in metastock :(
What can we do to implement it ? Does it exists somehow ? Or can I code a plugin to add a drawing tool as a variation of the trendline ?
thanks!
[]s
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
The short answer is, no it cannot be done.
The longer answer involves responses like, you cannot use the mouse to select data points as input arguments to indicators / formulas. You cannot programatically write to the display. There is no interaction for the user interface in MS so much of the functionality you see in other software packages is not included in MS.
wabbit [:D]
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 4/8/2008(UTC) Posts: 8
|
Hmmm If I can't add a new tool to the toolbar to write a different trendline, can I maybe CHANGE the existing trendline tool ?
So It could drawn the regular trendline, and ALSO tell me what's the price variation between the two points of the line. Are you sure that just can't be done, in any way ?! It's so simple thing! Let's make it happen! It can't be so impossible!
We just need to ask the line : hey what's the price at point A ? And the price at point B? Do the math, and print it. I can't believe it's just impossible :(
[]s
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
The only way to achieve what I think you want is to use the Input() function to prompt the user to enter the starting datetime and end datetime of the line. You can use some MSFL code of linear interpolation to produce a trendline between prices at these date-defined-endpoints. You cannot graphically print the prices at the endpoints to the GUI, but you can use the data window or the place the cursor over the appropriate point and read off the value manually. To have the function return the price difference between the endpoints is possible, but you'd have to display the value in another window, or accept that if combined with the trendline function, it might mess up the scaling of the chart. Some of the limitations you will encounter trying to implement this is that you can only have six user Input() functions. To enter a start and end day, month, year, (maybe hour and minute if using realtime charts) and price arrays to be used will exceed this limit, so something will have to be combined, but MS has "rounding issues" dealing with large numbers so even entering dates can be problematic. But at least using this method you will see a line connecting the points on the right dates. This might help: http://www.metastocktool.../MetaStock/TrendDate.txtYou cannot change the inbuilt tools. Hope this helps. wabbit [:D]
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 4/8/2008(UTC) Posts: 8
|
Let me show you a picture.
http://www.luciana.pro.br/home/trendline.gif
It's a simple idea. I pick the trendline tool, and choose two points on graphic, then it gathers the price at point A and at point B, and give me the subtraction between the prices. Just it !
The prices are already there, we just need to pick them from where the trendline is. Really. I can't believe it's just impossible !! It can't be!!
[]s
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
Believe it, it cannot be done in MetaStock.
wabbit [:D]
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 4/8/2008(UTC) Posts: 8
|
I know it was not implemented. What I mean is if I can code it, create an external plugin, or something.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
Again, no. wabbit wrote:The short answer is, no it cannot be done.
The
longer answer involves responses like, you cannot use the mouse to
select data points as input arguments to indicators / formulas. You
cannot programatically write to the display. There is no interaction
for the user interface in MS so much of the functionality you see in
other software packages is not included in MS.
MDK User Manual wrote:Things you cannot do with an MSX DLL include:
GUI functions including plotting and user dialogs. You cannot write data to the chart area. You cannot interface with the GUI. You cannot capture mouse click events in MS. You cannot interact with the user from inside MS, except by using standard MSFL functions. wabbit [:D]
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 4/8/2008(UTC) Posts: 8
|
Hmmm Fine.
but I won't give up. Who is the manager of the coders team? I will tell him the history hopping he likes it :o)
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Discussions
»
Product and Service Development
»
MetaStock
»
How can I see the price range between two prices ?
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.