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

Notification

Icon
Error

Options
Go to last post Go to first unread
royttm  
#1 Posted : Monday, March 17, 2014 4:01:25 AM(UTC)
royttm

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 3/27/2006(UTC)
Posts: 41
Location: Singapore

Dear forum members,

Is any one of you able to translate the following Chinese software code of an indicator (Homily) , into Metastock indicator code? The indicator provide sought of information whether the particular stock are set for "Profiting", "Floating" or "Trap" as shown at the image link http://tinyurl.com/homilydragon

M:=13;N:=30;
A01:=(C+O+L+H)/4;
A02:=(WINNER((A01 * 1.04)) * 100.000);
A03:=(WINNER((A01 * 0.96)) * 100.000);
A04:A03,NODRAW;
A08:A02-A03,NODRAW;
A06:( 100.000 - A02),NODRAW;
STICKLINE( 1.000,0,A04, 2,0),COLORRED;
STICKLINE( 1.000, 100.000,A02, 2,0),COLORGREEN;
STICKLINE( 1.000,A04,(100-A06), 2,0),COLORYELLOW;
A0A:=(((((HHV(A04, 15.000) - A03) / A03) * 100.000) > N) AND (HHV(A04, 15.000) > 50.000));
STICKLINE(A0A,(0 - 2.000), 2.000, 4,0),COLORYELLOW;
STICKLINE(NOT(A0A),(0 - 2.000), 2.000, 4,0),COLORMAGENTA;
Profit:MA(A03,M),COLORRED,LINETHICK3;
Float: (MA(A02,M) - MA(A03,M)),COLORYELLOW,LINETHICK3;
Trap: (100.000 - MA(A02,M)),COLORGREEN,LINETHICK3;



wabbit  
#2 Posted : Tuesday, March 25, 2014 7:09:16 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)
You're never going to get the Winner() function in MS as the data comes from another source rather than just OHLCVOI. However, with considerable chance of error and the MDK, you could make some assumptions and simulate this function using several internal loops to accumulate the volume versus price, and the volume itself.

As for formatting the lines, you'd have to employ some "tricks" and be very specific about what order you output your indicator values, but it could be done and then saved as a template.

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.