Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 9/1/2006(UTC) Posts: 3
|
Friends,
I am faced with a problem using MS 8.0. for EoD.
When adjusting the periodicity for day bars, 4 days for eg., the last bar has 4 days on it - on all 4 days. This makes it really frustating to me as it upsets any calculation. Is there any way to pin the counting to start with the first bar, so that the last one will not have a 'completed' bar for the first 3 days? Is there a different formula for this? Or is this one metastock flaw that cannot be resolved in its current state?
I have nt yet tried this on intra day data, but I m sure it applies there as well ( for 2 hourly data for eg.)
I d imagine that if a formula could somehow 'group' bars into a certain periodicity such that it could in turn be used, for eg., for MACD, stoch, fractal, etc., that would solve the problem. Unfortunately, as it stands, MS s program for the 'Other' periodicity bunches the required number at the right end.
|
|
|
|
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)
|
Edwin and I did some work some time ago.... See http://forum.equis.com/forums/thread/3900.aspx{grouping periods} prd:=3;
x:=Mod(Cum(1),prd)=1;
grpO:=ValueWhen(1 ,x,O);
grpH:=If(x,H,If(H>PREV,H,PREV));
grpL:=If(x,L,If(L<PREV,L,PREV));
grpC:=C;
{plot} grpO;
grpH;
grpL;
grpC; [/code] BUT looking at this now, I would make some changes: Code:
{grouping periods}
prd:=3;
x:=Mod(Cum(1),prd)=1;
grpO:=ValueWhen(1,x,O);
grpH:=HighestSince(1,x,H);
grpL:=LowestSince(1,x,L);
grpC:=C;
{plot}
grpO;
grpH;
grpL;
grpC;
See if this works for you. Modify it as required, or just ask for some more help. wabbit [:D]
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 9/1/2006(UTC) Posts: 3
|
Dear Wabbit,
Thank you very much for your effort in answering my query.
I am looking for not just a visual representation of OHLC values, but their formation as representative bars. I wonder if that is possible at all in the present state of MS.
On top of this, I would like to actually work MACD, EMA, RSI etc., on these bars for values to trigger buy or sell. Maybe if possible even to system test it. As MS stands now however, I doubt if these can be achieved, as I d imagine that the MS 8.0 program has written 'Other' periodicity to work from the right hand side. I wonder if MS 7.0 counts in the same way too.
|
|
|
|
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.