logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Jon Gould  
#1 Posted : Wednesday, June 21, 2006 2:58:45 PM(UTC)
Jon Gould

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 6/21/2006(UTC)
Posts: 5
Location: New Jersey - usa

I'm a newbie and not sure I'm in the right place.. I would like to create an indicator that will calculate the difference in closing prices between mouse selected start and end points on an end-of-day chart. I don't see how to capture the data from the mouse position on multiple points on the chart. Any help greatly appreciated!
henry1224  
#2 Posted : Wednesday, June 21, 2006 11:17:53 PM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
custom indicators that gather data from mouse clicks at certain points of a chart is inpossible. Line studies: trendlines, gann, linear regression, fibonnaci fans and so forth can be used. You cannot get alerts from line studies though
wabbit  
#3 Posted : Wednesday, June 21, 2006 11:29:52 PM(UTC)
wabbit

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)
Jon, You can programmatically set the start and end dates for the indicator. If you think this might suit your purposes, then just us know. wabbit :D
Jon Gould  
#4 Posted : Thursday, June 22, 2006 2:33:38 PM(UTC)
Jon Gould

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 6/21/2006(UTC)
Posts: 5
Location: New Jersey - usa

Programmatically would be fine. How do I do that? I use VB & Powerbasic. tks
uasish  
#5 Posted : Thursday, June 22, 2006 4:16:58 PM(UTC)
uasish

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 8/13/2005(UTC)
Posts: 170

Thanks: 7 times
Dear Sir, Let him enjoy.This has to be here than "Tight Flags". Regards Asish
wabbit wrote:
Because I have finished my exams now !!! YAY !!! Here is my take on finding the change in the price in the last two calendar months of the chart... --8<------------------------------ {Exploration} {ColA - %} theDay:=LastValue(DayOfMonth()); theMonth:=LastValue(Month()); theYear:=LastValue(Year()); {subtract two months} theMonth:=theMonth-2; {roll back years and days as necessary} theYear:=If(theMonth<=0,theYear-1,theYear); leapYear:=Mod(theYear,4)=0 AND Mod(theYear,100)<>0 OR Mod(theYear,400)=0; theMonth:=If(theMonth<=0,theMonth+12,theMonth); theDay:= If(theMonth=4 OR theMonth=6 OR theMonth=9 OR theMonth=11,If(theDay>30,30,theDay), If(theMonth=2 AND leapYear, If(theDay>29,29,theDay), If(theMonth=2 AND leapYear=0,If(theDay>28,28,theDay),theDay))); x:=Year()>theYear OR (Year()=theYear AND (Month()>theMonth OR Month()=theMonth AND DayOfMonth()>=theDay)); y:=x AND Alert(x=0,2); i:=Cum(1)=1; (x>0)*(100*C)/ValueWhen(1, y OR i,C); --8<------------------------------ This will return a percentage change of the last close versus the close of the first bar traded two calendar months ago. Set your filter as required, in this case you want a 190% rise in the period... so --8<------------------------------ {Filter} ColA>=190 --8<------------------------------ I hope you find this useful. Let me know if there are any bugs. ( I have had a few glasses of wine tonight, so expect anything from the code! ) wabbit
Jon Gould  
#6 Posted : Thursday, June 22, 2006 4:25:27 PM(UTC)
Jon Gould

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 6/21/2006(UTC)
Posts: 5
Location: New Jersey - usa

Thank you, I'll try it. I'm trying to get the input from a mouse position or clicks for start and end though so the user can go over the chart and use the mouse to select the start and end points.
Branden Russell  
#7 Posted : Thursday, June 22, 2006 6:44:09 PM(UTC)
Branden Russell

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 11/28/2005(UTC)
Posts: 276
Location: Salt Lake City, UT

Jon Gould wrote:
I'm trying to get the input from a mouse position or clicks for start and end though so the user can go over the chart and use the mouse to select the start and end points.
As mentioned in the first reply, that isn't possible. You can use the trendlines and such as mentioned or the formula with dates you enter as Wabbit mentioned.
Jon Gould  
#8 Posted : Friday, June 23, 2006 2:30:10 PM(UTC)
Jon Gould

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 6/21/2006(UTC)
Posts: 5
Location: New Jersey - usa

Thank you! Is there any way to acquire the data under the cursor on a chart (i.e. dll, msfl,msx, etc)
wabbit  
#9 Posted : Friday, June 23, 2006 11:11:40 PM(UTC)
wabbit

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)
No.
Users browsing this topic
Guest (Hidden)
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.