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

Notification

Icon
Error

Options
Go to last post Go to first unread
RUTrading  
#1 Posted : Wednesday, September 5, 2012 7:24:22 AM(UTC)
RUTrading

Rank: Member

Groups: Registered, Registered Users, Unverified Users
Joined: 6/12/2012(UTC)
Posts: 19
Location: South Africa - JHB

Hi I wonder if someone could explain to me how I can create a histogram with the below indicator? Basically I am wanting everything coloured in that which is below 0 up to Closing line and above 0 up to Closing line. I just want everything shaded in. Not sure if I am making sense. Very new to coding and have really no clue what I am doing. {Relative Strength Code} x:= Security("C:\EQUIS\INDEX\J203",C); y:= Input("Periods for Ratio",0,9999,1); z:= Input("Periods to Sum up", 1,9999,52); R:= C/x; base:= Sum(R,z)/z; mf:= ((Ref(R,-y)/base)-1)*10; mf;0;
jjstein  
#2 Posted : Friday, September 7, 2012 10:30:12 AM(UTC)
jjstein

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)

RUTrading wrote:
I wonder if someone could explain to me how I can create a histogram with the below indicator?

You want something like this: UserPostedImage 1. You need to change the last line so that it has TWO (2) plots -- one for above zero, a separate plot below zero. Change the last line of your code, as follows:

OLD

Code:

mf;0;

NEW

Code:

If(mf>0,MF,0); { GREEN } 
If(mf<0,MF,0); { RED }

2. Then, change each plot STYLE to "HISTOGRAM" and COLOR to what you want. NOTE: You need to click one of these, make the style & color changes, then click an empty spot on the chart, then click the other line. In MetaStock, there is no way to do this in the formula code.


RUTrading  
#3 Posted : Friday, September 14, 2012 5:37:10 AM(UTC)
RUTrading

Rank: Member

Groups: Registered, Registered Users, Unverified Users
Joined: 6/12/2012(UTC)
Posts: 19
Location: South Africa - JHB

Thanks Johnathan. I have done what you said below, which is almost there, but I would like those lines in the histogram to be a solid colour and not individual lines. Is this possible?
jjstein  
#4 Posted : Friday, September 14, 2012 6:36:34 AM(UTC)
jjstein

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)
The best you can do is to "thicken" the plot style to maximum; then, when you shrink the x-axis to about a year (or more), it will "appear" to be solid.
RUTrading  
#5 Posted : Thursday, September 20, 2012 4:39:21 AM(UTC)
RUTrading

Rank: Member

Groups: Registered, Registered Users, Unverified Users
Joined: 6/12/2012(UTC)
Posts: 19
Location: South Africa - JHB

Thanks Johnathan
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.