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

Notification

Icon
Error

Options
Go to last post Go to first unread
FormulaPrimer  
#1 Posted : Wednesday, May 14, 2014 8:29:12 AM(UTC)
FormulaPrimer

Rank: Advanced Member

Groups: Registered, Registered Users, Unverified Users
Joined: 8/12/2005(UTC)
Posts: 73

Anyone know a creative formula to make this work on MS?



Volume Indicator for Amibroker (AFL)
============================================
SetChartBkColor(16 ) ;
_SECTION_BEGIN("EMA");
P = Volume;
Periods = Param("PeriodsEMA", 9, 2, 300, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), colorRed, styleLine | styleThick );
_SECTION_END();
Period = Param("Period", 10, 2, 300, 1, 10 );;
LowColor = colorYellow;
ClimaxColor = colorRed;
ChurnColor = colorGreen;
ClimaxChurnColor=colorBlue;
LowChurnColor= colorWhite;
Value1 = V;
Value2 = V*(H-L);
Value3 = V/(H-L);
BarColor = IIf( (Value1 == LLV(Value1,Period)), LowColor,
IIf( (Value2 == HHV(Value2,Period)), ClimaxColor,
IIf( (Value3 == HHV(Value3,Period)), ChurnColor,
IIf( ((Value2 == HHV(Value2,Period) AND (Value3 == HHV(Value3,Period)))), ClimaxChurnColor,
IIf( (Value3 == LLV(Value3,Period)), LowChurnColor, colorBlueGrey)))));
Back to top
henry1224  
#2 Posted : Thursday, May 15, 2014 2:52:45 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)
Metastock cannot differentiate the color change as a single value.One line, one color. One line thickness for one value. You can create an indicator that gives 5 different values, and then color each value a different color. Change the style of plot to dots and give them the thickest line
What Metastock can do is color the bars different colors using the HIGHLIGHT TAB in the EXPERT ADVISOR, be advised that the order of precedence will also affect the highlights.

I found that you would need to set the precedence in the following order

Climax churn color =5
Low Churn Color=4
Churn Color =3
Climax color=2
extreme color =1 1 would be for higher Volume -1 would be for lower volume

UserPostedImage

you will find that low churn color and churn color both fire off at the same time making no difference

Code:
Per1:=Input("length",5,100,10);Plot:=Input("1=V 2=indicator ",1,2,2);Value1:= V;Value2:= V*(H-L);Value3:= V/(H-L);If(Plot=2,If(V=LLV(L,Per1),-1,If(V=HHV(V,Per1),1,0)),V);If(Plot=2,If(Value2=LLV(Value2,Per1),-2,If(Value2=HHV(Value2,Per1),2,0)),V);If(Plot=2,If(Value3=LLV(Value3,Per1),-3,If(Value3=HHV(Value3,Per1),3,0)),V);If(Plot=2,If(Value3=LLV(Value3,Per1),-4,If(Value3=HHV(Value3,Per1),4,0)),V);If(Plot=2,If(Value2=LLV(Value2,Per1) AND Value3=LLV(Value3,Per1),-5,If(Value2=HHV(Value2,Per1) AND Value3=HHV(Value3,Per1),5,0)),V)
FormulaPrimer  
#3 Posted : Friday, May 16, 2014 7:46:00 PM(UTC)
FormulaPrimer

Rank: Advanced Member

Groups: Registered, Registered Users, Unverified Users
Joined: 8/12/2005(UTC)
Posts: 73

This really helped and moved this analysis further.
Thanks.

Users browsing this topic
Guest (Hidden)
Similar Topics
Time Segmented Volume Indicator (Formula Assistance)
by nasdaqtrader 2/3/2015 1:50:23 PM(UTC)
Plotting Moving Average on Customized Volume Indicator (MetaStock)
by doji88 7/5/2013 3:27:34 PM(UTC)
how to make an volume indicator that displays vertically (Formula Assistance)
by a26174980 1/19/2013 12:43:46 AM(UTC)
metastock formula for effective volume indicator (Formula Assistance)
by arvind296 9/7/2008 1:20:38 AM(UTC)
SWING VOLUME INDICATOR (Advanced Coding Techniques)
by mahamaya 5/19/2008 9:05:37 AM(UTC)
Help with Average Volume Indicator (Formula Assistance)
by Knowland 3/15/2008 1:36:17 AM(UTC)
Forex tick volume indicator [RESOLVED] (Formula Assistance)
by iphilosophise 3/21/2006 2:44:30 PM(UTC)
Looking for volume indicator/expert [RESOLVED] (Formula Assistance)
by jstaron 2/6/2006 3:20:53 PM(UTC)
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.