Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/4/2005(UTC) Posts: 63 Location: Poole Dorset England
|
Hi jjstein,, many many thanks for your swift reply,, actually it's not quite what I'm looking for. :-( Let me try and explain a bit more as I don't think I was too clear before. 1st,, a mistake by me in my original formula (Copy & paste went hey-wire I think,, it's when you copy text out of Metastock into texpad it seems to slightly go wrong ) :-) Original code for #2 Colour MA is as follows; Code:
{Plot MA in two colors}
A:=Mov(C,21,E);
If(A>=Ref(A,-1),A,0);
If(A<Ref(A,-1),A,0);
ValueWhen(1,0,A);
***ACTUALLY,,It's done it again,, copying into Firefox,, Meant to be If(A,,THEN THE GREATER THAN SYMBOL on line 2,, & line 3 If(A LESS THAN SYMBOL,,,NOT>,,,&Lt,, Not sure how tyo get over this,, tried editing a few times,, couldn't change it)*** Sorry 2nd,, "A picture paints a 1000 words!",, I'll insert a picture to try and illustrate 1st jjstein. Hopefully you can see what I'm really trying to achieve jjstein. My original formula lets me create a MA that can be dual coloured. What I would really like to do is be able to plot 2 MA's on the same chart,, say two 5 period MA's that are dual coloured. By using the vertical shift formula,, I can create a banding around the price (IE say 1.5 as a setting for vertical shift). The formula that you wrote is 50-70% there,, but not in a way that the MA's can be dual coloured. Maybe my above formula needs to be written to incorporate the vertical shift as well (Which I don't know how do do, hence this post :-),, then I just plot this twice on the chart. Or, might be better/ easier to create 2 MA's dual coloured with vertical shift all within 1 formula? I hope this kind explains it a bit better jjstein. Again,, many many thanks for your help. Much appreciated. Many thanks TheGhost
|