Rank: Advanced Member
Groups: Registered, Registered Users Joined: 4/27/2005(UTC) Posts: 130
|
Hey,
Has anyone coded a formule that would find the top 3 highs during a trading session if the trading session was Month()<>Ref(Month(),-1);?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/7/2005(UTC) Posts: 1,346
|
hey diesel.... just filled up 2 allis chalmers dozers , a dump truck and a trac [censored].... what ya reckon thats gonna set me back.....
was waitin for some of the better coders to answer first, they must be at the beach.... here's a thought on your quest.... i included both plots, the current one and the offset one, days back so to see the days back plot just shifts forward .... its really reflecting the old data.......... you didn't define 'a trading session' other than 'Month()<>Ref(Month(),-1);' so not sure it that's what was on your mind..... h
[code:1:66b2a54caa]perchange:=Input("% peak change",.01,100,1);
pds:=Input("days ago",1,200,20);
plot:=Peak(1 ,H,perchange);
plot; {the true non shifted plot}
Ref(plot ,-pds ); {the forward shifted peaks of selected days ago}[/code:1:66b2a54caa]
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/19/2005(UTC) Posts: 1,065 Location: Koh Pha-Ngan, Earth
Was thanked: 2 time(s) in 2 post(s)
|
[size=5:e2e909dd70]My guess is a $300~$600 fill-up...[/size:e2e909dd70]
You could also try adapting this formula from MetaStockTools.com:
" Nth Hi/Lo - plots 1~8th highest/lowest indicator values".
jose '-)
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 4/27/2005(UTC) Posts: 130
|
Thanks Hayseed & Jose,
This provides me a direction I guess I should have included a chart with my question.
Hayseed-
I'm a design engineer I only design trucks & chassis I couldn't tell you how much it would cost to haul thing away. :?
Here what I was tring to design for in metastock. I wanted to get the value of the 3rd highest high in the last session mark on this chart by the blue line.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/7/2005(UTC) Posts: 1,346
|
hey diesel.... jose's subtle hint at the diminishing purchasing power of the dollar was easier to see than your code is to figure out.... still trying... here is something that allows for a start date... it appears a 'session' must be a monthly thing, not familiar with the term used in that manner myself.......
jose must have been using 2001 dollars, today it takes about 600 hundred bucks per fill up.... thats off road diesel so its a tad cheaper...... h
[code:1:a2d06d6298]M:=Input("month",1,12,6);
D:=Input("day",1,31,1);
Y:=Input("year",1990,2010,2006);
a:=Month()=M AND DayOfMonth()=D AND Year()=Y;
HighestSince( 1, a, H);[/code:1:a2d06d6298]
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 4/27/2005(UTC) Posts: 130
|
:D I know what your saying Hayseed. I've been up working on it for the last 2 weeks with nothing close to what I'm looking for. Thanks for tring thou I didn't figure it was going to be to easy to complete. The code you posted didn't return anything on the chart. Was it a direction code?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/7/2005(UTC) Posts: 1,346
|
hey diesel.... it should plot progressively higher highs from the date selected..... the thought was to visually check the 3rd high......h
|
|
|
|
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)
|
dieselpr, h et. al.
Do you want to retrospectively indicate the 3rd highest for the month, or dynamically?
wabbit :D
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 4/27/2005(UTC) Posts: 130
|
hayseed,
I'll take another look at it when I get home tonight thanks.
Hi Wabbit,
My idea was to find the 3rd highest in the past month to be ref. in the current month. So yes retrospectively.
Now there a big word "retrospectively" :lol:
Thanks guy for the help
|
|
|
|
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)
|
I am not sure where it went (you'll have to search the forum (i dont have time right now)), but this is very similar to the challenge that Jose threw open in the first programming competition....
To retrospectively indicate the monthly high and low. We got the code down to just a few lines...
Instead of looing for the H and L, look for the 3rd H and 3rd L as Jose has already pointed out in an earlier post in this thread.
Combine the two codes and there is your answer.
wabbit :D
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 8/13/2005(UTC) Posts: 170
Thanks: 7 times
|
Dieselpr,
Did you found the method ? I want the 3rd Low/High of say Mov(c,3,e)- Mov(c,8,e) as 1 or 0.
Asish
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 4/27/2005(UTC) Posts: 130
|
Hey Uasish,
I never could find a solution that i was happy with on this idea so to answer your question no I never found it. I purchased the Dev Kit from Equis and am working on some DLL so I might have an answer to this problem later on down the line. Sorry wish I could help.
|
|
|
|
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.