Rank: Member
Groups: Registered, Registered Users, Unverified Users Joined: 5/8/2010(UTC) Posts: 28 Location: Mumbai (India)
Thanks: 1 times
|
The following code is of RMO Osc which is used to change color when it oscillates above / below Zero
RMO Indicator {The formula will change the indicator color to red when < zero and to blue when > zero} {* Plot *} x:=Mov(Fml("Rainbow Oscillator"),81,E); If(x>0,x,0); x:=Mov(Fml("Rainbow Oscillator"),81,E); If(x<0,x,0);
Now in this code I want to make the following changes. Can you help me here...
Details of how I want to use it. - RMO Osc is display in Histogram style.
- When the histogram bar forms either a top or a bottom, that particular bar should change it's color of my preference.
Can you help me with the necessary code that will allow me to change the color of the histogram bar which forms either the top / low bar with the color of my choice
Regards and Thanks with TAS reply
|
|
|
|
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)
|
How many bars are you going to allow to pass before you actually confirm a high/low bar as the top? Start with something like: Code:
x:=Mov(Fml("Rainbow Oscillator"),81,E);
up:=(x>0)*x;dn:=(x<0)*x;
pk:=Ref(up,-1)=HHV(up,3);
tr:=Ref(dn,-1)=LLV(dn,3);
{plot}
up;
dn;
pk;
tr;
Please don't address forum posts to individuals, this is a place where anyone could answer your questions. wabbit [:D]
|
|
|
|
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)
|
Shouldn't have written that code in a rush before going running this morning... Code:
x:=Mov(Fml("Rainbow Oscillator"),81,E);
up:=(x>0)*x;
dn:=(x<0)*x;
pk:=Ref(up,-1)=HHV(up,3) AND Ref(up,-1)>0;
tr:=Ref(dn,-1)=LLV(dn,3) AND Ref(dn,-1)<0;
{plot}
up;
dn;
Ref(pk,+1)*up;
Ref(tr,+1)*dn;
wabbit [:D]
|
|
|
|
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.