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 : 11 years ago
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 : 11 years ago
henry1224

Rank: Advanced Member

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

Was thanked: 3 time(s) in 3 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 : 11 years ago
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 10 years ago
Plotting Moving Average on Customized Volume Indicator (MetaStock)
by doji88 12 years ago
how to make an volume indicator that displays vertically (Formula Assistance)
by a26174980 12 years ago
metastock formula for effective volume indicator (Formula Assistance)
by arvind296 17 years ago
SWING VOLUME INDICATOR (Advanced Coding Techniques)
by mahamaya 17 years ago
Help with Average Volume Indicator (Formula Assistance)
by Knowland 17 years ago
Forex tick volume indicator [RESOLVED] (Formula Assistance)
by iphilosophise 19 years ago
Looking for volume indicator/expert [RESOLVED] (Formula Assistance)
by jstaron 19 years ago
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.

information You have 1 unread message(s) in your Inbox.